2.2 - Three equations as a matrix equation

2.2 - Three equations as a matrix equation

Three linear equations can be collected into one matrix equation without losing any information. You will translate between the two forms, solve nonsingular systems with an inverse, and interpret the solution as the common point of three planes.

Matrix and equation forms

Can one multiplication keep track of three equations at once? Consider x+y=5x+y=5, y+z=1y+z=1 and x+z=2x+z=2. The coefficients of one equation fit in one row; the unknowns fit in one column.

Choose the order x,y,zx,y,z and keep it in every row. The missing zz in the first equation has coefficient zero. Matrix multiplication then recreates each left-hand side by a row–column product.

Coefficient matrix

For three linear equations, the coefficient matrix A\mathbf A contains their coefficients in a fixed unknown order. With the unknown column x\mathbf x and constant column b\mathbf b, the system becomes

Ax=b.\mathbf A\mathbf x=\mathbf b.

The symbol x\mathbf x denotes a whole column; its entries may be named x,y,zx,y,z.

Put constants on the right before collecting the coefficients. The order of the equations can change, provided the constant column changes in the same way.

Worked example 1: collecting the rows

Question. Write x+y=5x+y=5, y+z=1y+z=1, x+z=2x+z=2 as a matrix equation.

Plan. Use the order x,y,zx,y,z, filling every missing coefficient with zero.

x+y+0z=50x+y+z=1x+0y+z=2.\begin{aligned} x+y+0z&=5\\ 0x+y+z&=1\\ x+0y+z&=2. \end{aligned}

The three coefficient rows are (1,1,0)(1,1,0), (0,1,1)(0,1,1), (1,0,1)(1,0,1).

Answer.

(110011101)(xyz)=(512).\begin{pmatrix}1&1&0\\0&1&1\\1&0&1\end{pmatrix} \begin{pmatrix}x\\y\\z\end{pmatrix} =\begin{pmatrix}5\\1\\2\end{pmatrix}.

Check. Multiplying the matrix by (x,y,z)T(x,y,z)^{\mathsf T} gives (x+y,y+z,x+z)T(x+y,y+z,x+z)^{\mathsf T}, exactly the original three left-hand sides.

Now change the source of the equations: quantities in a word problem must first be translated into linear totals. The matrix format itself stays the same.

Worked example 2: modelling three prices

Question. Three types of notebook cost xx, yy and zz pounds each. A purchase of two of the first type, one of the second and one of the third costs £8. Another purchase, of one, three and one respectively, costs £12. A third purchase, of one, one and two, costs £7. Form a matrix equation for the prices, then state its three scalar equations.

Plan. Use one row per purchase, with quantities as coefficients and the total cost on the right.

The first purchase contributes 2x+y+z2x+y+z; the other two use the same price order. Thus

(211131112)(xyz)=(8127).\begin{pmatrix}2&1&1\\1&3&1\\1&1&2\end{pmatrix} \begin{pmatrix}x\\y\\z\end{pmatrix} =\begin{pmatrix}8\\12\\7\end{pmatrix}.

Reading a matrix equation back means expanding its row–column products.

Answer. The displayed equation represents

2x+y+z=8,x+3y+z=12,x+y+2z=7.2x+y+z=8,\qquad x+3y+z=12,\qquad x+y+2z=7.

Check. Prices (2,3,1)(2,3,1) give totals 4+3+1=84+3+1=8, 2+9+1=122+9+1=12 and 2+3+2=72+3+2=7, so the rows have retained the purchase quantities in the correct order.

The same multiplication works in either direction. A matrix equation is a compact representation of the constraints, rather than a different problem.

Watch out

Omitting a variable does not let you shorten its row. For 2x−z=42x-z=4, the coefficient row in the order x,y,zx,y,z is (2,0,−1)(2,0,-1), not (2,−1,0)(2,-1,0).

Read every row in the specified order in this check.

Nonsingular systems

An inverse reverses the coefficient matrix when its determinant is nonzero. For Ax=b\mathbf A\mathbf x=\mathbf b, multiply on the left by A−1\mathbf A^{-1}:

A−1Ax=A−1b⇒x=A−1b.\mathbf A^{-1}\mathbf A\mathbf x=\mathbf A^{-1}\mathbf b \quad\Rightarrow\quad \mathbf x=\mathbf A^{-1}\mathbf b.

This gives one solution for every constant column. It is unique because every solution must equal this same product.

Solving with an inverse

If det⁡A≠0\det\mathbf A\ne0, then

Ax=b⟺x=A−1b.\mathbf A\mathbf x=\mathbf b \quad\Longleftrightarrow\quad \mathbf x=\mathbf A^{-1}\mathbf b.

Multiply in this order: a three-by-three matrix acts on a three-by-one column. Not in the formula booklet: learn it.

For the opening system, cofactor construction gives

A=(110011101),det⁡A=2,A−1=12(1−1111−1−111).\mathbf A=\begin{pmatrix}1&1&0\\0&1&1\\1&0&1\end{pmatrix},\qquad \det\mathbf A=2,\qquad \mathbf A^{-1}=\frac12\begin{pmatrix}1&-1&1\\1&1&-1\\-1&1&1\end{pmatrix}.

For example, the determinant is 1(1)−1(−1)=21(1)-1(-1)=2, and multiplying A\mathbf A by the displayed integer numerator gives 2I2\mathbf I.

Worked example 3: reversing the coefficient matrix

Question. Solve x+y=5x+y=5, y+z=1y+z=1, x+z=2x+z=2 using the inverse above.

Plan. Multiply the inverse by the constant column, keeping its equation order.

(xyz)=12(1−1111−1−111)(512)=12(5−1+25+1−2−5+1+2)=(32−1).\begin{pmatrix}x\\y\\z\end{pmatrix} =\frac12\begin{pmatrix}1&-1&1\\1&1&-1\\-1&1&1\end{pmatrix} \begin{pmatrix}5\\1\\2\end{pmatrix} =\frac12\begin{pmatrix}5-1+2\\5+1-2\\-5+1+2\end{pmatrix} =\begin{pmatrix}3\\2\\-1\end{pmatrix}.

Answer. x=3x=3, y=2y=2, z=−1z=-1.

Check. Substitution into the original equations gives 3+2=53+2=5, 2−1=12-1=1 and 3−1=23-1=2. The inverse result satisfies all three equations.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account