Basis Lab

Answers · The mathematics underneath

Why do the columns of a matrix tell you where the basis vectors go?

In shortA matrix lists where each coordinate axis lands, one destination per column, because feeding in a single axis picks out exactly that column.

The columns are where the axes land because a matrix acts on a vector by mixing its columns, and a basis vector asks for one column with amount one and all the others with amount zero. In symbols, the jj-th column of AA is AejA\mathbf{e}_j, where ej\mathbf{e}_j is the vector with a 1 in position jj and 0 elsewhere.

Ax=x1a1+x2a2+⋯+xnanA\mathbf{x} = x_1 \mathbf{a}_1 + x_2 \mathbf{a}_2 + \cdots + x_n \mathbf{a}_n

One column, one axis

Take x=ej\mathbf{x}=\mathbf{e}_j. Its coordinates are xj=1x_j=1 and all other xi=0x_i=0, so the mixture above collapses: every term with a zero amount disappears and the survivor is aj\mathbf{a}_j. That is the whole reason the columns are destinations. The first column is where the first axis goes, the second column is where the second axis goes, and the same sentence continues for as many input axes as there are columns.

Aej=aj,Ae1=a1,Ae2=a2,…A\mathbf{e}_j = \mathbf{a}_j, \qquad A\mathbf{e}_1 = \mathbf{a}_1, \quad A\mathbf{e}_2 = \mathbf{a}_2, \quad \ldots

Let A=(2−113)A = \begin{pmatrix}2&-1\\1&3\end{pmatrix}. Its first column is (2,1)(2,1) and its second column is (−1,3)(-1,3). By hand, Ae1A\mathbf{e}_1 has first coordinate 2⋅1+(−1)⋅0=22\cdot 1 + (-1)\cdot 0 = 2 and second coordinate 1⋅1+3⋅0=11\cdot 1 + 3\cdot 0 = 1, while Ae2A\mathbf{e}_2 has first coordinate 2⋅0+(−1)⋅1=−12\cdot 0 + (-1)\cdot 1 = -1 and second coordinate 1⋅0+3⋅1=31\cdot 0 + 3\cdot 1 = 3.

Ae1=(2−113)(10)=(21)=a1,Ae2=(2−113)(01)=(−13)=a2A\mathbf{e}_1 = \begin{pmatrix}2&-1\\1&3\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix} = \begin{pmatrix}2\\1\end{pmatrix} = \mathbf{a}_1, \qquad A\mathbf{e}_2 = \begin{pmatrix}2&-1\\1&3\end{pmatrix}\begin{pmatrix}0\\1\end{pmatrix} = \begin{pmatrix}-1\\3\end{pmatrix} = \mathbf{a}_2

For a general input x=(x1,x2)\mathbf{x}=(x_1,x_2), the same arithmetic gives Ax=(2x1−x2, x1+3x2)A\mathbf{x}=(2x_1-x_2,\,x_1+3x_2). Written as a mixture, that is Ax=x1(2,1)+x2(−1,3)A\mathbf{x}=x_1(2,1)+x_2(-1,3). The input coordinates are amounts, not instructions to walk the rows. If x1=3x_1=3 and x2=2x_2=2, the output is 3(2,1)+2(−1,3)=(6,3)+(−2,6)=(4,9)3(2,1)+2(-1,3)=(6,3)+(-2,6)=(4,9); the row arithmetic gives first coordinate 2⋅3−2=42\cdot 3-2=4 and second coordinate 3+6=93+6=9.

Construction is the same statement in reverse. If a map is meant to send the first axis to (3,1)(3,1) and the second to (−2,4)(-2,4), those two vectors are the columns, so the matrix is (3−214)\begin{pmatrix}3&-2\\1&4\end{pmatrix}. Feed in e1\mathbf{e}_1 and the mixture has only the first column; feed in e2\mathbf{e}_2 and it has only the second. The rows of that matrix, (3,−2)(3,-2) and (1,4)(1,4), are then the recipes for the two output coordinates: first 3x1−2x23x_1-2x_2, second x1+4x2x_1+4x_2.

Why the row reading misleads

Reading a matrix row by row is not false. The first row pairs with x\mathbf{x} to manufacture the first output coordinate: 2x1−x22x_1-x_2. The second row manufactures x1+3x2x_1+3x_2. But a row is not a destination. If you read rows only, the image of e1\mathbf{e}_1 is split across two rows, 2 in the first and 1 in the second, and you have to know to gather those entries down a column before you see the point (2,1)(2,1). The natural guess is that a matrix stores a set of rules about output coordinates, so the rows look primary; the better description is that it stores a short list of destination vectors, and the rows are what you see when you ask how each output coordinate is assembled.

Shape and other bases

The shape is part of the statement. An mm by nn matrix has nn columns, one for each input axis, and mm rows, one for each coordinate of a destination, so it maps Rn\mathbb{R}^n to Rm\mathbb{R}^m. For A=(10201−1)A=\begin{pmatrix}1&0&2\\0&1&-1\end{pmatrix} there are three columns and two rows. Feeding in the third axis gives the third column (2,−1)(2,-1), so the third axis lands at (2,−1)(2,-1) in the plane. The row count is 2 because destinations live in R2\mathbb{R}^2; the column count is 3 because there are three input axes.

A=(10201−1),Ae3=(10201−1)(001)=(2−1)A = \begin{pmatrix}1&0&2\\0&1&-1\end{pmatrix}, \qquad A\mathbf{e}_3 = \begin{pmatrix}1&0&2\\0&1&-1\end{pmatrix}\begin{pmatrix}0\\0\\1\end{pmatrix} = \begin{pmatrix}2\\-1\end{pmatrix}

The statement is about a fixed choice of axes. If you change the input basis, the jj-th column still records where the jj-th basis vector goes, but the entries are now coordinates of that destination in the chosen output basis. With a different input basis, column jj belongs to that basis vector, not to the old ej\mathbf{e}_j. If the map is affine, with a translation added, the columns give only the linear part; the translation is a separate vector. A single matrix cannot represent a non-linear map at all, so the column statement does not apply without qualification.

Worth keeping

  • The jth column of a matrix is the image of the jth basis vector.
  • Multiplying a matrix by a vector mixes its columns using the vector's entries as amounts.
  • Reading by rows gives output coordinates one at a time; reading by columns gives the destinations of the axes.

Where this goes next

This question is one step of Matrices as Maps, a course that works through its subject from the beginning. The page that teaches this part of it is Reading a Matrix Off Its Columns, and it reads the whole way through whether or not you have an account.

What an account changes is the practice: problems standing under every idea, marked with a reason rather than a tick, in a copy of the course that is yours.

Read that pageThe whole course

Other questions people ask about this

  1. Why do eigenvectors stay in the same direction after a transformation?An eigenvector is defined as a vector that a matrix sends to a scaled copy of itself, so staying on its line is the condition that selects it, not a property of ordinary vectors.
  2. What's the difference between singular values and eigenvalues?Singular values measure stretching along perpendicular directions and exist for every matrix; eigenvalues measure directions a square matrix leaves on their own line.
  3. Why doesn't matrix multiplication work like regular multiplication where order doesn't matter?Matrix multiplication means doing one transformation and then another, and reversing that order usually lands a vector somewhere else.
  4. What does it mean when a matrix doesn't have full rank?A matrix lacks full rank when it cannot reach as many independent directions as its shape allows, so it loses information and cannot be reversed.
  5. What is the difference between variance and standard deviation?They measure the same spread: variance is the average squared distance from the mean, standard deviation is its square root, so you report the standard deviation and calculate with the variance.
  6. How do you make a vague claim precise enough to tell whether it's true?Fix what is being talked about, what is asserted, which cases are covered and the cut-off, then name an observation that would prove it false.

Read alongside