Linear Algebra midterm, solved the way Prof. Koçak solves it

Weeks 1 to 7 in about 3 hours: what he asks, the steps he wants to see, and the mistakes that cost points.

−2R1 + R2 → R2
−2R1
multiply row 1 by −2 (row 1 itself stays as it is)
+ R2
add row 2 to that
→ R2
write the result in place of row 2

Every 40-point question on his exam is a chain of lines like this one. Write each of them, in this form.

1What the exam looks like

About 5 minutes

Four past papers from Prof. Koçak are in your files. They all have the same shape. The 2024–25 paper says 50 minutes.

2022–23Vectors: cos θ, when is the dot product zero, distance (20 points)Solve a 3×3 system by Gauss–Jordan (40)A = L·D·U of a 4×4 matrix (40)
Older paper, no yearVectors: the same three parts (20)Solve a 4×4 system by factorization (30)x = A−1b, inverse found by Gauss–Jordan (25)
2024–25Vectors: cos θ, dot product, distance, unit vector (20)Solve a 3×3 system by factorization (40)Solve a 3×3 system by the inverse matrix method (40)
2025–26Orthogonal vectors (find a), lengthA = L·D·U of a 3×3Gauss elimination, inverse by Gauss–Jordan, solve by A = L·U

So: one easy vectors question worth about 20 points, and then 80 points from three tools that are all the same row operations in different packaging.

This year's review sheet asks exactly these, and nothing from "vector spaces and subspaces".

How to use the 3 hoursRead each worked example with a pen in your hand and redo it on paper before you open the next one. Then do the "Try it" and only then open the solution. Reading without writing will not survive the exam.

2His way: seven rules

About 5 minutes

These come straight from how his slides are written. Follow them on every question.

  1. Use the method the question names. A correct answer by another method is the classic way to lose the 40 points.
    • "Gauss elimination": augmented matrix to upper triangle, then solve from the bottom equation up.
    • "Gauss–Jordan": augmented matrix all the way to the identity matrix.
    • "Inverse matrix": find A−1 from [A ⋮ I], then X = A−1·B.
    • "Factorization": find L and U, then solve two triangle systems.
  2. Write every row operation in his form, next to the arrow: kRi + Rj → Rj. The row after the arrow is the row that changes. Do not write "R2 − 2R1" or "R2 ← …".
  3. The pivot row never changes in an operation. You multiply it, add it to another row, and only that other row is rewritten.
  4. No shortcut formulas for 3×3. No determinant-and-cofactor inverse, no Cramer's rule. He taught [A ⋮ I] and that is what he marks.
  5. Write "Step 1" and "Step 2" for the inverse matrix method and for factorization, like his slides.
  6. Keep fractions as fractions (4/5, 12/5), never decimals. Roots stay as roots: his slides leave 1/√30 as it is.
  7. Finish with one clear answer line: x = …, y = …, z = ….
Layout on paperOn your exam sheet write matrices left to right with the operation on top of the arrow, like the slides. In this guide they are stacked top to bottom only so they fit a phone screen. The red text is what goes on the arrow.

3Vectors

About 25 minutes

Week 1. This is the 20 easy points. Every past paper asks the same things, so learn the six lines below by heart.

Dot product (a number)u·v = u1v1 + u2v2 + … + unvn
Norm, also called length‖u‖ = √(u1² + u2² + … + un²)
Angle between two vectorsCosθ = u·v / (‖u‖·‖v‖)
Distanced(u, v) = √((u1−v1)² + … + (un−vn)²)Subtract first, then square, add, root. This is the "2-norm" and it is the one to use when the question just says "distance".
Orthogonal (perpendicular)u·v = 0Same thing as Cosθ = 0, θ = 90°.
Unit vector‖v‖ = 1   if not:   v̂ = v / ‖v‖Dividing by the length is called normalizing. He calls v̂ "the unique unit vector".

For u = (2, −1, 2) and v = (1, 2, 2): find Cosθ, the distance, and check whether u is a unit vector.The usual question 1, with fresh numbers

a) Cosθ
u·v = 2·1 + (−1)·2 + 2·2 = 2 − 2 + 4 = 4
‖u‖ = √(2² + (−1)² + 2²) = √9 = 3
‖v‖ = √(1² + 2² + 2²) = √9 = 3
Cosθ = u·v / (‖u‖·‖v‖) = 4 / (3·3) = 4/9
b) Distance
d(u, v) = √((2−1)² + (−1−2)² + (2−2)²)
= √(1 + 9 + 0) = √10
c) Unit vector?
‖u‖ = 3 ≠ 1, so u is not a unit vector
û = u / ‖u‖ = (2/3, −1/3, 2/3)

Write the formula first, then the numbers, then the result, as above. If the roots do not simplify, leave them: Cosθ = 19 / (√26·√74) is a finished answer.

u = (k, 2, −1) and v = (3, −4, 1) are perpendicular. Find k.

perpendicular ⟹ u·v = 0
3k + 2·(−4) + (−1)·1 = 0
3k − 9 = 0 ⟹ k = 3

The p-norm distance

His slide defines a whole family of distances. Only the power changes.

p-norm distanced(x, y) = (|x1−y1|p + … + |xn−yn|p)1/p 1.norm: just add the absolute differences (called Taxicab or Manhattan). 2.norm: the normal distance above. 3.norm: cube the absolute differences, add, take the cube root.

x = (3, 1) and y = (5, 2). Distance for 1.norm and for 2.norm.His slide example

1.norm: d(x, y) = |3−5| + |1−2| = 2 + 1 = 3
2.norm: d(x, y) = √((3−5)² + (1−2)²) = √(4+1) = √5

v = (1, −3, 4, 2). Find v̂.His slide example

First check: is v a unit vector?
‖v‖ = √(1² + (−3)² + 4² + 2²) = √30 ≠ 1
v̂ = v / ‖v‖ = (1/√30, −3/√30, 4/√30, 2/√30)
Traps
  • A negative number squared is positive: (−3)² = 9.
  • The dot product can be negative. Keep the minus sign in Cosθ.
  • Distance is not ‖u‖ − ‖v‖. Subtract the vectors first.
  • If the vector is not a unit vector, do not stop at "no". Always give v̂.
  • The 2024–25 paper says "identity vector". It means unit vector.
  • "When does the dot product give zero?" Answer: when the vectors are perpendicular (orthogonal), because then Cosθ = 0.

The slides also define the cross product for vectors in ℝ³ (a 3×3 determinant with i, j, k in the first row, giving a vector perpendicular to both, with ‖u×v‖ = ‖u‖·‖v‖·Sinθ). It is in no past paper and not in this year's review, so it is your lowest priority.

Try it
u = (1, 0, −2), v = (3, 4, 0)

Find Cosθ, d(u, v), û, and the 3.norm distance between A = (1, 2) and B = (3, 5).

Show the full solution
u·v = 3 + 0 + 0 = 3
‖u‖ = √(1+0+4) = √5, ‖v‖ = √(9+16+0) = 5
Cosθ = 3 / (5√5)
d(u, v) = √((−2)² + (−4)² + (−2)²) = √24 = 2√6
‖u‖ = √5 ≠ 1 ⟹ û = (1/√5, 0, −2/√5)
3.norm: (|1−3|³ + |2−5|³)1/3 = (8 + 27)1/3 = ∛35

4Row operations in his notation

About 12 minutes

Weeks 2 and 3. Everything after this section is built from three moves. He calls them elementary row operations, and R1, R2, R3 are the rows.

1. Interchange two rowsRi ↔ RjHis slide draws it as Ri → Rj.
2. Multiply a row by a number that is not zerokRi → RiUsed to turn a pivot into 1, for example 1/4R3 → R3.
3. Add a multiple of one row to another rowkRi + Rj → RjThe workhorse. Row i is only used; row j is rewritten.

How to choose k

The pivot is the diagonal entry you are working under (or above). To turn an entry into 0:

k = − (entry you want to kill) / (pivot in the same column)

Then do the same thing to every number in the row, including the part after the dotted line when there is one.

Bring the matrix to an upper triangle matrix.His week 3 slide

24−249−3−2−37
−2R1 + R2 → R2kill the 4 under pivot 2: k = −4/2 = −2
24−2011−2−37
R1 + R3 → R3kill the −2 under pivot 2: k = −(−2)/2 = 1
24−2011015
−R2 + R3 → R3kill the 1 under pivot 1: k = −1/1 = −1
24−2011004

All zeros under the diagonal: this is an upper triangle matrix. The pivots are 2, 1, 4.

Under the arrow he sometimes also writes l21 = 4. That only names the entry being killed: row 2, column 1, value 4. It is a label, not a new step.

Do the arithmetic in the marginFor −2R1 + R2 write the helper line first: −2·(2 4 −2) = (−4 −8 4), then add row 2 (4 9 −3) to get (0 1 1). Most lost points in this course are sign slips in exactly this line.

Words he uses

Elimination matrix

You need this idea once, in section 8. Do one row operation on the identity matrix and you get the elimination matrix E of that operation. Its inverse is the same matrix with the sign of that one number flipped.

Operation −2R1 + R2 → R2

E =100−210001 E−1 =100210001

The multiplier −2 sits in row 2, column 1, the place where the zero is made. In the inverse it becomes +2.

5Gauss and Gauss–Jordan elimination

About 30 minutes

Week 5. Solving A·X = B by elimination. His sentence for it: the main idea is to produce an upper triangle matrix or an identity matrix from the augmented matrix.

  1. Write the augmented matrix [A ⋮ B]: the coefficients, a dotted line, the right-hand side. A missing variable is a 0.
  2. Column 1: make zeros under the first pivot.
  3. Column 2: make zeros under the second pivot. (On his slide he clears the entry above it in the same arrow.)
  4. Gauss elimination ends here. Write the rows back as equations and solve from the bottom one up.
  5. Gauss–Jordan continues: make every pivot 1 with kRi → Ri, clear what is left above the pivots, until the left side is I. The last column is the answer.

Solve the system with the elimination method.His week 5 slide, same operations in the same order

2x + 4y − 2z = 2
4x + 9y − 3z = 8
−2x − 3y + 7z = 10
Gauss elimination
24−2249−38−2−3710
−2R1 + R2 → R2
24−220114−2−3710
R1 + R3 → R3
24−22011401512
−4R2 + R1 → R1−R2 + R3 → R3column 2: he clears above and below the pivot 1 in one arrow
20−6−1401140048

Row echelon form. Read the rows as equations, bottom first:

4z = 8 ⟹ z = 2
y + z = 4 ⟹ y = 2
2x − 6z = −14 ⟹ x = −1
x = −1, y = 2, z = 2
Let's continue: Gauss–Jordan
20−6−1401140048
1/2R1 → R11/4R3 → R3make the pivots 1
10−3−701140012
−R3 + R2 → R23R3 + R1 → R1column 3: clear above the pivot
100−101020012

Reduced row echelon form. The left side is I, so the last column is the solution.

x = −1, y = 2, z = 2

Both halves are one continuous calculation. If the question says Gauss–Jordan, you write all of it and you do not back-substitute.

Traps
  • The operation hits the whole row, including the number after the dotted line.
  • "Gauss–Jordan" with a triangle and back-substitution at the end is Gauss, not Gauss–Jordan. Reach the identity.
  • Two operations on one arrow must both use the rows from before the arrow.
  • Check at the end: put x, y, z into one of the original equations. It takes ten seconds.
Try it: solve by Gauss–Jordan
x + 2y − z = 2
2x + 5y + z = 15
−x + y + 2z = 7
Show the full solution
12−1225115−1127
−2R1 + R2 → R2R1 + R3 → R3
12−12013110319
−2R2 + R1 → R1−3R2 + R3 → R3
10−7−200131100−8−24
−1/8R3 → R3
10−7−20013110013
−3R3 + R2 → R27R3 + R1 → R1
100101020013
x = 1, y = 2, z = 3

Check in equation 2: 2·1 + 5·2 + 3 = 15.

6Inverse of a matrix

About 25 minutes

Week 4. A−1 is the matrix with A·A−1 = A−1·A = I. A matrix has at most one inverse.

Three quick facts from his notes

2 by 2 formula
A =abcd⟹ A−1 = 1/(ad − bc) ·d−b−ca
Swap a and d, change the signs of b and c, divide by ad − bc. It exists only if ad − bc ≠ 0. The formula is for 2 by 2 only.
Diagonal matrixTurn each diagonal entry upside down: diagonal 8, 7 gives diagonal 1/8, 1/7.
Product(AB)−1 = B−1A−1The order reverses.

Slide example: find the inverse.

A =2−143ad − bc = 2·3 − (−1)·4 = 10
A−1 = 1/10 ·31−42=3/101/10−2/51/5

The method he marks: [A ⋮ I] → [I ⋮ A−1]

  1. Write A, a dotted line, and the identity matrix next to it. This is the augmented matrix [A ⋮ I].
  2. Do Gauss–Jordan on it. Every operation is applied to all six numbers of the row.
  3. When the left half is I, the right half is A−1. Write it out separately as the answer.

Find A−1 by Gauss elimination method.His week 4 slide gives this matrix without a solution. Solved here with his operations.

A =121−1−11013
121100−1−11010013001
R1 + R2 → R2column 1: only the −1 needs killing
121100012110013001
−2R2 + R1 → R1−R2 + R3 → R3column 2: above and below the pivot
10−3−1−20012110001−1−11
−2R3 + R2 → R23R3 + R1 → R1column 3: above the pivot
100−4−5301033−2001−1−11
A−1 =−4−5333−2−1−11
30-second checkMultiply the first row of A by the columns of A−1. You must get 1, 0, 0. Here: (1)(−4) + (2)(3) + (1)(−1) = 1, then (1)(−5) + (2)(3) + (1)(−1) = 0, then (1)(3) + (2)(−2) + (1)(1) = 0.

If a pivot is not 1, divide that row at the end, as he does in week 6 with 1/5R2 → R2. Fractions in the answer are normal: this year's review inverses have denominators like 7 and 16.

Traps
  • Forgetting the right half. Each operation changes six numbers, not three.
  • Stopping at the triangle. The left half must be exactly I, with 1s on the diagonal.
  • Using the cofactor or determinant method on a 3×3. Not his way.
Try it: find the inverse
A =101213113
Show the full solution
101100213010113001
−2R1 + R2 → R2−R1 + R3 → R3
101100011−210012−101
−R2 + R3 → R3
101100011−2100011−11
−R3 + R2 → R2−R3 + R1 → R1
10001−1010−32−10011−11
A−1 =01−1−32−11−11

7Solving a system with the inverse matrix

About 15 minutes

Week 6. Worth 40 points on the 2024–25 paper.

A·X = B ⟹ A−1·A·X = A−1·B ⟹ X = A−1·B
  1. Step 1. Write A (the coefficient matrix) and find A−1 with [A ⋮ I], exactly as in section 6.
  2. Step 2. Multiply: X = A−1·B. Each answer is one row of A−1 times the column B.

Solve the system by inverse matrix.His week 6 slide

x − 2y = 10
2x + y = 8
Step 1
A =1−221⟹ A−1 = ?
1−2102101
−2R1 + R2 → R2
1−21005−21
1/5R2 → R2
1−21001−2/51/5
2R2 + R1 → R1
101/52/501−2/51/5
A−1 =1/52/5−2/51/5
Step 2
X = A−1·B ⟹xy=1/52/5−2/51/5108
x = (1/5)(10) + (2/5)(8) = 10/5 + 16/5 = 26/5
y = (−2/5)(10) + (1/5)(8) = −20/5 + 8/5 = −12/5
x = 26/5, y = −12/5

Solve the system by inverse matrix.3×3 version

x + 2y + z = 3
−x − y + z = 2
y + 3z = 8
Step 1
A =121−1−11013⟹A−1 =−4−5333−2−1−11

This is the matrix from section 6. In the exam, the full [A ⋮ I] working goes here.

Step 2
X = A−1·B =−4−5333−2−1−11328
x = (−4)(3) + (−5)(2) + (3)(8) = −12 − 10 + 24 = 2
y = (3)(3) + (3)(2) + (−2)(8) = 9 + 6 − 16 = −1
z = (−1)(3) + (−1)(2) + (1)(8) = −3 − 2 + 8 = 3
x = 2, y = −1, z = 3
Traps
  • Order matters: it is A−1·B, never B·A−1.
  • Do not solve the system by Gauss–Jordan on [A ⋮ B] here. The question wants the inverse shown, then the multiplication.
  • When the exam gives the system already as matrix · column = column, A is that matrix and B is the column on the right.
Try it: solve by inverse matrix
x + 2y + z = 6
−x − y + z = −5
y + z = 2

This one is on his week 6 slide without a solution.

Show the full solution
Step 1
121100−1−11010011001
R1 + R2 → R2
121100012110011001
−2R2 + R1 → R1−R2 + R3 → R3
10−3−1−2001211000−1−1−11
−R3 → R3
10−3−1−2001211000111−1
−2R3 + R2 → R23R3 + R1 → R1
10021−3010−1−1200111−1
A−1 =21−3−1−1211−1
Step 2
X = A−1·B =21−3−1−1211−16−52
x = 12 − 5 − 6 = 1
y = −6 + 5 + 4 = 3
z = 6 − 5 − 2 = −1
x = 1, y = 3, z = −1

8Factorization: A = L·U

About 20 minutes

Week 7 slides (the file is titled "Hafta 7"). Factorization means writing A as a product of two triangle matrices:

A = L·U

The "easy way" (his own name for it)

  1. Eliminate A down to an upper triangle using only kRi + Rj → Rj, working downwards. No scaling of rows, no clearing above the pivots, no right-hand side. The result is U.
  2. Start L as the identity. For each operation kRi + Rj → Rj, put −k in row j, column i of L.
  3. Write A = L·U with both matrices.

A = L·U = ? (find the factorization)His week 7 slide, the example labelled EASY WAY

A =1232673910
1232673910
−2R1 + R2 → R2−3R1 + R3 → R3
123021031
−3/2R2 + R3 → R3
12302100−1/2
= U

Multipliers used: −2, −3, −3/2. Flip the signs and place them where the zeros were made:

L =10021033/21
A =1232673910=10021033/2112302100−1/2
Sign flip, in three examples −2R1 + R2 → R2 puts +2 in row 2, column 1 of L R1 + R3 → R3 puts −1 in row 3, column 1 4/5R2 + R3 → R3 puts −4/5 in row 3, column 2 If a position needed no operation because it was already 0, L has 0 there.

Why it works: the long way

He shows this first, so recognise it. Each operation is an elimination matrix (section 4). Doing them one after another gives U, and moving them to the other side inverts them, which is where the sign flip comes from.

A = L·U = ?His week 7 slide. The L and U printed on the slide have typing mistakes; these are the correct ones.

A =1232−14−121
Step 1
1232−14−121
−2R1 + R2 → R2R1 + R3 → R3E1 and E2
1230−5−2044
4/5R2 + R3 → R3E3
1230−5−20012/5
= U
E1 =100−210001E2 =100010101E3 =10001004/51

Their inverses: flip the sign of the one multiplier.

E1−1 =100210001E2−1 =100010−101E3−1 =1000100−4/51
Step 2
E3·E2·E1·A = U
A = (E1−1·E2−1·E3−1)·U ⟹ A = L·U
A =100210−1−4/511230−5−20012/5= L·U
Check before you move onMultiply row 2 of L by U and row 3 of L by U. You must get rows 2 and 3 of A. If not, a sign in L is wrong.
Traps
  • Putting the multiplier into L without flipping its sign. This is the number one mistake.
  • Dividing a row of U to make the pivot 1. In L·U the pivots stay as they are (2, −5, 12/5 …).
  • Working on the augmented matrix. Factor A alone; B comes in later.
Try it: A = L·U
A =211433−214
Show the full solution
211433−214
−2R1 + R2 → R2R1 + R3 → R3
211011025
−2R2 + R3 → R3
211011003
= U
L =100210−121
A =100210−121211011003

9Solving a system with factorization

About 20 minutes

Week 7. On the papers this is "find the solution by using factorization", worth 30 to 40 points.

  1. Step 1. Factor the coefficient matrix: A = L·U, exactly as in section 8.
  2. Step 2. Write A·X = B ⟹ L·U·X = B. Give the product U·X a name: the column (a, b, c).
  3. Solve L·(a, b, c) = B from the top row down. The first row gives a immediately.
  4. Solve U·X = (a, b, c) from the bottom row up. The last row gives z immediately.

Solve the system with factorization.His week 7 slide. The operation labels and one row of U are mistyped on the slide; the numbers here are the correct ones and give his final answer.

2x + 2y + 2z = 12
4x + 7y + 7z = 24
6x + 18y + 22z = 12
Step 1
22247761822
−2R1 + R2 → R2−3R1 + R3 → R3
22203301216
−4R2 + R3 → R3
222033004
= U
L =100210341
Step 2
A·X = B ⟹ L·U·X = B
100210341222033004xyz=122412

Call U·X the column (a, b, c). First solve L·(a, b, c) = B:

100210341abc=122412
a = 12
2a + b = 24 ⟹ 24 + b = 24 ⟹ b = 0
3a + 4b + c = 12 ⟹ 36 + 0 + c = 12 ⟹ c = −24

Then solve U·X = (a, b, c):

222033004xyz=120−24
4z = −24 ⟹ z = −6
3y + 3z = 0 ⟹ 3y − 18 = 0 ⟹ y = 6
2x + 2y + 2z = 12 ⟹ 2x + 12 − 12 = 12 ⟹ x = 6
x = 6, y = 6, z = −6

A 4×4 system

An older paper gave a 4×4 system here for 30 points, and his slide has one too. Nothing new happens, there is just more of it:

Traps
  • Solving with Gauss elimination on [A ⋮ B] and never writing L. The answer will be right and the method wrong.
  • Using B in the second triangle system. The right-hand side of U·X is (a, b, c), not B.
  • Top-down for L, bottom-up for U. Mixing them makes it look impossible.
Try it: solve by factorization
2x + y + z = 3
4x + 3y + 3z = 7
−2x + y + 4z = −4

Same matrix as the Try it in section 8, so Step 1 is already done.

Show the full solution
Step 1
L =100210−121U =211011003
Step 2
100210−121abc=37−4
a = 3
2a + b = 7 ⟹ b = 1
−a + 2b + c = −4 ⟹ −3 + 2 + c = −4 ⟹ c = −3
211011003xyz=31−3
3z = −3 ⟹ z = −1
y + z = 1 ⟹ y = 2
2x + y + z = 3 ⟹ 2x + 1 = 3 ⟹ x = 1
x = 1, y = 2, z = −1

10Factorization: A = L·D·U

About 10 minutes

Not shown on the slides you gave meA = L·D·U is asked in this year's review (question 9), on the 2022–23 paper for 40 points and on the 2025–26 paper, but no slide in your files solves one. Below is the standard method. The result cannot differ from his, because a matrix has only one L, D, U of this kind. Only the way he lays out the working could differ.

L·D·U is L·U with one more step: the pivots are pulled out of U into a diagonal matrix D.

  1. Find A = L·U as in section 8. L is finished and does not change.
  2. D is the diagonal matrix made of the pivots of U (its diagonal entries).
  3. The new U: divide each row of the old U by its own pivot. Its diagonal becomes 1, 1, 1.
  4. Write A = L·D·U with all three matrices.

A = L·D·U = ?The EASY WAY matrix from his slide, continued

A =1232673910

From section 8:

L =10021033/21U =12302100−1/2

Pivots of U: 1, 2, −1/2. Row 2 divided by 2, row 3 divided by −1/2:

D =10002000−1/2U =123011/2001
A =10021033/2110002000−1/2123011/2001= L·D·U
Traps
  • Dividing by a negative or fractional pivot: −1/2 divided by −1/2 is 1, and 1 divided by 2 is 1/2. Go slowly.
  • L and the new U both have 1s on the diagonal. D has zeros everywhere except the diagonal.
  • When the question says "A = LU and A = LDU", write both results.
Try it: A = L·D·U
A =211433−214

You found L and U in section 8.

Show the full solution
L =100210−121U =211011003
D =200010003new U =11/21/2011001
A =100210−12120001000311/21/2011001

11When a pivot is zero

About 5 minutes

Not shown on the slides you gave meIt does come up: this year's review question 9b starts with a 0, and on the 2024–25 paper the first equation of the factorization question had no x. No slide in your files shows what he writes in this case. Below is the standard fix, built only from his own row operation 1.

You cannot use 0 as a pivot, because k = −entry/pivot would divide by zero. So interchange rows first, then factor the reordered matrix as usual.

  1. Interchange the row that has the 0 with a lower row that has a non-zero number in that column: Ri ↔ Rj. If you can choose, pick the swap that leaves a 0 under the pivot, it saves an operation.
  2. Factor the new matrix into L·U (and D if asked).
  3. In a system, this is only writing the equations in a different order, so interchange the same entries of B.
  4. Say it in words on the paper: "after R1 ↔ R2, A = L·U".

A = L·U = ?Fresh example

012121257
R1 ↔ R2the pivot position holds 0, so bring up a row that starts with a non-zero number
121012257
−2R1 + R3 → R3row 2 already has 0 in column 1: no operation, so L gets 0 there
121012015
−R2 + R3 → R3
121012003
= U
L =100010211

L·U gives the matrix after the interchange, not the original A.

The same thing can happen in Gauss–Jordan or in [A ⋮ I]: if a pivot position holds 0, interchange with a lower row and carry on.

12Summary, slide mistakes, exam room

About 8 minutes

One-screen summary

Vectors u·v = u1v1 + … + unvn ‖u‖ = √(u1² + … + un²) Cosθ = u·v / (‖u‖·‖v‖) d(u, v) = √((u1−v1)² + … ) perpendicular ⟺ u·v = 0    û = u/‖u‖
Row operationkRi + Rj → Rjk = −entry/pivot. Row j changes, row i does not.
Gauss[A ⋮ B] to upper triangle, then equations from the bottom up.
Gauss–Jordan[A ⋮ B] to [I ⋮ solution].
Inverse[A ⋮ I] to [I ⋮ A−1]. For 2 by 2 only: 1/(ad − bc) times (d, −b; −c, a).
Inverse matrix methodStep 1: A−1. Step 2: X = A−1·B.
L·UEliminate downwards to get U. L = identity plus the multipliers with flipped signs.
Solve with factorizationStep 1: L and U. Step 2: L·(a, b, c) = B from the top, then U·X = (a, b, c) from the bottom.
L·D·UD = pivots of U. New U = each row of U divided by its pivot.
Zero pivotInterchange rows first (and the same entries of B).

Mistakes in the slides

If you open the PDFs and something does not match this guide, it is probably one of these. They are typing errors on the slides, checked by recalculating each example.

In the exam room