The Columns as Building Blocks
A matrix-vector product can be viewed as a recipe for combining the columns of a matrix. Each entry of the vector tells us how much of the corresponding column to use. This perspective makes the product more than a list of arithmetic operations: it shows exactly how the vector’s coefficients determine a weighted sum of columns.
Let \(m,n\in\mathbb{N}\), let \(\mathbf{A}\in\mathbb{R}^{m\times n}\), and let \(\mathbf{x}\in\mathbb{R}^n\). Write the columns of \(\mathbf{A}\) as \(\mathbf{a}_1,\dots,\mathbf{a}_n\), and write the entries of \(\mathbf{x}\) as \(x_1,\dots,x_n\). Each column is a vector in \(\mathbb{R}^m\), so the weighted sum \(x_1\mathbf{a}_1+\cdots+x_n\mathbf{a}_n\) is also in \(\mathbb{R}^m\).
For computing by columns, the theorem gives a direct procedure: identify every column, multiply each column by the entry of \(\mathbf{x}\) in the same position, then add the resulting vectors. The \(j\)th entry of \(\mathbf{x}\) must be paired with the \(j\)th column—not with a row, and not with a column chosen because its entries look similar. There is one coefficient-column pair for each of the \(n\) columns.
The product is an \(m\)-entry vector because each column has \(m\) entries and adding the scaled columns keeps that length. The input \(\mathbf{x}\) has \(n\) entries because it supplies one coefficient for each column. These observations are useful as a quick setup check, but the calculation itself is the weighted sum.
A Small Result About the Coefficients
The column formula also makes some basic cases precise. Let \(\mathbf{e}_j\in\mathbb{R}^n\) denote the standard basis vector whose \(j\)th entry is \(1\) and whose other entries are \(0\). Using \(\mathbf{e}_j\) as the input selects one column.
Proof. By the column formula, \(\mathbf{A}\mathbf{0}=0\mathbf{a}_1+\cdots+0\mathbf{a}_n=\mathbf{0}\), since every scalar multiple \(0\mathbf{a}_i\) is the zero vector and a sum of zero vectors is zero. For \(\mathbf{e}_j\), its \(j\)th entry is \(1\) and all its other entries are \(0\). Thus the column formula gives \(\mathbf{A}\mathbf{e}_j=0\mathbf{a}_1+\cdots+0\mathbf{a}_{j-1}+1\mathbf{a}_j+0\mathbf{a}_{j+1}+\cdots+0\mathbf{a}_n=\mathbf{a}_j\). \(\square\)
Another useful observation describes what happens when just one coefficient changes. It does not require calculating the entire product again.
Proof. Apply the column formula to each product and subtract: $$ \mathbf{A}\mathbf{x}-\mathbf{A}\mathbf{y} =(x_1-y_1)\mathbf{a}_1+\cdots+(x_n-y_n)\mathbf{a}_n. $$ For every \(i\ne j\), the agreement of \(\mathbf{x}\) and \(\mathbf{y}\) in entry \(i\) gives \(x_i-y_i=0\). All those terms are zero vectors, leaving only \((x_j-y_j)\mathbf{a}_j\), as claimed. \(\square\)
Computing the Weighted Sum
Write the columns of \(\mathbf{A}\) as \(\mathbf{a}_1,\dots,\mathbf{a}_n\), in their original order.
Match \(x_j\) with \(\mathbf{a}_j\) for every \(j\), including coefficients that are zero or negative.
Compute \(x_j\mathbf{a}_j\) for each column, then add the resulting vectors component by component.
Recombine the scaled columns in order and verify that each component of their sum matches the stated answer.
This procedure gives the right result because the column formula states that the product is exactly that weighted sum. It is not necessary for \(\mathbf{A}\) to be square, and the columns do not need to be different. A zero coefficient contributes a zero vector; a negative coefficient reverses the direction of its column before scaling; and a fractional coefficient scales the column by that fraction.
Worked Example: Two Columns and a Negative Coefficient
Compute \(\mathbf{A}\mathbf{x}\) for $$ \mathbf{A}=\begin{bmatrix}1&-2\\3&0\\-1&4\end{bmatrix}, \qquad \mathbf{x}=\begin{bmatrix}2\\-1\end{bmatrix}. $$
The columns are \(\mathbf{a}_1=(1,3,-1)^{\top}\) and \(\mathbf{a}_2=(-2,0,4)^{\top}\). The matching coefficients are \(2\) and \(-1\), so the column formula gives $$ \mathbf{A}\mathbf{x}=2\mathbf{a}_1-\mathbf{a}_2. $$
Scale the first column and the second column: $$ 2\mathbf{a}_1=(2,6,-2)^{\top}, \qquad -\mathbf{a}_2=(2,0,-4)^{\top}. $$
Now add the results component by component: $$ (2,6,-2)^{\top}+(2,0,-4)^{\top} =(2+2,\;6+0,\;-2-4)^{\top} =(4,6,-6)^{\top}. $$
Check: Using the original columns, \(2(1,3,-1)^{\top}+(-1)(-2,0,4)^{\top}=(2,6,-2)^{\top}+(2,0,-4)^{\top}=(4,6,-6)^{\top}\), as stated.
Worked Example: A Zero Coefficient and a Negative Coefficient
Compute \(\mathbf{A}\mathbf{x}\) for $$ \mathbf{A}=\begin{bmatrix}1&-1&3\\2&4&-1\end{bmatrix}, \qquad \mathbf{x}=\begin{bmatrix}0\\3\\-2\end{bmatrix}. $$
The columns are \(\mathbf{a}_1=(1,2)^{\top}\), \(\mathbf{a}_2=(-1,4)^{\top}\), and \(\mathbf{a}_3=(3,-1)^{\top}\). The coefficients are \(0,3,-2\), so $$ \mathbf{A}\mathbf{x}=0\mathbf{a}_1+3\mathbf{a}_2-2\mathbf{a}_3. $$
The first term is the zero vector. The other two terms are $$ 3\mathbf{a}_2=(-3,12)^{\top}, \qquad -2\mathbf{a}_3=(-6,2)^{\top}. $$
Adding all three terms gives $$ (0,0)^{\top}+(-3,12)^{\top}+(-6,2)^{\top} =(-3-6,\;12+2)^{\top} =(-9,14)^{\top}. $$
Check: The second entry is \(0\cdot2+3\cdot4+(-2)(-1)=0+12+2=14\), and the first is \(0\cdot1+3(-1)+(-2)3=0-3-6=-9\). These are the two entries of the computed sum.
Fractions and Repeated Columns
Worked Example: A Fractional Coefficient
Compute \(\mathbf{A}\mathbf{x}\) for $$ \mathbf{A}=\begin{bmatrix}1&2&-1\\0&-1&3\\2&1&0\end{bmatrix}, \qquad \mathbf{x}=\begin{bmatrix}\tfrac12\\-2\\3\end{bmatrix}. $$
Read the columns in order: $$ \mathbf{a}_1=(1,0,2)^{\top},\qquad \mathbf{a}_2=(2,-1,1)^{\top},\qquad \mathbf{a}_3=(-1,3,0)^{\top}. $$ The product is \(\tfrac12\mathbf{a}_1-2\mathbf{a}_2+3\mathbf{a}_3\). Scale each column: $$ \tfrac12\mathbf{a}_1=(\tfrac12,0,1)^{\top},\qquad -2\mathbf{a}_2=(-4,2,-2)^{\top},\qquad 3\mathbf{a}_3=(-3,9,0)^{\top}. $$
Add the first entries, then the second entries, then the third entries: $$ \left(\tfrac12-4-3,\;0+2+9,\;1-2+0\right)^{\top} =\left(-\tfrac{13}{2},11,-1\right)^{\top}. $$
Check: Recombining the scaled columns gives first entry \(\tfrac12-4-3=-\tfrac{13}{2}\), second entry \(0+2+9=11\), and third entry \(1-2+0=-1\). Each agrees with the result.
Worked Example: Combining Coefficients on Repeated Columns
Compute \(\mathbf{A}\mathbf{x}\) when $$ \mathbf{A}=\begin{bmatrix}2&2&0\\1&1&-3\end{bmatrix}, \qquad \mathbf{x}=\begin{bmatrix}4\\-1\\2\end{bmatrix}. $$
Here \(\mathbf{a}_1=(2,1)^{\top}\), \(\mathbf{a}_2=(2,1)^{\top}\), and \(\mathbf{a}_3=(0,-3)^{\top}\). The first two columns are equal, but they still have separate positions and separate coefficients. Apply the formula: $$ \mathbf{A}\mathbf{x}=4\mathbf{a}_1-\mathbf{a}_2+2\mathbf{a}_3. $$
Scale each column: $$ 4\mathbf{a}_1=(8,4)^{\top},\qquad -\mathbf{a}_2=(-2,-1)^{\top},\qquad 2\mathbf{a}_3=(0,-6)^{\top}. $$ Adding gives $$ (8,4)^{\top}+(-2,-1)^{\top}+(0,-6)^{\top} =(8-2+0,\;4-1-6)^{\top} =(6,-3)^{\top}. $$
Check: Since \(\mathbf{a}_1=\mathbf{a}_2\), the first two terms combine to \((4-1)\mathbf{a}_1=3(2,1)^{\top}=(6,3)^{\top}\). Adding \(2\mathbf{a}_3=(0,-6)^{\top}\) gives \((6,3-6)^{\top}=(6,-3)^{\top}\), agreeing with the result.
Common Mistakes and a Reliable Check
Pairing a coefficient with the wrong column. In the last example, the second coefficient is \(-1\), and it belongs to the second column \((2,1)^{\top}\). A mistaken pairing might use it on the third column and write \(4\mathbf{a}_1+2\mathbf{a}_2-\mathbf{a}_3\). This incorrect sum is \((8,4)^{\top}+(4,2)^{\top}+(0,3)^{\top}=(12,9)^{\top}\), not \((6,-3)^{\top}\). The correction is to preserve the index pairing: \(x_1\) multiplies \(\mathbf{a}_1\), \(x_2\) multiplies \(\mathbf{a}_2\), and \(x_3\) multiplies \(\mathbf{a}_3\).
Dropping a minus sign. A negative coefficient scales every entry of its column by a negative number. For instance, \(-2(3,-1)^{\top}=(-6,2)^{\top}\), not \((-6,-2)^{\top}\). It is safest to write the scaled column as its own vector before adding.
Ignoring a zero coefficient’s position. A zero coefficient removes that column’s contribution, but it does not change the pairing of later coefficients. In the second example, the coefficient \(0\) removes \(\mathbf{a}_1\); the coefficient \(3\) still multiplies \(\mathbf{a}_2\), and \(-2\) still multiplies \(\mathbf{a}_3\).
A reliable final check is to list the products \(x_j\mathbf{a}_j\) again and add corresponding entries. This catches sign errors and missed columns while keeping the calculation in the column-based form. If a column is repeated, combining its coefficients can provide an additional check, but the original coefficient-column pairs should remain visible until the scaling has been done.
Why the Column View Is Useful
The column formula exposes the role of the input vector: it specifies a particular weighted combination of the columns. If one coefficient is zero, its column has no effect on that product. If a coefficient changes, the corresponding column is the contribution that changes, as the proposition above states. If two columns are equal, their contributions can be combined by adding their coefficients. These observations are useful when interpreting a matrix-vector product as well as when calculating it.
For any matrix with \(n\) columns, this method uses exactly \(n\) coefficients and produces a vector with the same number of entries as each column. Keeping the columns in order, scaling each one by its matching entry, and checking the resulting sum gives a consistent way to compute \(\mathbf{A}\mathbf{x}\), whether the matrix is square or rectangular.
Check Your Understanding
For each calculation, identify the columns first and keep the coefficients paired with their positions.
- Compute \(\mathbf{A}\mathbf{x}\) for \(\mathbf{A}=\begin{bmatrix}1&3\\-2&0\end{bmatrix}\) and \(\mathbf{x}=\begin{bmatrix}-1\\2\end{bmatrix}\). Show the two scaled columns.
- For \(\mathbf{A}=\begin{bmatrix}2&0&-1\\1&3&4\end{bmatrix}\) and \(\mathbf{x}=(0,-2,1)^{\top}\), which column contributes nothing, and what is the product?
- State \(\mathbf{A}\mathbf{e}_2\) in terms of the columns of \(\mathbf{A}\), and explain which entries of \(\mathbf{e}_2\) make that happen.
- If \(\mathbf{x}\) and \(\mathbf{y}\) differ only in entry \(j\), express \(\mathbf{A}\mathbf{x}-\mathbf{A}\mathbf{y}\) using the \(j\)th column.
- Suppose columns 1 and 3 of \(\mathbf{A}\) are equal. How can their two contributions to \(\mathbf{A}\mathbf{x}\) be combined?