Compute the matrix representation of a linear map with respect to a basis I'm trying to solve this exercise but I'm stuck:
Let $V$ be a vector space over $K$ and let $\mathcal{B} = \{v_1, v_2, v_3, v_4\}$ be a basis of $V$. Let $f: V \rightarrow V$ be a linear map such that:
$$f(v_1) = v_2 - v_3, \quad f(v_2) = 3v_1 - 2v_4, \quad f(v_3) = v_3, \quad f(v_4) = v_1 + v_4.$$
Calculate the matrix $A$ which represents $f$ in the basis $\mathcal{B}$. (Extra: is $A$ nilpotent?)
I tried multiple things. Intuitively, I thought the answer would look something like this:
\begin{bmatrix}\mid&\mid&\mid&\mid\\\ v_2-v_3&3v_1-2v_4&v_3&v_1+v_4\\\ \mid&\mid&\mid&\mid\end{bmatrix}
Which of course works for our usual basis vectors $e_1, e_2, e_3, e_4$, but unfortunately not for other basis vectors.
What I tried next was to calculate the matrix by hand in the case of a $2 \times 2$ matrix and then a specific example with some made-up numbers for a $3 \times 3$ matrix but I wasn't able to see any easy patterns. Surely the intention here is not to solve multiple, big systems of equations to figure out all the entries in the matrix one by one, right? What am I missing here?
Oh and for the extra, my guess is that $A$ is not nilpotent, since no matter how many times we apply $A$, we will always get $v_3$ for $v_3$ and never the zero vector. Is this correct?

Thanks to a comment I came to this solution:
$A = \begin{bmatrix}
0 & 3 & 0 & 1 \\
1 & 0 & 0 & 0 \\
-1 & 0 & 1 & 0 \\
0 & -2 & 0 & 1
\end{bmatrix}$, and I see that this works with the basis $e_1, e_2, e_3, e_4$.
But if I try it with other vectors, obviously it doesn't work. For example, let $v_1 = \begin{pmatrix} 1\\\ 1\\\ 1\\\ 1\end{pmatrix}, \quad v_2 = \begin{pmatrix} 1\\\ 1\\\ 1\\\ 0\end{pmatrix}, \quad v_3 = \begin{pmatrix} 1\\\ 1\\\ 0\\\ 0\end{pmatrix}, \quad v_4 = \begin{pmatrix} 1\\\ 0\\\ 0\\\ 0\end{pmatrix}$
But then $Av_1 = \begin{pmatrix} 4\\\ 1\\\ 0\\\ -1\end{pmatrix} \neq v_2 - v_3$
What am I not understanding here? Shouldn't the solution have to be in terms of the given vectors? Doesn't the solution change if you have different specific vectors?
 A: You're looking for a linear map $M$ such that
$$M\begin{pmatrix}v_1&v_2&v_3&v_4\end{pmatrix}=\begin{pmatrix}v_2-v_3&3v_1-2v_4&v_3&v_1+v_4\end{pmatrix}$$ Which is exactly, if we denote the former equality by $MV_1=V_2$
$$M=V_2V_1^{-1},$$ assuming a well-defined inverse. Maybe this helps.
A: Here is definition of coordinate vector (don’t skip this part). Matrix Representation of $f$ with respect to ordered basis $B$ is
$$A=[f]_B=\begin{bmatrix}\mid&\mid&\mid&\mid\\\ [f(v_1)]_B & [f(v_2)]_B &[f(v_3)]_B&[f(v_4)]_B\\\ \mid&\mid&\mid&\mid\end{bmatrix}.$$
Since $ f(v_1) = v_2 - v_3$, $f(v_2) = 3v_1 - 2v_4$, $f(v_3) = v_3$, $f(v_4) = v_1 + v_4$, we have $$[f(v_1)]_B=\begin{pmatrix} 0\\ 1\\ -1\\ 0\\ \end{pmatrix}, \quad[f(v_2)]_B = \begin{pmatrix} 3\\ 0\\ 0\\ -2\\ \end{pmatrix}, \quad [f(v_3)]_B = \begin{pmatrix} 0\\ 0\\ 1\\ 0\\ \end{pmatrix}, \quad [f(v_4)]_B = \begin{pmatrix} 1\\ 0\\ 0\\ 1\\ \end{pmatrix}.$$ Thus
$$A= \begin{bmatrix} 0 & 3 & 0 & 1 \\ 1 & 0 & 0 & 0 \\ -1 & 0 & 1 & 0 \\ 0 & -2 & 0 & 1 \end{bmatrix}.$$

We are working in general vector space $V$ with $\dim (V)=4$. So saying $\{e_1,e_2,e_3,e_4\}$ is basis of $V$ don’t make sense, unless $V=F^4$.
