Euler Hall — free maths guides

Write a linear combination equation as Ax = b

Put the coefficients into a matrix, the weights into x, and read a system as Ax = b. The idea in plain words, a worked example, and a check with the answers shown — part of the free Linear Algebra guides.

The three ways to build A

Givenuu,vv,ww andbb, the equationcu+dv+ew=bcu+dv+ew=b becomesAx=bA\mathbf{x}=\mathbf{b} with

Three rules that catch almost every mistake:

1. Vectors go in as columns, in order. Not rows — putting them in as rows givesATA^{\mathrm{T}}, and the equation then multiplies the wrong things. 2. Coefficients go intox\mathbf{x}, never intoAA. The unknowns are not entries of the matrix. 3. *b\mathbf{b} stays on the right. Appending it as a column gives[A∣b][A\mid b], the augmented matrix** — that is the object you eliminate, not the equation.

Why this matters more than it looks

Because every later technique is stated in the matrix form. "DoesAx=bA\mathbf{x}=\mathbf{b} have a solution?" "What is the rank ofAA?" "Find the nullspace." "Projectb\mathbf{b} onto the column space." Each of these needsAA, and the translation above is the only way to get it.

The augmented matrix is not the equation.[A∣b][A\mid b] is a bookkeeping device: it holdsAA andb\mathbf{b} side by side so elimination can act on both at once. Writing the equation as[A∣b][A\mid b] loses the distinction between the coefficient matrix and the right-hand side, and that distinction is exactly what rank tests use. Rank ofAA versus rank of[A∣b][A\mid b] is the whole solvability criterion.

Why columns and not rows. Because the combination weights the vectors, and a weight multiplies a whole vector. If the vectors were rows, thencucu would have to mean "multiplycc into a row", which is left multiplication — a different operation, and not the one the problem states.

Worked, in the exam's shape

Write2u−3v=b2u-3v=b in matrix form, foru=(1,4,−1)u=(1,4,-1),v=(2,0,3)v=(2,0,3) andb=(−4,8,−11)b=(-4,8,-11).

The vectors are columns, in order, so

The equation isAx=bA\mathbf{x}=\mathbf{b}, which is3×23\times2 — three equations, two unknowns.

Check the translation by substitution:c=2c=2,d=−3d=-3 gives2(1,4,−1)−3(2,0,3)=(2−6, 8−0, −2−9)=(−4,8,−11)2(1,4,-1)-3(2,0,3)=(2-6,\ 8-0,\ -2-9)=(-4,8,-11), which is exactlyb\mathbf{b} ✓.

That check is worth doing every time in an exam: it costs ten seconds and it verifies the translation, not just the arithmetic.

By the end you can
  • Put the coefficients into a matrix, the weights into x, and read a system as Ax = b
  • Read the number of equations and unknowns off the shape of A
  • Name which object a matrix equation is a statement about
Test yourself

The combinationc(1,0)+d(0,1)+e(1,1)=(4,5)c(1,0)+d(0,1)+e(1,1)=(4,5) has which matrix form?

(a)A=[101011]A=\begin{bmatrix}1&0&1\\0&1&1\end{bmatrix},x=(c,d,e)\mathbf{x}=(c,d,e) (b)A=[100111]A=\begin{bmatrix}1&0\\0&1\\1&1\end{bmatrix} (c)A=[10140115]A=\begin{bmatrix}1&0&1&4\\0&1&1&5\end{bmatrix} (d)A=[1001]A=\begin{bmatrix}1&0\\0&1\end{bmatrix}

Answer

(a). The three vectors become the three columns of a2×32\times3 matrix, in order, and the coefficients becomex=(c,d,e)\mathbf{x}=(c,d,e).

(b) has them as rows — the transpose, and the wrong shape for this equation. (c) is the augmented matrix, which includesb\mathbf{b} as an extra column. (d) dropsee and its vector.

Work out where to start — free, no accountAnswer six real questions — free, no account