Ma · Mathematics

How to Find a Basis for the Image of a Matrix

Published By the 9to5Science editorial team

At a glance

  1. 1. Write the columns

    The image of a matrix is the span of its columns.

  2. 2. Row-reduce

    Use row operations to locate the pivot columns.

  3. 3. Keep original columns

    Take the corresponding columns from the original matrix, not the reduced matrix.

  4. 4. Check independence

    The selected columns form a basis for the image.

Advertisement

Try it: Matrix calculator

The image of a matrix is the set of all output vectors the matrix can produce. To find a basis for it, identify which columns are independent of the others. The standard method is to row-reduce the matrix, locate its pivot columns, and select the columns in those positions from the original matrix.

This method works because elementary row operations preserve which columns are linearly independent, and hence preserve the pivot-column positions. But row operations change the actual column vectors, so the basis vectors must come from the original matrix.

What is the image of a matrix?

For an m×nm \times n matrix AA, multiplication by AA defines a linear map from RnR^n to RmR^m. Its image is

im⁡(A)={Ax:x∈Rn}.\operatorname{im}(A)=\{Ax:x\in R^n\}.

Writing AA by its columns, A=[a1 a2 ⋯ an]A=[a_1\ a_2\ \cdots\ a_n], shows that every output is a linear combination of those columns:

Ax=x1a1+x2a2+⋯+xnan.Ax=x_1a_1+x_2a_2+\cdots+x_na_n.

Therefore, the image is exactly the column space, span⁡{a1,…,an}\operatorname{span}\{a_1,\ldots,a_n\}. A basis for the image is a linearly independent selection of columns that still spans all the columns.

The pivot-column method

  1. Row-reduce AA to echelon form or reduced row-echelon form.
  2. Mark the columns containing leading entries (pivots) in the reduced matrix.
  3. Select the columns in those same positions from the original matrix.
  4. Those selected columns form a basis for im⁡(A)\operatorname{im}(A).

The number of pivot columns is the rank of AA, so it also gives the dimension of the image.

Worked example

Find a basis for the image of

A=[120124131212].A=\begin{bmatrix} 1&2&0&1\\ 2&4&1&3\\ 1&2&1&2 \end{bmatrix}.

Row-reduce. First replace row 2 by row 2 minus twice row 1, and row 3 by row 3 minus row 1:

[120124131212]⟶[120100110011].\begin{bmatrix} 1&2&0&1\\ 2&4&1&3\\ 1&2&1&2 \end{bmatrix} \longrightarrow \begin{bmatrix} 1&2&0&1\\ 0&0&1&1\\ 0&0&1&1 \end{bmatrix}.

Subtract the new row 2 from row 3 to obtain

[120100110000].\begin{bmatrix} 1&2&0&1\\ 0&0&1&1\\ 0&0&0&0 \end{bmatrix}.

The pivots are in columns 1 and 3. Now take columns 1 and 3 from the original matrix:

a1=[121],a3=[011].a_1=\begin{bmatrix}1\\2\\1\end{bmatrix},\qquad a_3=\begin{bmatrix}0\\1\\1\end{bmatrix}.

Thus one basis for the image is

{[121],[011]}.\left\{\begin{bmatrix}1\\2\\1\end{bmatrix}, \begin{bmatrix}0\\1\\1\end{bmatrix}\right\}.

You can verify that the other original columns are combinations of these: a2=2a1a_2=2a_1 and a4=a1+a3a_4=a_1+a_3. So the two selected columns span every column. They are independent because the reduced matrix has a pivot in each of their positions.

Why use the original columns?

Row operations preserve the solutions to relationships of the form Ax=0Ax=0. In particular, they preserve which sets of columns are independent. That is why row reduction correctly reveals the pivot positions.

However, a row operation changes the entries in the columns themselves. The columns of the row-reduced matrix generally are not the original vectors in the image of AA. For the example above, the first and third columns of the reduced matrix are not the two vectors listed as a basis; the basis comes from columns 1 and 3 of AA.

Common mistakes

  • Using columns from the reduced matrix. Use the reduced matrix to find pivot positions, but use the original matrix for the basis vectors.
  • Confusing row space with column space. The nonzero rows of an echelon form give a basis for the row space. They do not generally give a basis for the image, which is the column space.
  • Keeping every column. The columns span the image, but they may be dependent. Keep only the pivot columns.
  • Assuming there must be a nonzero basis vector. If AA is the zero matrix, its image is the zero subspace. Its basis is the empty set, and its dimension is zero.

A quick check

If your selected columns are aj1,…,ajra_{j_1},\ldots,a_{j_r}, check that you selected one original column for each pivot and that no other columns are needed to span the column space. The number rr should equal the number of pivots and the rank of AA. A disagreement usually means a pivot position was misread or a reduced column was used by mistake.

References

  1. Linear Algebra and Its Applications — David C. Lay, Steven R. Lay, and Judi J. McDonald

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.