Tutorials › Linear Algebra › Encoding a Vector List as Matrix Columns

Linear Independence · Tutorial 165 of 1000

Encoding a Vector List as Matrix Columns

Learn to build a matrix from vector columns and read its matrix-vector product as a linear combination, including the special case where that combination equals zero.

Beginner 8 min read

What You'll Learn

  • Build a matrix whose columns are the vectors in an ordered list.
  • Match the matrix dimensions to the vector and coefficient dimensions.
  • Compute a matrix-vector product as a linear combination of columns.
  • Translate a zero combination into the homogeneous equation \(\mathbf{A}\mathbf{x}=\mathbf{0}\).
  • Keep track of coefficient positions, including coefficients equal to zero.
  • Avoid confusing a matrix with the same vectors written as rows.

From a Vector List to a Matrix

When a list of vectors is involved in a linear combination, its coefficients can be collected into one column vector. Placing the original vectors in the columns of a matrix makes the matrix-vector product perform exactly that combination. In particular, setting the product equal to zero records precisely the coefficient choices that make a combination of the list equal to the zero vector.

Work over \(\mathbb{R}\). Let \(m,k\in\mathbb{N}\), and let \(\mathbf{v}_1,\dots,\mathbf{v}_k\) be an ordered list of vectors in \(\mathbb{R}^m\). “Ordered list” matters: each position has its own coefficient, even if two vectors happen to be equal. For coefficients \(x_1,\dots,x_k\in\mathbb{R}\), write their coefficient vector as the column \(\mathbf{x}=(x_1,\dots,x_k)^\top\).

Definition: The matrix whose columns are the vectors \(\mathbf{v}_1,\dots,\mathbf{v}_k\) is \(\mathbf{A}=\begin{bmatrix}\mathbf{v}_1&\cdots&\mathbf{v}_k\end{bmatrix}\in\mathbb{R}^{m\times k}\). Its \(j\)th column is \(\mathbf{v}_j\). The coefficient vector \(\mathbf{x}\in\mathbb{R}^k\) records one scalar for each position in the list.

The dimensions keep track of the roles: \(\mathbf{A}\) has \(m\) rows because each vector has \(m\) coordinates, and \(k\) columns because the list has \(k\) positions. Thus \(\mathbf{A}\mathbf{x}\) is a vector in \(\mathbb{R}^m\), the same space as the original vectors. We now verify exactly what that product contains.

The Product Is the Corresponding Linear Combination

Theorem (Column-combination formula): If \(\mathbf{A}=\begin{bmatrix}\mathbf{v}_1&\cdots&\mathbf{v}_k\end{bmatrix}\) and \(\mathbf{x}=(x_1,\dots,x_k)^\top\), then \(\mathbf{A}\mathbf{x}=x_1\mathbf{v}_1+\cdots+x_k\mathbf{v}_k\).

Proof. Write the \(i\)th coordinate of column \(\mathbf{v}_j\) as \(v_{ij}\), where \(1\le i\le m\) and \(1\le j\le k\). By the definition of matrix multiplication, coordinate \(i\) of \(\mathbf{A}\mathbf{x}\) is \(\sum_{j=1}^k v_{ij}x_j\). Coordinate \(i\) of \(x_1\mathbf{v}_1+\cdots+x_k\mathbf{v}_k\) is also \(\sum_{j=1}^k x_jv_{ij}\). These coordinates agree for every \(i\), since real-number multiplication is commutative. Therefore the two vectors are equal. \(\square\)

This formula explains the construction: the coefficient \(x_j\) multiplies column \(j\), and adding the resulting vectors gives the product. A coefficient of zero simply contributes the zero vector; a negative coefficient reverses the direction of that column’s contribution. No column is discarded or rearranged when forming the product.

Worked Example: Computing a Column Combination

Let \(\mathbf{v}_1=(1,2,0)^\top\) and \(\mathbf{v}_2=(-2,1,3)^\top\). Form the column matrix and use \(\mathbf{x}=(2,-1)^\top\) to calculate the combination.

The columns give a \(3\times2\) matrix, while the two entries of \(\mathbf{x}\) match the two vectors:

$$ \mathbf{A}= \begin{bmatrix} 1&-2\\ 2&1\\ 0&3 \end{bmatrix}, \qquad \mathbf{x}= \begin{bmatrix} 2\\ -1 \end{bmatrix}. $$

Multiply each row of \(\mathbf{A}\) by the coefficient column. The three coordinates are \(1(2)+(-2)(-1)=4\), \(2(2)+1(-1)=3\), and \(0(2)+3(-1)=-3\). Hence

$$ \mathbf{A}\mathbf{x} = \begin{bmatrix} 1(2)+(-2)(-1)\\ 2(2)+1(-1)\\ 0(2)+3(-1) \end{bmatrix} = \begin{bmatrix} 4\\ 3\\ -3 \end{bmatrix}. $$

Check: the column-combination formula gives \(2\mathbf{v}_1-\mathbf{v}_2=(2,4,0)^\top-(-2,1,3)^\top=(4,3,-3)^\top\), matching the matrix product.

Why the Zero Equation Records Every Relation

A linear combination of the list is equal to zero exactly when the product formed from its coefficient vector is the zero vector. This is an equivalence: each coefficient choice gives one matrix-vector product, and each column vector of coefficients specifies one combination. The equation \(\mathbf{A}\mathbf{x}=\mathbf{0}\) therefore keeps all possible coefficient choices in view at once.

Theorem (Encoding zero combinations): For \(\mathbf{A}=\begin{bmatrix}\mathbf{v}_1&\cdots&\mathbf{v}_k\end{bmatrix}\) and any \(\mathbf{x}=(x_1,\dots,x_k)^\top\in\mathbb{R}^k\), the following statements are equivalent: (1) \(x_1\mathbf{v}_1+\cdots+x_k\mathbf{v}_k=\mathbf{0}\); (2) \(\mathbf{A}\mathbf{x}=\mathbf{0}\).

Proof. By the column-combination formula, \(\mathbf{A}\mathbf{x}=x_1\mathbf{v}_1+\cdots+x_k\mathbf{v}_k\). If the combination equals \(\mathbf{0}\), this equality gives \(\mathbf{A}\mathbf{x}=\mathbf{0}\). Conversely, if \(\mathbf{A}\mathbf{x}=\mathbf{0}\), the same equality says that the combination equals \(\mathbf{0}\). Both implications hold for every coefficient vector \(\mathbf{x}\), including \(\mathbf{x}=\mathbf{0}\). \(\square\)

Thus a solution of the homogeneous equation is not just a yes-or-no report. It is a specific coefficient vector, and its entries directly state how the original vectors combine. A nonzero solution supplies a nontrivial zero combination; the all-zero coefficient vector supplies the trivial one. The equation does not change the list or its vectors: it expresses the combination question in matrix notation.

Worked Example: Encoding a Nontrivial Zero Combination

Take the ordered list \(\mathbf{v}_1=(1,2,0)^\top\), \(\mathbf{v}_2=(0,1,1)^\top\), and \(\mathbf{v}_3=(1,3,1)^\top\). Put these vectors into a matrix and check the coefficient vector \(\mathbf{x}=(1,1,-1)^\top\).

The columns and coefficient positions give

$$ \mathbf{A}= \begin{bmatrix} 1&0&1\\ 2&1&3\\ 0&1&1 \end{bmatrix}, \qquad \mathbf{x}= \begin{bmatrix} 1\\ 1\\ -1 \end{bmatrix}. $$

Compute each row of the product: \(1(1)+0(1)+1(-1)=0\), \(2(1)+1(1)+3(-1)=0\), and \(0(1)+1(1)+1(-1)=0\). Therefore

$$ \mathbf{A}\mathbf{x} = \begin{bmatrix} 1+0-1\\ 2+1-3\\ 0+1-1 \end{bmatrix} = \begin{bmatrix} 0\\ 0\\ 0 \end{bmatrix}. $$

Check: the same coefficients give \(\mathbf{v}_1+\mathbf{v}_2-\mathbf{v}_3=(1+0-1,\;2+1-3,\;0+1-1)^\top=\mathbf{0}\). The equation \(\mathbf{A}\mathbf{x}=\mathbf{0}\) records exactly this relation.

The Matrix as a Rule on Coefficient Vectors

Once the columns are fixed, multiplication by \(\mathbf{A}\) turns every coefficient vector in \(\mathbb{R}^k\) into the corresponding combination in \(\mathbb{R}^m\). In other words, \(\mathbf{A}\) defines a function \(T_{\mathbf{A}}:\mathbb{R}^k\to\mathbb{R}^m\) by \(T_{\mathbf{A}}(\mathbf{x})=\mathbf{A}\mathbf{x}\). The matrix stores the input-output rule in its columns.

Proposition: The function \(T_{\mathbf{A}}\) is linear: for all \(\mathbf{x},\mathbf{y}\in\mathbb{R}^k\) and all \(a,b\in\mathbb{R}\), \(T_{\mathbf{A}}(a\mathbf{x}+b\mathbf{y})=aT_{\mathbf{A}}(\mathbf{x})+bT_{\mathbf{A}}(\mathbf{y})\).

Proof. Write \(\mathbf{x}=(x_1,\dots,x_k)^\top\) and \(\mathbf{y}=(y_1,\dots,y_k)^\top\). The \(j\)th entry of \(a\mathbf{x}+b\mathbf{y}\) is \(ax_j+by_j\). Applying the column-combination formula gives \(T_{\mathbf{A}}(a\mathbf{x}+b\mathbf{y})=\sum_{j=1}^k(ax_j+by_j)\mathbf{v}_j\). Distributing each scalar and grouping the sums gives \(a\sum_{j=1}^k x_j\mathbf{v}_j+b\sum_{j=1}^k y_j\mathbf{v}_j\). Applying the formula again, this is \(aT_{\mathbf{A}}(\mathbf{x})+bT_{\mathbf{A}}(\mathbf{y})\), as required. \(\square\)

The zero equation asks which coefficient vectors this rule sends to the zero vector. The rule applies to all coefficient vectors, not only ones that produce zero. If a target \(\mathbf{b}\in\mathbb{R}^m\) is used instead, then \(\mathbf{A}\mathbf{x}=\mathbf{b}\) says that the columns combine to give \(\mathbf{b}\). The zero case is the same column-combination rule with target \(\mathbf{0}\).

Worked Example: Four Columns and Four Coefficients

Let \(\mathbf{v}_1=(1,0)^\top\), \(\mathbf{v}_2=(0,1)^\top\), \(\mathbf{v}_3=(1,1)^\top\), and \(\mathbf{v}_4=(2,-1)^\top\). Encode the combination with coefficients \(2,-1,0,-1\), in that order.

The matrix has two rows because the vectors lie in \(\mathbb{R}^2\), and four columns because the list has four positions:

$$ \mathbf{A}= \begin{bmatrix} 1&0&1&2\\ 0&1&1&-1 \end{bmatrix}, \qquad \mathbf{x}= \begin{bmatrix} 2\\ -1\\ 0\\ -1 \end{bmatrix}. $$

The first output coordinate is \(1(2)+0(-1)+1(0)+2(-1)=2+0+0-2=0\). The second is \(0(2)+1(-1)+1(0)+(-1)(-1)=0-1+0+1=0\). Thus

$$ \mathbf{A}\mathbf{x} = \begin{bmatrix} 2+0+0-2\\ 0-1+0+1 \end{bmatrix} = \begin{bmatrix} 0\\ 0 \end{bmatrix}. $$

Check: the original combination is \(2\mathbf{v}_1-\mathbf{v}_2+0\mathbf{v}_3-\mathbf{v}_4=(2,0)^\top-(0,1)^\top-(2,-1)^\top=(0,0)^\top\). The zero in the third coefficient means that column contributes nothing, but its position is still part of the four-entry coefficient vector.

A Common Mistake: Placing the Vectors as Rows

To encode a list for the product \(\mathbf{A}\mathbf{x}\), the vectors must be columns. A tempting but incorrect construction is to place the coordinates of each vector across a row and then multiply that matrix by the coefficient column. That product generally combines rows instead of the given vectors.

For instance, let \(\mathbf{v}_1=(1,2)^\top\), \(\mathbf{v}_2=(3,4)^\top\), and \(\mathbf{x}=(2,-1)^\top\). The correct column matrix is \(\mathbf{A}=\begin{bmatrix}1&3\\2&4\end{bmatrix}\), so \(\mathbf{A}\mathbf{x}=(1(2)+3(-1),\;2(2)+4(-1))^\top=(-1,0)^\top\). Directly checking gives \(2\mathbf{v}_1-\mathbf{v}_2=(2,4)^\top-(3,4)^\top=(-1,0)^\top\).

The wrong row arrangement would be \(\begin{bmatrix}1&2\\3&4\end{bmatrix}\). Multiplying this by the same \(\mathbf{x}\) gives \((2-2,\;6-4)^\top=(0,2)^\top\), which is not \(2\mathbf{v}_1-\mathbf{v}_2\). The correction is to place each vector vertically as a column before multiplying by its coefficient vector.

Keep the roles distinct: the ordered list supplies the columns, the coefficient vector supplies one scalar per column, and the product is the resulting linear combination. With this setup, \(\mathbf{A}\mathbf{x}=\mathbf{0}\) means exactly that the chosen coefficients produce the zero vector; the equation itself neither rearranges the list nor changes the meaning of its entries.

Check Your Understanding

For each question, keep the vectors in the stated order and match each coefficient to its column.

  1. For \(\mathbf{v}_1=(2,-1)^\top\) and \(\mathbf{v}_2=(1,3)^\top\), write the column matrix and compute the product with \(\mathbf{x}=(1,2)^\top\).
  2. Write \(\mathbf{A}\) and \(\mathbf{x}\) for the list \((1,0,2)^\top,(0,1,-1)^\top,(2,1,3)^\top\) and coefficients \(1,-2,0\).
  3. Explain in words what \(\mathbf{A}\mathbf{x}=\mathbf{0}\) says about the columns of \(\mathbf{A}\) and the entries of \(\mathbf{x}\).
  4. For \(\mathbf{A}=\begin{bmatrix}1&2\\0&-1\end{bmatrix}\), compute \(\mathbf{A}\mathbf{x}\) when \(\mathbf{x}=(3,1)^\top\), and check the result using the columns.
  5. Why does a list of \(k\) vectors in \(\mathbb{R}^m\) produce an \(m\times k\) matrix and a \(k\)-entry coefficient vector?

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon