You have now seen the same problem in two costumes: a system of equations and a vector equation. A third notation, the matrix equation Ax=b, packages both into a single compact statement. It also reframes the question "does this system have a solution?" as "which vectors b can the matrix A produce?"
The product of a matrix and a vector
Definition
Matrix-vector product
If A is an m×n matrix with columns a1,…,an, and x is a vector in Rn, then
Ax is defined only when the number of columns of A equals the number of entries in x, and the result lies in Rm.
So Ax is a linear combination of the columns of A, with the entries of x as weights. For example,
[102−5−13]437=4[10]+3[2−5]+7[−13]=[36].
For hand computation there is a faster way to organize the same arithmetic. Entry i of Ax collects the i-th entry of each column times its weight, which is the sum of products of row i of A with the entries of x:
Row-vector rule
The i-th entry of Ax is ai1x1+ai2x2+⋯+ainxn, the sum of the products of the entries in row i of A with the corresponding entries of x.
In the example, row 1 gives 1(4)+2(3)−1(7)=3 and row 2 gives 0(4)−5(3)+3(7)=6. Keep both viewpoints: the row rule for computing, the column rule for thinking.
Three equivalent formulations
With the definition in hand, the system
x1+2x2−x3−5x2+3x3=4=1
is the vector equation x1[10]+x2[2−5]+x3[−13]=[41], which is the matrix equation
[102−5−13]x1x2x3=[41].
One problem, three notations
If A is m×n with columns a1,…,an and b is in Rm, then the matrix equation Ax=b, the vector equation x1a1+⋯+xnan=b, and the linear system with augmented matrix [a1⋯an∣b] all have the same solution set.
Consequently, Ax=b has a solution if and only if b is a linear combination of the columns of A.
Worked example: Solving a matrix equation
Solve Ax=b for A=101110011 and b=354.
Row reduce [A∣b]: R3−R1 gives [0−11∣1], then R3+R2 gives [002∣6]:
100110012356.
So x3=3, x2=5−3=2 and x1=3−2=1: x=123. Check with the row rule: Ax=1+22+31+3=354.
When is Ax=b solvable for every b?
For a fixed matrix A, some right-hand sides may be reachable and others not. The set of reachable b is exactly Span{a1,…,an}. The best possible situation is that this span is all of Rm.
Worked example: A matrix whose columns do not span
Let A=121253374. For which b is Ax=b consistent?
Row reduce [A∣b] with R2−2R1, R3−R1, then R3−R2:
The system is consistent exactly when b1−b2+b3=0. That is the equation of a plane through the origin in R3, so the columns of A span only a plane, not all of R3. For example b=(1,0,0) is unreachable.
The trouble in that example came from the zero row in the coefficient part: it left the last entry as a condition on b. If every row of A had a pivot, no such condition could arise.
Spanning theorem
Let A be an m×n matrix. The following statements are either all true or all false.
For each b in Rm, the equation Ax=b has a solution.
Each b in Rm is a linear combination of the columns of A.
The columns of A span Rm.
A has a pivot position in every row.
A quick consequence: an m×n matrix has at most n pivots (one per column), so if n is less than m the columns cannot span Rm. Two vectors can never span R3.
Common mistake
Statement 4 is about the coefficient matrixA, not the augmented matrix [A∣b]. An augmented matrix can have a pivot in every row precisely because its last column is a pivot column, which means the system is inconsistent, the opposite of what you want.
Linearity of Ax
Directly from the column definition, for vectors u,v in Rn and a scalar c,
A(u+v)=Au+AvandA(cu)=cAu.
For instance, A(u+v)=(u1+v1)a1+⋯+(un+vn)an, and regrouping gives Au+Av. These two rules will drive the next lesson's description of solution sets, and later the whole theory of linear transformations.
Tip
To check a solution of Ax=b, multiply Ax with the row-vector rule and compare with b. It takes seconds and doesn't depend on your row reduction being right.
Practice
Practice 1
Compute Ax for A=[1023−14] and x=213. Give the result as an ordered pair.
Enter a point like (2, -3)
Practice 2
Which matrix equation represents the system 3x1−x2=2, x1+4x3=0?
Practice 3
Suppose Au=[12] and Av=[3−1]. Find A(2u−v) as an ordered pair.
Enter a point like (2, -3)
Practice 4
Solve Ax=b for A=102213130 and b=121. Give x as (x1,x2,x3).
Enter a point like (2, -3)
Practice 5
Let A=121253374 (the matrix from the example above) and b=13b3. For what value of b3 is Ax=b consistent?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 6
Do the columns of B=120011231 span R3?
Practice 7
A is a 5×3 matrix. What is the largest number of pivot positions A can have? (Use your answer to decide whether the columns of A can span R5.)
Enter a number. Fractions like 3/4 and sqrt(2) are OK.