Find matrix $\mathscr{M}(T)$ of the following linear map. Let $u_1,u_2,u_3,u_4$ be the basis of $V$ an let $T \in \mathscr{L}(v)$ be given by 
$Tu_1 = u_1$
$Tu_i = u_i - u_{i-1} , i > 1$
Find $\mathscr{M}(T)$.
My response to this incorrect. I was presumed that this would be a diagonal matrix and I ended up writing
\begin{bmatrix}1&0&0&0\\0&0&0&0\\0&0&1&0\\0&0&0&0\end{bmatrix} 
My reasoning was that 1 minus 0 was 1 and 1 minus 1 was 0... 
The actual answer is
 \begin{bmatrix}1&-1&0&0\\0&1&-1&0\\0&0&1&-1\\0&0&0&1\end{bmatrix} 
My understanding of this solution is that there is some computation that I can't seem recall. My guess is that row1column1 is just 1 given by the defined map. then the ith entry row1column2 1-1 = 0. Not sure how to get -1.
 A: In general, say $T$ is a linear transformation from $V$ to $V$ and $\mathcal B=\{v_1,\ldots,v_n\}$ is a basis of $V$. Then there are constants $c_{i,j}$ with $i,j=1,\ldots,n$ such that
$$Tv_1 = c_{1,1}v_1+c_{1,2}v_2+\ldots+c_{1,n}v_n$$ $$\vdots$$
$$Tv_n = c_{n,1}v_1+c_{n,2}v_2+\ldots+c_{n,n}v_n$$
And we consider $[T]_{\mathcal B}$, the matrix representation of $T$ under basis $\mathcal B$ as 
$$[T]_{\mathcal B}=\begin{pmatrix}
c_{1,1}& c_{2,1}&\ldots&c_{n,1}\\
c_{1,2}&c_{2,2}&\ldots&c_{n,2}\\
\vdots &\vdots&\ddots&\vdots\\
c_{1,n}&c_{2,n}&\ldots&c_{n,n}
\end{pmatrix}$$
A: We have $u_1=\begin{bmatrix}1\\0\\0\\0\end{bmatrix}$, $u_2=\begin{bmatrix}0\\1\\0\\0\end{bmatrix}$, 
$u_3=\begin{bmatrix}0\\0\\1\\0\end{bmatrix}$, 
$u_4=\begin{bmatrix}0\\0\\0\\1\end{bmatrix}$.  To apply our linear map to a vector, we multiply $\mathscr{M}(T)$ by that vector, written as a column on the right.
$\begin{bmatrix}1&0&0&0\\0&0&0&0\\0&0&1&0\\0&0&0&0\end{bmatrix} u_2=\begin{bmatrix}1&0&0&0\\0&0&0&0\\0&0&1&0\\0&0&0&0\end{bmatrix}\begin{bmatrix}0\\1\\0\\0\end{bmatrix}=\begin{bmatrix}0\\0\\0\\0\end{bmatrix}$
which is not what we want.
However $\begin{bmatrix}1&-1&0&0\\0&1&-1&0\\0&0&1&-1\\0&0&0&1\end{bmatrix} u_2=\begin{bmatrix}1&-1&0&0\\0&1&-1&0\\0&0&1&-1\\0&0&0&1\end{bmatrix} \begin{bmatrix}0\\1\\0\\0\end{bmatrix}=\begin{bmatrix}-1\\1\\0\\0\end{bmatrix}=-u_1+u_2$
