SOLVETUTORMATH SOLVER

Instrument MI-01-345 · Mathematics

LU Decomposition Calculator

A matrix can be split into two simpler triangular pieces. Enter its four entries, and this sheet returns that split.

Instrument MI-01-345
Sheet 1 OF 1
Rev A
Verified
Type 05 — Algebra SER. 2026-01345

U (row 2, col 2)

1.00000000

L₂₁ = c ⁄ a

2.00000000 L (row 2, col 1)
The working Every figure verified twice
  1. l21 = 4 ⁄ 2 = 2.00000000
  2. u22 = 3 − 1·(4 ⁄ 2) = 1.00000000
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

LU decomposition rewrites a matrix as the product of two triangular matrices: L, lower-triangular with 1s along its own diagonal, and U, upper-triangular, holding the results of eliminating entries below the diagonal — the same bookkeeping ordinary Gaussian elimination performs, just recorded as two matrices instead of thrown away after use. For a 2×2 matrix [[a,b],[c,d]], only two entries genuinely need computing: L₂₁ = c⁄a (how much of row 1 gets subtracted from row 2 during elimination) and U₂₂ = d − b·(c⁄a) (what remains in row 2 after that subtraction).

The other four entries of L and U are fixed by the decomposition's own definition: L's diagonal is always 1, 1, and its upper-right entry is always 0 (it's lower-triangular); U's top row simply matches the original matrix's top row, a and b, unchanged, and its lower-left entry is always 0 (it's upper-triangular).

This decomposition matters because triangular matrices make several operations dramatically faster than working with the original matrix directly — solving a linear system, computing a determinant, or checking invertibility all become simple, direct calculations once a matrix is already split into L and U, exactly why LU decomposition sits underneath many larger numerical linear-algebra routines.

L21=caL_{21} = \frac{c}{a}U22=dbcaU_{22} = d - b\cdot\frac{c}{a}
a, b, c, d — the original matrix's entries; L₂₁ — lower-triangular L's one non-trivial entry; U₂₂ — upper-triangular U's bottom-right entry.
  • Enter the matrix's four entries into the a, b, c, and d fields, reading left to right, top to bottom.
  • Read L (row 2, col 1) and U (row 2, col 2): the sheet computes the two non-trivial entries directly, since the rest of L and U are fixed by definition.
  • Multiply L by U by hand to confirm the result reconstructs the original four entries exactly.

Worked example — [[2,1],[4,3]]

The matrix [[2,1],[4,3]] decomposes to L₂₁ = 4⁄2 = 2 and U₂₂ = 3 − 1×2 = 1 — giving L = [[1,0],[2,1]] and U = [[2,1],[0,1]]. Multiplying L×U reconstructs the original exactly: row 2 becomes (2×2, 2×1+1×1) = (4,3), matching perfectly.

The identity matrix [[1,0],[0,1]] decomposes trivially, with L₂₁=0 and U₂₂=1 — L is already the identity, and U matches the original matrix exactly, since no elimination step was needed at all.

Questions

What is LU decomposition?

A way of splitting a matrix into a lower-triangular matrix L (with 1s on its own diagonal) and an upper-triangular matrix U, such that multiplying L by U reconstructs the original matrix exactly — the recorded bookkeeping of ordinary Gaussian elimination.

Why are only two entries computed for a 2×2 matrix?

Because the rest of L and U are fixed by the decomposition's own structure: L's diagonal is always 1,1 with a 0 in the upper right, and U's top row always matches the original matrix's top row exactly — only L₂₁ and U₂₂ genuinely need computing.

Why is LU decomposition useful?

Triangular matrices make solving linear systems, computing determinants, and checking invertibility dramatically faster than working with the original matrix — LU decomposition does the harder elimination work once, up front, so those later operations become simple direct calculations.

What if a is zero?

The formula for L₂₁ divides by a, so a zero value there makes the decomposition undefined as written — a different pivoting strategy (swapping rows first) would be needed, a case outside this page's simple direct-formula scope.

Does L×U always reconstruct the original matrix exactly?

Yes, by construction — L and U are specifically defined so that multiplying them back together always reproduces the original matrix's four entries precisely, the defining property any correct LU decomposition must satisfy.

References