Basic understanding of finding matrix corresponding to linear transformation

linear algebralinear-transformationsmatrices

In linear algebra, to convert the linear transformation or operator into matrix form, it's not hard, get the standard basis of domain and substitute in the transformation and write the image of the standard basis as a linear combination of standard basis of codomain and finally get the constants (c i's) and write that in column wise in the matrix format, we will get the matrix format of the linear transformation with respect to the standard basis of the domain and codomain. My question here is why can't we arrange constants row wise? Why it is fixed to arrange constants always column wise?

Thank you so much for your response

Best Answer

This is because of the way that matrix multiplication is defined. Recall that if $A = (A_{ij}) \in K^{n\times m}$ and $B = (B_{ij}) \in K^{m\times p}$ are matrices with entries in the field $K$ (say $\mathbb R$ or $\mathbb C$ for example) then we define the product of the matrices $AB$ as an $n \times p$ matrix whose entry $ij$ is $$ (AB)_{ij} = \sum_{k = 0}^mA_{ik}B_{kj}$$

In the particular case where $p = 1$ we observe that the matrices $B$ and $AB$ are simply columns of numbers in $K$. In particular we can identify these columns with elements in $K^p$ and $K^n$ respectively. This defines a map

$$ f : K^m \to K^n : x \mapsto Ax$$ where view $x$ as an $m\times 1$ matrix. Moreover this map $f$ is a linear map !


Let $V$ be an $m$ dimensional $K$-vector space and $W$ be an $n$ dimensional $K$-vector space. You know that by fixing a basis $e_1,...,e_m$ for $V$ and a basis $f_1,...,f_n$ for $W$ we have linear isomorphisms $\phi_V : V \to K^m$ and $\phi_W : W \to K^n$ which map each point to its coordinates in that basis. That is

$$ \phi_V \left(\sum_{i = 1}^m v_ie_i \right) = (v_1,...,v_m)$$ $$ \phi_W \left(\sum_{j = 1}^n w_jf_j \right) = (w_1,...,w_n) $$

Suppose that there is a linear map $T : V\to W$. Then from this we obtain a a map $\overline T$ which maps the coordinates of $v \in V$ to the coordinates of $T(v) \in W$. This map is a linear map since it is the composition of linear maps $$ K^m \xrightarrow{\phi_V^{-1}} V \xrightarrow{ T} W \xrightarrow{ \phi_W}K^n.$$


The question now is : Is there a matrix $[T]$ such that the linear map

$$ f : K^m \to K^n : \begin{bmatrix} v_1 \\ v_2 \\ ... \\ v_m \end{bmatrix} \mapsto [T]\begin{bmatrix} v_1 \\ v_2 \\ ... \\ v_m \end{bmatrix}$$ is equal to $\overline T$.

The answer is ... yes ! Recall that two linear maps are equal if and only if they coincide on a basis and that $\tilde e_1 = (1,0,...,0), \tilde e_2= (0,1,0,...,0),..., \tilde e_m(0,...0,1)$ is a canonical basis for $K^m$. Recall also that by definition of the matrix multiplication for any matrix $A$ we have $$ A\tilde e_i = \text{column } i \text{ of the matrix } A.$$

Therefore for $\overline T$ and $f$ to be equal we need to put the coordinates of $T(e_i)$ in the $i$-th column of $[T]$.


TLDR : The whole idea of a matrix $A$ associated to a linear map $T$ is therefore to find a matrix which verifies "$Av = T(v)$"


As mentioned in the comments it is a matter of convention that we multiply our column vectors by matrices on the left. This convention is taken to keep in line with the convention of applying functions on the lefti.e. we write $T(v)$ for the image of $v$ under $T$. However as you might have noticed you could write the coordinates of a vector $v \in V$ in a line as a $1 \times m$ vector and try to find a $ m \times n$ matrix $A$ such that $$ vA = \text{ coordinates of } T(v)$$.

In particular since $$\tilde e_iA = \text{ line } i \text{ of the matrix A}$$ this would lead to us arranging the coordinates of $T(e_i)$ in lines instead of in columns. Usually we arrange by columns instead of by rows so that the order of the matrices matches with the order of the functions. In fact in the textbooks where they arrange by rows it is not uncommon to see the notation $xf$ for $f(x)$ in order to keep the correspondence between matrices and linear maps.

An example of book where they arrange by lines instead of by columns would be 'Representations and characters of groups', second edition by Gordon James and Martin Liebeck. Specifically the second chapter which gives an overview of the basics of linear algebra.

Related Question