The method, and where the marks go
Swapping two rows of $(\mathbf{A}\mid\mathbf{b})$ is allowed. Swapping two columns can be undone just as easily. Is it allowed too?
Nothing is restated here that Method 13.16 does not already say. Two remarks only, both about places where a correct method still loses marks.
Recap The three operations, from Lecture 13
This box restates Lecture 13; nothing in it is new. The elementary row operations on an array (Definition 13.13) are:
- interchange two rows;
- multiply a row by a number $\alpha\ne0;$
- add a multiple of one row to a different row.
Each can be undone by another operation of the same kind, so none of them changes the solution set (Fact 13.14). Gaussian elimination (Method 13.16) uses them to bring the augmented array to a staircase, and then, if you like, clears the entries above each leading entry.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
Which of these is not an elementary row operation on $(\mathbf{A} \mid \mathbf{b})$?
- Why is that answer tempting? This is operation 3 exactly — a multiple of one row added to a different row. It is the workhorse of the whole method.
- Why is that answer tempting? Operation 1. Interchanging two equations obviously cannot change which values solve them; it is on the list only because the method needs to be able to move a pivot into place.
- Why is that answer tempting? Operation 2, and −1/2 is a perfectly good scalar. Only α = 0 is forbidden, and only because multiplying an equation by zero cannot be undone.
The operations act on rows, which are the equations. A column records which unknown a coefficient belongs to, so interchanging two columns silently renames the unknowns: $$(x_1, x_2, x_3) \;\longrightarrow\; (x_3, x_2, x_1)$$
The array that comes out is a perfectly good array — of a different system. And the $\mathbf{b}$ column is not an unknown at all, so swapping it in is not even wrong in an interesting way.
Elimination, one row operation at a time
The three settings are Example 13.17, Example 13.18 and Watch out 13.19 of Lecture 13: one system with exactly one solution, and two systems with the same left-hand side that differ in one number of $\mathbf{b}.$
- Press Run it for the first setting. Every operation named above the array is one of the three, and nothing else ever happens.
- Press the setting button until it says infinitely many, then Next operation step by step. The last row becomes $(0\;0\;0\mid0).$
- Switch to no solution. The operations are the same, one by one; only the last entry differs, and the last row now reads $0=3.$ Whether solutions exist depended on $\mathbf{b}.$
Same $\mathbf{A},$ two right-hand sides
This example is the app's (the lecture's first board problem). Solve $$ \begin{aligned} x_1 + 2x_2 - x_3 &= 1\\ 2x_1 + 3x_2 + x_3 &= 4\\ 3x_1 + 5x_2 \phantom{{}+ x_3} &= c \end{aligned} $$ for $c=5.$ Then change one number, $c=6,$ and solve it again.
Try it yourself first. Then open one step at a time.
The first column. Write the augmented array and subtract $2$ times row $1$ from row $2$ and $3$ times row $1$ from row $3{:}$ $$ \begin{aligned} &\left(\begin{array}{ccc|c} 1 & 2 & -1 & 1\\ 2 & 3 & 1 & 4\\ 3 & 5 & 0 & c \end{array}\right)\\ &\sim \left(\begin{array}{ccc|c} 1 & 2 & -1 & 1\\ 0 & -1 & 3 & 2\\ 0 & -1 & 3 & c-3 \end{array}\right) \end{aligned} $$
The second column. Subtract row $2$ from row $3{:}$ the last row becomes $$(0\;\;0\;\;0\mid c-5)\,.$$ Every operation so far was chosen by the left-hand side alone; $c$ has only been carried along.
$c=5.$ The last row is $0=0.$ Multiply row $2$ by $-1$ and clear above its leading entry (row $1$ minus $2$ times row $2$): $$ \left(\begin{array}{ccc|c} 1 & 0 & 5 & 5\\ 0 & 1 & -3 & -2\\ 0 & 0 & 0 & 0 \end{array}\right) $$ The third column has no leading entry, so $x_3=t$ is free, and $x_1=5-5t,$ $x_2=-2+3t.$
A check. $t=0$ gives $(5,-2,0)$ and $t=1$ gives $(0,1,1).$ Both satisfy the three original equations with $c=5{:}$ for instance $3\cdot0+5\cdot1=5.$
$c=6.$ The same operations end in the row $(0\;\;0\;\;0\mid1),$ that is $0=1.$ There are no solutions.
$c=5{:}$ infinitely many, $(x_1,x_2,x_3)=(5-5t,\,-2+3t,\,t)$ with $t\in\mathbb{R}.$ $c=6{:}$ none. Same operations; the verdict was decided by $\mathbf{b}.$
Reading the finished array
Five unknowns, three leading entries, no contradiction. How many solutions — and is a blank column a zero?
This lead is the app's; it restates Fact 13.20 of Lecture 13. When elimination stops, the array is a staircase, and it is read in two passes. First the verdict: a row $(0\;\cdots\;0\mid c)$ with $c\ne0$ means no solution; otherwise a leading entry in every unknown's column means exactly one; otherwise infinitely many. Then, if there are solutions, every unknown whose column carries no leading entry is free, and the others are written in terms of the free ones. The column to the right of the rule is not an unknown and is never counted.
Guess first. Before you read the Watch out below, decide what the array in the next question says about $x_3$ and $x_5.$
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
A system in five unknowns eliminates to $$\left(\begin{array}{ccccc|c} 1 & 0 & -2 & 0 & 3 & 4\\ 0 & 1 & 5 & 0 & -1 & 2\\ 0 & 0 & 0 & 1 & 2 & 7 \end{array}\right)$$
How many solutions?
- Why is that answer tempting? Counts every column without a leading entry, including the one after the rule. The right-hand column is not an unknown: five unknowns, three leading entries, two free.
- Why is that answer tempting? Reads the empty columns as zeros — the most expensive misreading in the block, and Lecture 13 warned about it too. What comes out is a genuine solution, just not all of them, so nothing looks wrong.
- Why is that answer tempting? Confuses underdetermined with inconsistent. Too few equations gives too many solutions, never none. A system fails only on a row (0 … 0 | c) with c ≠ 0.
Write out the three equations the array stands for: $$ \begin{aligned} x_1 - 2x_3 + 3x_5 &= 4\,,\\ x_2 + 5x_3 - x_5 &= 2\,,\\ x_4 + 2x_5 &= 7\,. \end{aligned} $$ None of them pins $x_3$ or $x_5$ down: the first two relate $x_1$ and $x_2$ to them, the third gives $x_4$ once $x_5$ is chosen. Leading entries stand in columns $1,$ $2$ and $4;$ columns $3$ and $5$ carry none, so $x_3$ and $x_5$ are free. Put $x_3=s$ and $x_5=t{:}$ $$ \begin{aligned} x_1 &= 4 + 2s - 3t\,,\\ x_2 &= 2 - 5s + t\,,\\ x_4 &= 7 - 2t\,. \end{aligned} $$ Five unknowns, three leading entries: two degrees of freedom.
A free unknown in the middle
This example is the app's. Elimination on a system in the four unknowns $x_1,$ $x_2,$ $x_3,$ $x_4$ ends with $$ \left(\begin{array}{cccc|c} 1 & 0 & 2 & 0 & 3\\ 0 & 1 & -1 & 0 & 1\\ 0 & 0 & 0 & 1 & 2 \end{array}\right). $$ Find all solutions.
Try it yourself first. Then open one step at a time.
The verdict. There is no row $(0\;\cdots\;0\mid c)$ with $c\ne0,$ so there are solutions. The leading entries stand in columns $1,$ $2$ and $4;$ column $3$ has none. So there are infinitely many solutions, with one degree of freedom.
The equations. The array says $$ \begin{aligned} x_1 + 2x_3 &= 3\,,\\ x_2 - x_3 &= 1\,,\\ x_4 &= 2\,. \end{aligned} $$ Nothing says what $x_3$ is: it is free, not zero.
Every solution. Put $x_3=t.$ Then $x_1=3-2t,$ $x_2=1+t$ and $x_4=2.$ Reading the blank column as $x_3=0$ would give only $(3,1,0,2),$ the solution with $t=0.$
A check. $t=1$ gives $(1,2,1,2),$ and indeed $1+2=3,$ $2-1=1$ and $x_4=2.$
$(x_1,x_2,x_3,x_4)=(3-2t,\,1+t,\,t,\,2)$ with $t\in\mathbb{R}.$
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
Elimination on a system of three equations in four unknowns ends with no row $(0\;\cdots\;0\mid c)$ with $c\ne0.$ How many solutions does the system have?
- Why is that answer tempting? Three leading entries can cover at most three of the four columns of unknowns. One column is always left without a leading entry, so one unknown is always free.
- Why is that answer tempting? Confuses too few equations with contradictory ones. Too few equations leaves an unknown free — too many solutions, never none. Only a row $0=c$ with $c\ne0$ gives none.
- Why is that answer tempting? $\mathbf{b}$ decides whether there are solutions at all, and the question has settled that: there is no row $0=c$ with $c\ne0.$ What is left is decided by counting columns.
Three rows give at most three leading entries, and there are four columns of unknowns, so at least one unknown is free. With no contradictory row, Fact 13.20 leaves only one verdict: infinitely many. Fewer equations than unknowns can never give exactly one solution — count before you compute.
Finding the inverse by row operations
Lecture 14 inverted a $2\times2$ matrix with a formula. How do you invert a $3\times3$ one — without any new formula?
Lecture 14 produced $\mathbf{A}^{-1}$ for order $2$ and for no other order. The gap closes with no new machinery at all.
Suppose $\mathbf{A}$ is $n\times n$ with $|\mathbf{A}|\ne0$, and we want the matrix $\mathbf{X}$ with $\mathbf{A}\mathbf{X}=\mathbf{I}$. Writing $\mathbf{x}_{j}$ for the $j$th column of $\mathbf{X}$ and $\mathbf{e}_{j}$ for the $j$th column of $\mathbf{I}$, the single matrix equation $\mathbf{A}\mathbf{X}=\mathbf{I}$ is the $n$ separate systems $$ \begin{aligned} &\mathbf{A}\mathbf{x}_{1}=\mathbf{e}_{1},\qquad \mathbf{A}\mathbf{x}_{2}=\mathbf{e}_{2},\\ &\dots,\qquad \mathbf{A}\mathbf{x}_{n}=\mathbf{e}_{n}\,, \end{aligned} $$ all with the same coefficient matrix. Solving them one at a time would repeat the same row operations $n$ times, since the operations depend on $\mathbf{A}$ alone and not on the right-hand side. So do them at once: carry all $n$ right-hand sides along in the same array.
Note what the method does not require: the determinant is never computed, and nothing is ever divided by $|\mathbf{A}|$. Singularity is not tested for in advance — it announces itself, as a row of zeros, at the moment it becomes relevant.
Inverting a $3\times3$ matrix
Find the inverse of $\mathbf{A}=\begin{pmatrix} 1 & 3 & 3\\ 1 & 3 & 4\\ 1 & 4 & 3\end{pmatrix}$.
Try it yourself first. Then open one step at a time.
The first column. Subtract row $1$ from rows $2$ and $3$ ($R_2-R_1$ and $R_3-R_1$): $$ \begin{aligned} &\left(\begin{array}{ccc|ccc} 1 & 3 & 3 & 1 & 0 & 0\\ 1 & 3 & 4 & 0 & 1 & 0\\ 1 & 4 & 3 & 0 & 0 & 1 \end{array}\right)\\ &\sim \left(\begin{array}{ccc|ccc} 1 & 3 & 3 & 1 & 0 & 0\\ 0 & 0 & 1 & -1 & 1 & 0\\ 0 & 1 & 0 & -1 & 0 & 1 \end{array}\right) \end{aligned} $$
A swap. Interchange the new rows $2$ and $3$ ($R_2\leftrightarrow R_3$), and the left block is a staircase: $$ \sim \left(\begin{array}{ccc|ccc} 1 & 3 & 3 & 1 & 0 & 0\\ 0 & 1 & 0 & -1 & 0 & 1\\ 0 & 0 & 1 & -1 & 1 & 0 \end{array}\right) $$
Clear above. Then clear above the two leading entries in the third and second columns ($R_1-3R_2,$ then $R_1-3R_3$): $$ \small \begin{aligned} &\sim \left(\begin{array}{ccc|ccc} 1 & 0 & 3 & 4 & 0 & -3\\ 0 & 1 & 0 & -1 & 0 & 1\\ 0 & 0 & 1 & -1 & 1 & 0 \end{array}\right)\\ &\sim \left(\begin{array}{ccc|ccc} 1 & 0 & 0 & 7 & -3 & -3\\ 0 & 1 & 0 & -1 & 0 & 1\\ 0 & 0 & 1 & -1 & 1 & 0 \end{array}\right)\,. \end{aligned} $$
Read off. The left block is $\mathbf{I}_{3}$, so $$ \mathbf{A}^{-1}= \begin{pmatrix} 7 & -3 & -3\\ -1 & 0 & 1\\ -1 & 1 & 0\end{pmatrix}\,, $$ which is checked in one product: $\mathbf{A}\mathbf{A}^{-1}=\mathbf{I}_{3}$.
$\mathbf{A}^{-1}=\begin{pmatrix} 7 & -3 & -3\\ -1 & 0 & 1\\ -1 & 1 & 0\end{pmatrix}.$ Five row operations, and the determinant was never needed.
Guess first. The method has a fourth step. Before you read the next example, decide what a row of zeros in the left block tells you.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
$\mathbf{A}$ is $3 \times 3$. You reduce $(\mathbf{A} \mid \mathbf{I})$ and a row of the left block becomes all zeros.
What follows?
- Why is that answer tempting? It succeeds if and only if |A| ≠ 0 — that is the entire content of the criterion. A singular matrix is not an accident of arithmetic; it is the case the method is designed to detect.
- Why is that answer tempting? Working upwards clears entries ABOVE a leading entry. A row with no leading entry at all is not waiting for anything: the staircase is already finished.
- Why is that answer tempting? No inverse has a zero row. Expanding along it would give |A⁻¹| = 0, and |A||A⁻¹| = |I| = 1 forbids that. Note also that the zero row is in the LEFT block, which is not the inverse.
A finished staircase with a zero row has at most two leading entries, so one of the three columns of the left block carries none — and $\mathbf{I}_3$ needs one in each. The left block can never get there, which by the criterion is exactly $|\mathbf{A}| = 0$.
And notice what the right block is doing meanwhile: filling with perfectly good numbers that mean nothing.
The method failing
Take $\mathbf{A}=\begin{pmatrix} 1 & 2 & -1\\ 2 & 3 & 1\\ 3 & 5 & 0\end{pmatrix}$, whose third row is the sum of the first two.
Try it yourself first. Then open one step at a time.
The same procedure gives $$ \small \begin{aligned} &\left(\begin{array}{ccc|ccc} 1 & 2 & -1 & 1 & 0 & 0\\ 2 & 3 & 1 & 0 & 1 & 0\\ 3 & 5 & 0 & 0 & 0 & 1 \end{array}\right)\\ &\sim\;\cdots\;\sim\\ &\left(\begin{array}{ccc|ccc} 1 & 0 & 5 & -3 & 2 & 0\\ 0 & 1 & -3 & 2 & -1 & 0\\ 0 & 0 & 0 & -1 & -1 & 1 \end{array}\right)\,. \end{aligned} $$
The operations behind the dots (the app's addition): $R_2-2R_1$ and $R_3-3R_1;$ then $R_3-R_2,$ which empties the left half of row $3;$ then $(-1)\cdot R_2$ and $R_1-2R_2.$ It is the matrix of the first example on this page, and its zero row is the row $(0\;\;0\;\;0\mid c-5)$ found there.
The left block has a zero row, so it will never become $\mathbf{I}_{3}$ and $\mathbf{A}$ has no inverse — equivalently $|\mathbf{A}|=0$, which one may check directly. Observe that the right block is not zero and means nothing on its own: the verdict is read off the left block only.
$\mathbf{A}$ has no inverse: the left block acquires the zero row $(0\;\;0\;\;0),$ and $|\mathbf{A}|=0.$ The right block at that moment means nothing.
$(\mathbf{A}\mid\mathbf{I}),$ one row operation at a time
The same procedure as the first animation, on an array twice as wide. The two settings are Example 15.4 and Example 15.5.
- Run it on the first setting and watch the labels above the blocks: at the last operation the identity that started on the right has arrived on the left, and the right block is $\mathbf{A}^{-1}.$
- Press Matrix: invertible to switch to the singular matrix, then Next operation step by step. A row of the left block becomes zero and the run stops. Look at the right block at that moment: it is full of numbers, and none of them is an answer.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
For $\mathbf{A}=\begin{pmatrix}1&2\\3&7\end{pmatrix}$ one operation, $R_2-3R_1,$ turns $(\mathbf{A}\mid\mathbf{I})$ into $$ \left(\begin{array}{cc|cc} 1 & 2 & 1 & 0\\ 0 & 1 & -3 & 1 \end{array}\right). $$ What is $\mathbf{A}^{-1}$?
- Why is that answer tempting? Reads the right block off a staircase. The left block is not yet $\mathbf{I},$ so the right block is not yet the inverse; one more operation is needed (Watch out 15.6).
- Why is that answer tempting? The method fails only when a row of the left block becomes zero. This left block is a staircase with two leading entries; it is simply not finished.
- Why is that answer tempting? That is the inverse of the left block as it stands, not of $\mathbf{A}.$ The answer is always read from the right block.
Clear above the second leading entry: $R_1-2R_2$ gives $$ \left(\begin{array}{cc|cc} 1 & 0 & 7 & -2\\ 0 & 1 & -3 & 1 \end{array}\right), $$ so $\mathbf{A}^{-1}=\begin{pmatrix}7&-2\\-3&1\end{pmatrix}.$ The check: the first row of $\mathbf{A}$ times the first column is $7-6=1,$ the first row times the second column is $-2+2=0,$ and so on. The order-2 formula of Fact 14.20 agrees, with $|\mathbf{A}|=7-6=1.$
Many right-hand sides at once
Four systems share one coefficient matrix and differ only in $\mathbf{b}.$ Must you eliminate four times?
The same idea answers a question that has nothing to do with inverses. Suppose $p$ systems share one coefficient matrix, $$ \begin{aligned} &\mathbf{A}\mathbf{x}=\mathbf{b}^{1},\quad \mathbf{A}\mathbf{x}=\mathbf{b}^{2},\\ &\dots,\quad \mathbf{A}\mathbf{x}=\mathbf{b}^{p}\,. \end{aligned} $$ The row operations are dictated by $\mathbf{A}$, so they are the same $p$ times over. Reducing $(\mathbf{A}\mid\mathbf{b}^{1}\;\mathbf{b}^{2}\;\cdots\;\mathbf{b}^{p})$ once solves all $p$ together, one column of answers each. Method 15.3 is the special case $\mathbf{b}^{j}=\mathbf{e}_{j}$.
This is also the honest argument for the inverse, first made in Example 14.25: $\mathbf{A}^{-1}$ is not a fast way to solve one system — it is what one computes when the same $\mathbf{A}$ is to be used again.
Two systems, one reduction
This example is the app's. Solve $\mathbf{A}\mathbf{x}=\mathbf{b}^{1}$ and $\mathbf{A}\mathbf{x}=\mathbf{b}^{2}$ for $$ \begin{aligned} &\mathbf{A}=\begin{pmatrix}1&1&0\\1&2&1\\0&1&2\end{pmatrix},\\ &\mathbf{b}^{1}=\begin{pmatrix}2\\4\\3\end{pmatrix},\quad \mathbf{b}^{2}=\begin{pmatrix}1\\3\\4\end{pmatrix}. \end{aligned} $$
Try it yourself first. Then open one step at a time.
One array. Write both right-hand sides after the rule and subtract row $1$ from row $2{:}$ $$ \begin{aligned} &\left(\begin{array}{ccc|cc} 1 & 1 & 0 & 2 & 1\\ 1 & 2 & 1 & 4 & 3\\ 0 & 1 & 2 & 3 & 4 \end{array}\right)\\ &\sim \left(\begin{array}{ccc|cc} 1 & 1 & 0 & 2 & 1\\ 0 & 1 & 1 & 2 & 2\\ 0 & 1 & 2 & 3 & 4 \end{array}\right) \end{aligned} $$
The staircase. $R_3-R_2$ gives the row $(0\;\;0\;\;1\mid1\;\;2).$ Both systems have exactly one solution: the left block has a leading entry in every column.
Clear above. $R_2-R_3,$ then $R_1-R_2{:}$ $$ \sim \left(\begin{array}{ccc|cc} 1 & 0 & 0 & 1 & 1\\ 0 & 1 & 0 & 1 & 0\\ 0 & 0 & 1 & 1 & 2 \end{array}\right) $$
Read off, column by column. The fourth column is the solution of the first system, the fifth of the second. Check one of them: $\mathbf{A}\,(1,0,2)$ gives $1+0+0=1,$ $1+0+2=3,$ $0+0+4=4.$
$\mathbf{x}^{1}=(1,1,1)$ and $\mathbf{x}^{2}=(1,0,2),$ from one reduction of four operations instead of two reductions of four.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
One $3 \times 3$ matrix $\mathbf{A}$ with $|\mathbf{A}| \ne 0$, and four different right-hand sides.
Which is least work?
- Why is that answer tempting? Four correct answers for four times the work. The operations are chosen by A and not by b, so all four runs are the same sequence — which is exactly the observation that produces the inverse.
- Why is that answer tempting? Correct, by the most expensive route in the course: sixteen determinants of order 3 is forty-eight of order 2. Cramer's rule is a formula, not a method.
- Why is that answer tempting? |A| ≠ 0 promises that each of the four has exactly one solution. It does not produce any of them. The determinant returns a verdict, never a solution.
The row operations depend on $\mathbf{A},$ so doing four separate reductions is doing the same sequence of operations four times. Carry all four right-hand sides in one array instead — one reduction, four columns of answers.
Writing $\mathbf{I}$ there instead is the same computation and gives $\mathbf{A}^{-1},$ which then serves any right-hand side.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
For a $3\times3$ matrix $\mathbf{A}$ you reduce $(\mathbf{A}\mid\mathbf{b}^{1}\;\mathbf{b}^{2}\;\mathbf{b}^{3})$ and reach $(\mathbf{I}\mid\mathbf{C}),$ where $\mathbf{C}$ is $3\times3.$ Where is the solution of $\mathbf{A}\mathbf{x}=\mathbf{b}^{2}$?
- Why is that answer tempting? Row $2$ holds the value of $x_2$ in each of the three systems: it mixes the three answers. Each right-hand side entered the array as a column and comes out as a column.
- Why is that answer tempting? That is what one does with $\mathbf{A}^{-1},$ which is what $\mathbf{C}$ would be if the right-hand sides had been the columns of $\mathbf{I}.$ Here $\mathbf{C}$ already holds the solutions.
- Why is that answer tempting? The reduction does to every column after the rule what it does to a single $\mathbf{b}.$ With $\mathbf{b}$'s there, it gives solutions; only with $\mathbf{I}$ there does it give $\mathbf{A}^{-1}.$
The array $(\mathbf{I}\mid\mathbf{C})$ stands for the three systems $\mathbf{I}\mathbf{x}=$ (column $j$ of $\mathbf{C}$), whose solutions are the columns themselves. So column $2$ of $\mathbf{C}$ solves $\mathbf{A}\mathbf{x}=\mathbf{b}^{2}.$ In Method 15.3 the right-hand sides are $\mathbf{e}_1,\mathbf{e}_2,\mathbf{e}_3,$ and their solutions, side by side, are the columns of $\mathbf{A}^{-1}.$
Which tool for which question
$|\mathbf{A}|=0,$ and you still need the solutions. Is the system without solutions, and if not, what do you do?
Let $\mathbf{A}$ be $n\times n$.
- Has $\mathbf{A}\mathbf{x}=\mathbf{b}$ exactly one solution? Compute $|\mathbf{A}|$. Non-zero: yes, for every $\mathbf{b}$. Zero: not for any $\mathbf{b}$ — and the determinant says nothing further.
- What are the solutions? Eliminate. This works whatever $|\mathbf{A}|$ is, and whether or not the system is square.
- How many are there, when $|\mathbf{A}|=0$? Eliminate and read the last row: $(0\;\cdots\;0\mid 0)$ gives infinitely many, $(0\;\cdots\;0\mid c)$ with $c\ne0$ gives none.
- What is $\mathbf{A}^{-1}$? Order $2$: the formula of Fact 14.20. Any order: Method 15.3.
Guess first. Before you read the Watch out below, answer the question the hook asked.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
A square system has $|\mathbf{A}| = 0$, and you still need its solutions.
What do you do?
- Why is that answer tempting? The error Lecture 14 ended on, and it is worth meeting once more: |A| = 0 says NOT EXACTLY ONE. Whether there are none or infinitely many still depends on b.
- Why is that answer tempting? There is nothing to compute: |A| = 0 is precisely the statement that A⁻¹ does not exist. Reaching for it here is the criterion being remembered but not used.
- Why is that answer tempting? Cramer's rule requires |A| ≠ 0 and says nothing whatever without it. The ratio is c/0 or 0/0, and neither of those is a case distinction — it is an expression that does not exist.
A zero determinant is not a dead end. It has said everything it can: not exactly one, and no more. The remaining question — none or infinitely many — is answered by elimination, which works for any system, square or not, singular or not. $$ \begin{aligned} &|\mathbf{A}|\;\text{predicts.}\\ &\text{Elimination decides.} \end{aligned} $$
One matrix, four questions
This example is the app's. Let $$ \mathbf{A}=\begin{pmatrix}1&1&0\\1&2&1\\0&1&k\end{pmatrix}. $$ (a) For which $k$ has $\mathbf{A}\mathbf{x}=\mathbf{b}$ exactly one solution for every $\mathbf{b}$?
(b) For $k=1,$ solve the system with $\mathbf{b}=(1,2,1),$ and with $\mathbf{b}=(1,2,2).$
(c) For $k=2,$ find $\mathbf{A}^{-1}.$
Try it yourself first. Then open one step at a time.
(a) Predict. Expanding along the first row, $$ \begin{aligned} |\mathbf{A}| &= 1\cdot(2k-1)\\ &\quad-1\cdot(k-0)+0\\ &= k-1\,. \end{aligned} $$ So there is exactly one solution for every $\mathbf{b}$ when $k\ne1,$ and for no $\mathbf{b}$ when $k=1.$
(b) Decide. For $k=1$ the determinant has said all it can. Eliminate with both right-hand sides at once ($R_2-R_1,$ then $R_3-R_2$): $$ \left(\begin{array}{ccc|cc} 1 & 1 & 0 & 1 & 1\\ 0 & 1 & 1 & 1 & 1\\ 0 & 0 & 0 & 0 & 1 \end{array}\right) $$
(b) Read the last row. For $\mathbf{b}=(1,2,1)$ it is $0=0{:}$ infinitely many. Put $x_3=t;$ then $x_2=1-t$ and $x_1=1-x_2=t.$ For $\mathbf{b}=(1,2,2)$ it is $0=1{:}$ none.
(c) The inverse. For $k=2$ the matrix is the one of the previous section. Reduce $(\mathbf{A}\mid\mathbf{I})$ with $R_2-R_1,$ $R_3-R_2,$ $R_2-R_3,$ $R_1-R_2{:}$ $$ \small \sim \left(\begin{array}{ccc|ccc} 1 & 0 & 0 & 3 & -2 & 1\\ 0 & 1 & 0 & -2 & 2 & -1\\ 0 & 0 & 1 & 1 & -1 & 1 \end{array}\right) $$ and check one product: row $1$ of $\mathbf{A}$ times column $1$ of the right block is $3-2=1,$ and so on.
(a) $|\mathbf{A}|=k-1,$ so exactly when $k\ne1.$
(b) $(x_1,x_2,x_3)=(t,\,1-t,\,t),$ $t\in\mathbb{R};$ and no solution for $\mathbf{b}=(1,2,2).$
(c) $\mathbf{A}^{-1}=\begin{pmatrix}3&-2&1\\-2&2&-1\\1&-1&1\end{pmatrix}.$
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
A square system $\mathbf{A}\mathbf{x}=\mathbf{0}$ — every right-hand side zero — has $|\mathbf{A}|=0.$ How many solutions does it have?
- Why is that answer tempting? Reads $|\mathbf{A}|=0$ as "no solutions" (Watch out 15.8). Here that cannot even happen: $\mathbf{x}=\mathbf{0}$ solves $\mathbf{A}\mathbf{x}=\mathbf{0}$ for every $\mathbf{A}.$
- Why is that answer tempting? Exactly one solution needs $|\mathbf{A}|\ne0$ (the first line of Fact 15.7). With $|\mathbf{A}|=0$ the zero solution has company.
- Why is that answer tempting? Elimination is needed to find the solutions, not to count them here. None is ruled out by $\mathbf{x}=\mathbf{0},$ exactly one by $|\mathbf{A}|=0;$ the three outcomes leave only one.
Two facts settle it without any elimination. $\mathbf{x}=\mathbf{0}$ is always a solution, so the answer is not none. $|\mathbf{A}|=0$ says not exactly one (Fact 15.7). Of the three outcomes of Fact 13.20 only infinitely many is left. The last row of the eliminated array is always $(0\;\cdots\;0\mid0)$ here, which is the same verdict read the other way.
The course on one page
Fifteen lectures, seven exam problems. Where does each step of a problem live?
One variable
- 1 Linear, quadratic and polynomial functions. A linear function has a constant slope; a quadratic function has its top or bottom at the vertex; a root $r$ of a polynomial gives a factor $x-r,$ and division leaves a remainder. Read again: Linear functions · Quadratics · Polynomials · Division
- 2 Powers, exponentials, logarithms, and the derivative. The derivative is the slope of the tangent, the limit of the Newton quotient; its sign says where $f$ is increasing or decreasing. The natural logarithm undoes $e^{x}.$ Read again: Exponentials · Logarithms · The derivative · Increasing, decreasing
- 3 The rules of differentiation. The limit, then the product rule, the quotient rule and the chain rule: every function of the course can be differentiated. The second derivative is the derivative of the derivative. Read again: Products and quotients · Relative rates · The chain rule
- 4 Exponentials, logarithms, and approximation. Why $e;$ implicit differentiation when $y$ is given by an equation; the linear approximation and the Taylor polynomial. Read again: Why e · Implicit differentiation · Taylor polynomials
- 5 The error term, limits, and 0/0. Taylor's formula prices an approximation with its remainder term; a continuous function may be substituted into; l'Hôpital's rule reads an indeterminate form $0/0.$ Read again: The price of an approximation · Continuity · l'Hôpital · Limits as x → ∞
- 6 Existence, and where to look. The intermediate value theorem forces a root and Newton's method finds it; the extreme value theorem promises a maximum, and the stationary points, the endpoints and the points without a derivative are where to look. Read again: A sign change · Where to look · When a candidate is the answer
- 7 Shape, and then turning round. Local maximum points and the second-derivative test, inflection points; then backwards: the antiderivative, the definite integral as an area, and integration by parts. Read again: Local extreme points · Turning round · It measures area · By parts
Series and two variables
- 8 Infinite totals, and a second variable. Integration by substitution; the improper integral and the geometric series as infinite totals, with present value; a function of two variables and its partial derivatives. Read again: Substitution · Infinite totals · Present value · Partial derivatives
- 9 Contour maps, and walking on them. Level curves make a contour map; isoquants and indifference curves; the chain rule along a path, and the marginal rate of substitution along a contour. Read again: The map · Walking across the map · Along a contour
Optimisation
- 10 Two directions are not enough. An interior maximum needs both partial derivatives to vanish; on a convex set concavity makes a critical point global; a constraint can be substituted, endpoints included. Read again: Where a maximum can be · Concavity decides · A constraint
- 11 Local extrema, existence, and constrained optimisation. The second-derivative test with $A,$ $B,$ $C$ finds a saddle point; a compact set has extremes; the Lagrange multiplier method, and the multiplier as a shadow price. Read again: The test · Existence · Lagrange · The multiplier
Matrices
- 12 Matrices, vectors, and the algebra of linear systems. Matrices, vectors and the inner product; a system of linear equations is one equation $\mathbf{A}\mathbf{x}=\mathbf{b}$ (Fact 12.21); the matrix product, row times column. Read again: Matrices and vectors · Systems of linear equations · Matrix multiplication · A system is one equation
- 13 Rules, the transpose, and solving the system. Which rules of numbers survive for matrices; the transpose; Gaussian elimination (Method 13.16) and the three outcomes (Fact 13.20). Read again: Three rules that do not survive · Gaussian elimination · How many solutions · The shape of the solution set
- 14 Determinants and the inverse. Determinants of order 2 and 3 (Method 14.7); the inverse; $|\mathbf{A}|\ne0$ exactly when there is one solution for every $\mathbf{b}$ (Fact 14.26). Read again: Determinants of order 3 · The inverse · Solving with the inverse
- 15 One array, four questions. What stands right of the rule picks the question; the inverse by row operations (Method 15.3); the determinant predicts, elimination decides (Fact 15.7). Read again: Reading the array · The inverse · Which tool
An exam problem is a chain of such steps, and the chain crosses the map. The question below is about the chain in the linear-algebra problem of the exam.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
The exam's linear-algebra problem has the form: compute $|\mathbf{A}|$ for a $3\times3$ matrix with a parameter $a,$ decide for which $a$ the system has exactly one solution, and solve it for each remaining $a.$ Which lectures does a complete solution draw on?
- Why is that answer tempting? The determinant decides only exactly one or not. For the remaining values it says nothing further (Watch out 15.8); those are decided by elimination, Lecture 13.
- Why is that answer tempting? Elimination does answer every question, but the problem asks for $|\mathbf{A}|,$ and finding the values of $a$ where it vanishes means finding the roots of a polynomial in $a$ — Lecture 1.
- Why is that answer tempting? Nothing is optimised here. The values of $a$ that matter are the roots of $|\mathbf{A}|,$ where exactly one solution fails.
Three lectures, in this order. The determinant by expansion along the first row is Method 14.7 of Lecture 14. It is a polynomial in $a,$ and its roots are found as in Polynomials of Lecture 1 (an integer root by trying the divisors of the constant term, then a factor $a-r$). For every other $a$ there is exactly one solution (Fact 14.26); for each root, eliminate and read the last row (Fact 15.7).
What you should take away
- The block is one procedure applied to one object. Row operations on $(\mathbf{A}\mid\;\cdot\;)$; what stands right of the rule decides the question.
- Row operations act on rows. Column interchanges are not among them: they rename the unknowns.
- A column with no leading entry is a free unknown, not a zero one.
- The inverse by row operations: reduce $(\mathbf{A}\mid\mathbf{I}_{n})$; if the left block becomes $\mathbf{I}_{n}$, the right block is $\mathbf{A}^{-1}$; if a row of the left block becomes zero, $\mathbf{A}$ is singular. The determinant is never used, and never divided by.
- The answer is the right block, and only after the left block is exactly $\mathbf{I}$ — clearing above the leading entries is optional when solving a system and compulsory here.
- $p$ systems sharing a coefficient matrix are solved in one reduction of $(\mathbf{A}\mid\mathbf{b}^{1}\cdots\mathbf{b}^{p})$. The inverse is the case $\mathbf{b}^{j}=\mathbf{e}_{j}$, and this is what $\mathbf{A}^{-1}$ is actually for.
- $|\mathbf{A}|$ predicts; elimination decides. When $|\mathbf{A}|=0$ the determinant has said all it can, and the last row of the eliminated array says the rest.
Think further
Questions without computation. Think on your own or with a classmate before opening the thought.
Discussion question 1 — counting degrees of freedom
A system in five unknowns eliminates to a staircase with leading entries in columns $1$, $2$ and $4$, and no inconsistent row. How many degrees of freedom?
One way to think about it
Two. There is no inconsistent row, so there are solutions. The columns of the unknowns without a leading entry are $3$ and $5,$ so $x_3$ and $x_5$ are free, and the other three unknowns are written in terms of them: five unknowns minus three leading entries. The column after the rule is not an unknown and is not counted, and neither free unknown is zero (Watch out 15.2).
Discussion question 2 — reversible is not enough
Why is interchanging two columns of $(\mathbf{A}\mid\mathbf{b})$ not an elementary row operation, given that it can be undone?
One way to think about it
Because the row operations are licensed by more than reversibility. Each of them replaces the equations by equations in the same unknowns with the same solutions, so the array still stands for the system one started with (Fact 13.14). A column records which unknown its coefficients belong to; swapping two columns of $\mathbf{A}$ gives the system with those two unknowns renamed. Its solutions are the old ones with two coordinates exchanged — $(1,2,3)$ becomes $(3,2,1)$ when columns $1$ and $3$ change places — so the solution set has changed unless you remember to swap back (Watch out 15.1). Swapping a column of $\mathbf{A}$ with $\mathbf{b}$ is worse: $\mathbf{b}$ is not an unknown at all, and the new array stands for an unrelated system.
Discussion question 3 — a zero row in the left block
You reduce $(\mathbf{A}\mid\mathbf{I})$ and the left block acquires a row of zeros. What have you learned, and what should you do next?
One way to think about it
That $\mathbf{A}$ is singular: it has no inverse, and $|\mathbf{A}|=0$ (Method 15.3, step 4). The left block can never reach $\mathbf{I},$ so stop; the right block means nothing (Example 15.5). If the inverse was wanted to solve $\mathbf{A}\mathbf{x}=\mathbf{b},$ go back to $(\mathbf{A}\mid\mathbf{b})$ and eliminate: the last row decides between infinitely many solutions and none (Fact 15.7, Watch out 15.8). A singular $\mathbf{A}$ is not the end of the system, only of its inverse.
Discussion question 4 — the least work for four systems
Four systems share one $3\times3$ coefficient matrix with $|\mathbf{A}|\ne0$ and differ only in $\mathbf{b}$. Which of the following is least work?
(A) Cramer's rule on each: sixteen determinants of order $3$;
(B) Gaussian elimination on each of the four arrays, from the beginning;
(C) computing $|\mathbf{A}|$, which determines all four solutions;
(D) one reduction of $(\mathbf{A}\mid\mathbf{b}^{1}\,\mathbf{b}^{2}\,\mathbf{b}^{3}\,\mathbf{b}^{4})$.
One way to think about it
(D). The row operations are chosen by $\mathbf{A}$ alone, so one reduction of the wide array does what (B) does four times, and gives the four solutions as four columns. (A) is correct but the most expensive route: one determinant for $|\mathbf{A}|$ and three more for each system, sixteen of order $3.$ (C) is not a method at all: $|\mathbf{A}|\ne0$ promises that each system has exactly one solution and produces none of them. Writing $\mathbf{I}$ in place of the four $\mathbf{b}$'s would cost the same as (D) and give $\mathbf{A}^{-1},$ which also serves a fifth right-hand side.