Euler Hall — free maths guides

Eliminate downward to upper-triangular form

Clear every entry below each pivot, column by column. The idea in plain words, a worked example, and a check with the answers shown — part of the free Linear Algebra guides.

In plain words

Forward elimination is nothing more than one step, repeated in a fixed order. The order is what makes it an algorithm rather than a collection of tricks.

For a3×33\times3:

1. Column 1. Takea11a_{11} as the pivot — exchange rows first if it is zero. Cleara21a_{21} withℓ21=a21/a11\ell_{21}=a_{21}/a_{11}, thena31a_{31} withℓ31=a31/a11\ell_{31}=a_{31}/a_{11}. 2. Column 2. Take the newa22a_{22} as the pivot. Cleara32a_{32} withℓ32\ell_{32}, read from the matrix as it now stands. 3. Column 3. Nothing below the diagonal to clear. You are done.

The result is upper triangular:

U=[u11u12u130u22u2300u33]U=\begin{bmatrix}u_{11}&u_{12}&u_{13}\\0&u_{22}&u_{23}\\0&0&u_{33}\end{bmatrix}

Two rules carry the whole procedure. Go column by column, left to right. And never touch a row you have already finished with — once column 1 is done, row 1 is a pivot row and nothing rewrites it again.

Why the columns, and why left to right

Each column's pivot lives in a row that must have zeros everywhere to its left already. Columnkk's pivot is taken from rowkk, and rowkk has entries in columns1,…,k−11,\dots,k-1 that were cleared by the earlier stages.

Clearing columnkk uses only rows1,…,k−11,\dots,k-1 as pivot rows. Those rows are finished: no later step touches them. So each stage works on a strictly smaller bottom-right block, and the triangular shape grows one row and one column at a time.

That is also why the count of operations has the shape it does: the first stage touches(n−1)n(n-1)n entries, the second(n−2)(n−1)(n-2)(n-1), and so on, summing to about13n3\tfrac13n^3. The shrinking block is the reason elimination is affordable at all.

Worked example, in the exam's shape

Reduce A=[132275386]A=\begin{bmatrix}1&3&2\\2&7&5\\3&8&6\end{bmatrix} to upper triangular form, carrying the right sideb=(4,9,10)\mathbf{b}=(4,9,10) along.

[1324275938610]\left[\begin{array}{ccc|c}1&3&2&4\\2&7&5&9\\3&8&6&10\end{array}\right]

Column 1. Pivot11.ℓ21=2/1=2\ell_{21}=2/1=2:R2→R2−2R1R_2\to R_2-2R_1 gives(0, 1, 1∣1)(0,\,1,\,1\mid1).ℓ31=3/1=3\ell_{31}=3/1=3:R3→R3−3R1R_3\to R_3-3R_1 gives(0, −1, 0∣−2)(0,\,-1,\,0\mid-2).

[132401110−10−2]\left[\begin{array}{ccc|c}1&3&2&4\\0&1&1&1\\0&-1&0&-2\end{array}\right]

Column 2. The pivot is now11, and the entry below it is−1-1, soℓ32=−1\ell_{32}=-1 andR3→R3+1⋅R2R_3\to R_3+1\cdot R_2 gives(0, 0, 1∣−1)(0,\,0,\,1\mid-1).

[13240111001−1]=[ U∣c ]\left[\begin{array}{ccc|c}1&3&2&4\\0&1&1&1\\0&0&1&-1\end{array}\right]=[\,U\mid\mathbf{c}\,]

Back substitute.z=−1z=-1; theny+(−1)=1y+(-1)=1 soy=2y=2; thenx+3(2)+2(−1)=4x+3(2)+2(-1)=4 sox=0x=0.

Check in the original rows. Row 2:2(0)+7(2)+5(−1)=14−5=92(0)+7(2)+5(-1)=14-5=9 ✓. Row 3:3(0)+8(2)+6(−1)=16−6=103(0)+8(2)+6(-1)=16-6=10 ✓.

The pivots are1, 1, 11,\,1,\,1 and their product is11, which equalsdet⁡A\det A since no exchange was used.

By the end you can
  • Clear every entry below each pivot, column by column
  • Carry the right-hand side through the same steps
  • Read the pivots off the diagonal of the resultingUU
Check yourself
  1. 1. Eliminate[1234]\begin{bmatrix}1&2\\3&4\end{bmatrix} toUU. What are the pivots?
  2. 2. In a3×33\times3, how many entries does the first stage clear?
  3. 3. Which row does the second stage never change?
  4. 4. What is the second multiplier in[1123]\begin{bmatrix}1&1\\2&3\end{bmatrix} after column 1 is cleared?
  5. 5. Why does a silent row exchange make the pivot product differ fromdet⁡A\det A?
Answers
  1. 1.ℓ=3\ell=3,U=[120−2]U=\begin{bmatrix}1&2\\0&-2\end{bmatrix}, pivots11 and−2-2.
  2. 2. Two: the entries in rows 2 and 3 of column 1.
  3. 3. Row 1 — it is the pivot row for column 1 and is finished.
  4. 4. Column 1:ℓ=2\ell=2, giving[1101]\begin{bmatrix}1&1\\0&1\end{bmatrix}. The second multiplier is1/1=11/1=1.
  5. 5. An exchange flips the sign of the determinant, sou11u22⋯unn=−det⁡Au_{11}u_{22}\cdots u_{nn}=- \det A. Writing the equality the wrong way round is a sign error, not an arithmetic one.
Work out where to start — free, no accountAnswer six real questions — free, no account