4.5.26 · D1Linear Algebra (Full)

Foundations — LU decomposition — algorithm, applications

3,228 words15 min readBack to topic

This page assumes you have seen nothing. Every symbol the parent note throws at you — , , , , , , the multiplier , "pivot", "triangular", , — is built here, from a picture, in an order where each brick rests on the last.


1. A number, a list of numbers, a grid of numbers

Before any letter with fancy subscripts, three objects.

Figure — LU decomposition — algorithm, applications
Figure 1 — Scalar vs vector vs matrix. One yellow dot is a scalar (a lone number, ). A blue column of dots joined by a stroke is a vector (a stacked list, over ). A green block of dots is a matrix (the full grid). Read left to right: complexity grows from one number, to a list, to a grid.


2. Reading a matrix: rows, columns, and the subscript

Every entry of a grid needs an address.

Figure 2 — The address . A grid of blue dots each labelled with its address. The yellow arrows show the two counting directions: rows counted downward, columns counted rightward. The red dot marks — row , column — showing the "row first, column second" rule in action.

In the figure, (highlighted red) sits in row 2, column 1. This ordering never changes: row first, column second. The parent note writes and and — all of them obey this same rule.


3. The diagonal, and what "triangular" means

Draw the line from the top-left corner down to the bottom-right corner. The entries this line passes through — — are the diagonal.

Figure 3 — Lower vs upper triangular. Left grid: non-zero entries (marked ) fill the lower-left triangle, zeros sit above the yellow dashed diagonal — lower triangular. Right grid: non-zeros fill the upper-right triangle, zeros sit below the diagonal — upper triangular. The dashed yellow line in each is the diagonal that splits the grid in half.

The figure shows both. The word "triangular" is literal: the non-zero numbers fill a triangle, one half of the grid.


4. Multiplying a matrix by a vector — what actually does

is not "multiply everything by everything". It has a precise recipe.

For the example ():

Matrix times matrix — for us the product of the two half-grids defined in Section 3 — follows the same row-walks-column rule, done for every column of the second matrix. That is why the parent's check makes sense: multiply the two half-grids back together and you rebuild the original.


5. The pivot and the multiplier — the two numbers elimination produces

Now the two starring symbols of the whole topic.

Figure 4 — Pivot and multiplier in action. The green dot is the pivot ; the red dot below it is the entry we want to erase. The yellow arrow points from pivot to target. The formula shows the ratio, and the bottom line shows the row operation that zeros the red entry.

The punchline the parent relies on: these multipliers, written into a grid with 's on the diagonal by the rule above, are . The pivots, sitting on the diagonal of the cleaned-up grid, are the diagonal of . Nothing extra is computed — you just save what you already did. That saving is Gaussian Elimination with a memory, which is the whole idea of LU.


6. The determinant and why pivots give it


7. The permutation matrix — when a row must move

Sometimes the pivot lands on a . You cannot divide by zero, so you swap rows to bring a good pivot up. Recording which rows swapped is the job of .

That is why pivoting turns into . Full detail lives in Permutation Matrices.


8. How every foundation feeds the topic

Scalar single number

Vector column of numbers

Matrix grid of numbers

Square matrix n by n

Subscript a_ij row then column

Diagonal and triangular shape

Matrix times vector equals equations

Pivot anchor entry

Multiplier m_ik ratio

Determinant product of pivots

Permutation matrix row swaps

LU decomposition A equals LU


9. Sanity check on the parent's smallest example

The parent factors (square, ). Let us confirm every symbol above lands correctly — this is stage of the loop, the only stage since .

Every symbol earned; nothing borrowed.


Equipment checklist

Read each line's left side, answer aloud, then reveal.

What does the subscript point to?
The entry in row , column — row first, column second.
What does stand for?
The common count of rows and columns of a square matrix (); also the length of and .
What are and in ?
is the unknown vector we solve for; is the known right-hand-side vector — both length .
Why must be square for LU?
You need one diagonal pivot per column, which requires equal row and column counts ().
Where do the diagonal entries of a matrix live?
On the line from top-left to bottom-right, where row number equals column number ().
What makes a matrix lower triangular?
Every entry above the diagonal is zero.
What does "unit lower triangular" add to that?
The diagonal entries are all .
How do you compute entry of ?
Walk row of against , multiply matched pairs, sum them.
Why is the same as a system of equations?
Each row of the product spells out one equation exactly.
What range does the stage index run over?
— one stage per column, stopping one short of .
What is a pivot?
The diagonal anchor entry you divide by to eliminate the column below it; the diagonal of .
What is the multiplier and why a ratio?
; it is the only number that makes rowrow zero out position .
How are the entries of assembled?
, for , and for .
How do you read off the factors (no swaps)?
Product of the pivots (since ).
How does a row swap change ?
It multiplies by , so .
What does a permutation matrix do?
Shuffles the rows of (identity with rows swapped), used when a pivot is zero or tiny.
What is partial pivoting and why do it?
Swap the row with the largest-magnitude entry into the pivot position, keeping every multiplier so rounding errors do not blow up.

Connections

  • Gaussian Elimination — the elimination process that spits out pivots and multipliers.
  • Triangular Systems & Substitution — why triangular grids solve instantly.
  • Determinants — the product-of-pivots shortcut.
  • Permutation Matrices — the row-swap bookkeeping .
  • Matrix Inverse — assembling column by column from .
  • Cholesky Decomposition — the symmetric positive-definite special case.
  • LU decomposition — algorithm, applications — the parent topic these foundations feed.