Find the inverse of a linear transformation Can you please clarify whether, for the following question, I need to use the definition of linear transformation, or something else?

Compute the inverse of the function 
  $f: \mathbb{R}^3 \rightarrow \mathbb{R}^3$, where  $f(x_1,x_2,x_3) := (x_2+x_3, x_1+x_3, x_1+x_2)$.

 A: Given a vector $v=(y_1,y_2,y _3)$,
$f^{-1}(v)$ is the vector $u=(x_1,x_2,x_3)$ such that
$f(u)=v$ which means
$x_2+x_3=y_1$
$x_1+x_3=y_2$
$x_1+x_2=y_3$
the sum of the three equations gives
$x_1+x_2+x_3=\frac{1}{2}(y_1+y_2+y_3)$
thus by substraction, we find
$$x_1=\frac{1}{2}(-y_1+y_2+y_3)$$
$$x_2=\frac{1}{2}(y_1-y_2+y_3)$$
and
$$x_3=\frac{1}{2}(y_1+y_2-y_3)$$
which defines $f^{-1}$.
Or by its matrix
$A^{-1}=\frac{1}{2}\left[ \begin{matrix} -1 & 1& 1\\1 &-1 & 1\\1 & 1& -1 \end{matrix} \right]$.
A: $$f(x_1,x_2,x_3)=(0x_1+x_2+x_3,x_1+0x_2+x_3,x_1+x_2+0x_3)=\\
\begin{bmatrix}0 & 1 &1\\1 &0 & 1 \\1 &1 &0\end{bmatrix}\times
\begin{bmatrix}x_1 \\x_2\\ x_3 \end{bmatrix}=AX$$now 
$$f^{-1}=A^{-1}X$$
A: The main thing to realize is that 
\begin{align*}
f \left(\left[ \begin{matrix}x_1 \\ x_2 \\ x_3 \end{matrix} \right] \right)=\left[ \begin{matrix}0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \end{matrix} \right]\left[ \begin{matrix}x_1 \\ x_2 \\ x_3 \end{matrix} \right],
\end{align*}
for all $\left[ \begin{matrix}x_1 \\ x_2 \\ x_3 \end{matrix} \right]$ in $R^3$. So finding the inverse function should be as easy as finding the inverse matrix, since $M_{n \times n}M^{-1}_{n \times n}v_{n \times 1}=v_{n \times 1}$
