# linear algebra how do i calculate the matrix transformation from matrix space to another matrix space

suppose i have a linear trasformation $$T(X)=\begin{pmatrix}1 & 1\\ 1 & 1 \end{pmatrix}X,T:M_{2}(\mathbb{R})\rightarrow M_{2}(\mathbb{R})$$ and i want to find the eigenvalues, i started by calculating the transformation of the basis matrices. $$T\left(\begin{array}{cc} 1 & 0\\ 0 & 0 \end{array}\right)=\left(\begin{array}{cc} 1 & 1\\ 1 & 1 \end{array}\right)\left(\begin{array}{cc} 1 & 0\\ 0 & 0 \end{array}\right)=\left(\begin{array}{cc} 1 & 0\\ 1 & 0 \end{array}\right)$$ and did it for the rest of the basis vectors. now, when i build the transformation matrix does it matter if i organize them by row or by column? i mean is there a difference between $$\left[T\right]_{E}=\left(\begin{array}{cccc} 1 & 0 & 1 & 0\\ 1 & 0 & 1 & 0\\ 0 & 1 & 0 & 1\\ 0 & 1 & 0 & 1 \end{array}\right)%% %% \left[T\right]_{E}=\left(\begin{array}{cccc} 1 & 0 & 1 & 0\\ 0 & 1 & 0 & 1\\ 1 & 0 & 1 & 0\\ 0 & 1 & 0 & 1 \end{array}\right)$$

english is not my main language so i had some hard time figuring out what to google in order to find a solution.

edit: i have the matrices $$\left(\begin{array}{cc} 1 & 0\\ 1 & 0 \end{array}\right) \left(\begin{array}{cc} 0 & 1\\ 0 & 1 \end{array}\right) \left(\begin{array}{cc} 1 & 0\\ 1 & 0 \end{array}\right) \left(\begin{array}{cc} 0 & 1\\ 0 & 1 \end{array}\right)$$ and the problem is how to order their entries: as rows or columns?

thank you!

• Well, are you flattening elements of $M_2(\mathbb R)$ into column vectors or row vectors? The answer to that determines how you should organize the matrix.
– amd
May 4, 2020 at 19:41

If I understand, you’re considering whether to order your basis for $$M_2$$ as $$\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},$$ or $$\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 &0 \\ 1 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} .$$ If so, then this won’t matter. It just amounts to a change of basis, which won’t alter eigenvalues.

EDIT: If we have a linear transformation $$T : V \to V$$, where $$V$$ is a $$d$$-dimensional vector space, we can encode it as a square matrix as follows. Let $$\{v_1, \ldots, v_d \}$$ be a basis for $$V$$. Define a $$d \times d$$ matrix $$A = [a_{i, j}]_{i, j = 1}^d$$ by looking at $$T v_j$$ and writing $$T v_j = a_{1, j} v_1 + \cdots + a_{d, j} v_d = \sum_{i = 1}^d a_{i, j} v_j$$. The expression is unique because $$\{ v_1, \ldots, v_d \}$$ is a basis for $$V$$. This means that the $$j$$th column of the matrix $$A$$ depicts how $$T$$ acts on $$v_j$$. It is, however, vital that we keep the order of the basis consistent when calculating eigenvalues, i.e. we can't swap them around.

So if we were to take our basis to be \begin{align*} v_1 & = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} , & v_2 & = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}, \\ v_3 & = \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix}, & v_4 & = \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} , \end{align*} then we'd compute our matrix as follows. \begin{align*} T v_1 & = \begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} \\ & = \begin{bmatrix} 1 & 0 \\ 1 & 0 \end{bmatrix} \\ & = v_1 + v_3 , \\ T v_2 & = \begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix} \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix} \\ & = \begin{bmatrix} 0 & 1 \\ 0 & 1 \end{bmatrix} \\ & = v_2 + v_4, \\ T v_3 & = v_1 + v_3 , \\ T v_4 & = v_2 + v_4 . \end{align*} The matrix for $$T$$ under this basis would then be $$A = \begin{bmatrix} 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 \\ 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 \end{bmatrix} .$$

Now for fun, let's reorder the basis, and consider the basis \begin{align*} w_1 & = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, & w_2 & = \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix} , \\ w_3 & = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}, & w_4 & = \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} \end{align*} This is how I interpreted your question about "rows" and "columns", I'm sorry if I misunderstood you. If we compute the operator on this basis, we'll get \begin{align*} T w_1 & = w_1 + w_2, & T w_2 & = w_1 + w_2, \\ T w_3 & = w_3 + w_4, & T w_4 & = w_3 + w_4 , \end{align*} yielding a matrix $$\begin{bmatrix} 1 & 1 & 0 & 0 \\ 1 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 1 & 1 \end{bmatrix} .$$

As far as computing eigenvalues, these matrices are both just as good as each other. They're what we call equivalent, meaning that there exists an invertible $$d \times d$$ matrix $$S$$ such that $$A = S B S^{-1}$$. In general, if we take some linear transformation $$T : V \to V$$, and we take any two bases of $$V$$, say $$\{ v_1, \ldots, v_d \}, \{ w_1, \ldots, w_d\}$$, and we write the matrix $$A$$ for $$T$$ based on $$\{ v_1, \ldots, v_d\}$$, and the matrix $$B$$ for $$T$$ based on $$\{ w_1, \ldots, w_d \}$$, then $$A$$ and $$B$$ will be equivalent. Any two equivalent matrices will have the same characteristic polynomials, and thus the same eigenvalues.

I also wanna comment that this is specifically the way you build these square matrices when $$T$$ maps from a vector space $$V$$ to itself. In general, we'll have linear transformations $$T : V \to W$$, where we obviously can't use one basis to compute $$T$$. Instead we'll need a basis for $$V$$ and a basis for $$W$$. For that, you might look at Section 1.4 of these notes.

• i edited the question, is it still the same? May 4, 2020 at 14:28
• @EladElmakias It cooperates with matrix multiplication. Suppose I had linear maps $S: V \to W, T: W \to X$, and I had bases $\{v_1, \ldots, v_m\}, \{w_1, \ldots, w_m\}, \{x_1, \ldots, x_k\}$ for the respective spaces. If I made a matrix $A$ for $S$ with those bases for $V, W$, and a matrix $B$ for $T$ with the bases for $W, X$, then the matrix of $T \circ S$ would be $BA$.