# trace function ($2\times2$) with ordered bases as linear transformation

We got trace function as following:

$$\operatorname{tr}\begin{pmatrix} a & b\\ c & d\\ \end{pmatrix}=a+d$$

So now have to write down $[\operatorname{tr}]_{S_1,S_2}$, where ordered bases are the standard bases:

$$S_2=\left\{\begin{bmatrix} 1 & 0\\ 0 & 0\\ \end{bmatrix}, \begin{bmatrix} 0 & 1\\ 0 & 0\\ \end{bmatrix}, \begin{bmatrix} 0 & 0\\ 1 & 0\\ \end{bmatrix}, \begin{bmatrix} 0 & 0\\ 0 & 1\\ \end{bmatrix}\right\}, S_1=\{1\}$$

I'm pretty sure its $S_1=\{1\}$, not the $I$ (identity) matrix. Since we are doing transformation from Matrix to number ($4\dim$ to $1\dim$)

So the question is: "can the trace function be represented as a linear transformation?"

-
Is $\text{tr}(cA + B) = c\,\text{tr}(A) + \text{tr}(B)$? Yes $\Rightarrow$ $\text{tr}$ is a linear transformation, No $\Rightarrow$ it isn't. –  M. Vinay Jun 14 '14 at 9:15
Represent $\begin{pmatrix}a & b\\c & d\end{pmatrix}$ in terms of the basis elements, then write down the transform in terms of the basis elements of $S_1$. You will get the representation from this. –  M. Vinay Jun 14 '14 at 9:21

Let the basis elements be named $e_1, e_2, e_3, e_4$ in the order given in the OP. Then the matrix $\begin{pmatrix}a & b\\ c & d\end{pmatrix}$ can be written as $ae_1 + be_2 + ce_3 + de_4$ = $\begin{pmatrix}a\\b\\c\\d\end{pmatrix}$.

$\text{tr}\begin{pmatrix}a & b\\ c & d\end{pmatrix} = a + d \Rightarrow \\ \text{tr}(ae_1 + be_2 + ce_3 + de_4) = 1a + 0b + 0c + 1d$

From this, the matrix representing $\text{tr}$ is $\boxed{(1\ 0\ 0\ 1)}$.

-
@MotherLand It's $1$, of course! Only a $4 \times 4$ or higher order matrix could possibly have rank $4$. But you don't need to look at the matrix to find the rank. The rank of a transformation is the dimension of its image space. Here the image space is one-dimensional, so the rank is $1$. –  M. Vinay Jun 14 '14 at 9:47
@MotherLand Yes, except it's not the number of elements that's $3$, it's the dimension. The dimension of the null space is $3$. All matrices of the form $\begin{pmatrix}0 & b\\c & 0\end{pmatrix} = be_2 + ce_4$ and $\begin{pmatrix}a & 0\\0 & -a\end{pmatrix} = ae_1 - ae_4 = a(e_1 - e_4)$ are mapped to $0$. So the nullspace is $\text{span}(\{e_2, e_3, e_1 - e_4\})$, which has dimension $3$. –  M. Vinay Jun 14 '14 at 10:08
@MotherLand $\text{tr}\begin{pmatrix}a & b\\c & d\end{pmatrix} = 0 \Rightarrow a + d = 0 \Rightarrow d = -a$. It says nothing about $b$ and $c$, which means they can take any values. So there are three independent components ($a$, $b$, and $c$, with $d = -a$). This makes the dimension (of the null space) $3$. –  M. Vinay Jun 14 '14 at 10:35
Oh, I see now, so because of the zeros in $tr=[−1;0;0;1]$ it is actually $ker(tr)=x_2*[0;0;0;0]+x_3*[0;0;0;0]+x_4∗[−1;0;0;1]$ and therefore $dim(ker(tr))=3$ –  MotherLand Jun 14 '14 at 10:37
@MotherLand That's correct! –  M. Vinay Jun 14 '14 at 10:43

$tr$ is represented by the $1\times 4$ matrix $(1,0,0,1)$.

-
how can we multiply 2x2 matrix by 1x4? O_O –  MotherLand Jun 14 '14 at 9:24
@MotherLand You can, because the "matrix" is a vector. –  M. Vinay Jun 14 '14 at 9:24
We do not. We multiply it by the vector $\begin{pmatrix} a\\b\\c\\d\end{pmatrix}$ representing your $2\times 2$ matrix in the basis $S_2$. –  Vladimir Jun 14 '14 at 9:26
@MotherLand Yes, sure –  Vladimir Jun 14 '14 at 9:34
But if in $S_2$ we have $2$ everywhere instead of $1$, then $[tr]=(2,0,0,2)$. –  Vladimir Jun 14 '14 at 9:37