---
title: "LU Decomposition in Linear Algebra"
description: "LU Decomposition factors a matrix into lower and upper triangular matrices, making linear systems easier to solve by forward and back substitution."
canonical: "https://fiveable.me/linear-algebra-and-differential-equations/key-terms/lu-decomposition"
type: "key-term"
subject: "Linear Algebra and Differential Equations"
unit: "Unit 1"
---

# LU Decomposition in Linear Algebra

## Definition

LU decomposition splits a matrix into a lower triangular matrix L and an upper triangular matrix U. In Linear Algebra and Differential Equations, you use it to solve systems efficiently by turning one hard solve into forward and back substitution.

## What It Is

LU decomposition is a matrix factorization that writes a square matrix as A = LU, where L is lower triangular and U is upper triangular. In this course, the big idea is that you replace one system with triangular systems, which are much easier to solve.

The connection to Gaussian elimination is direct. When you eliminate entries below the pivots, the multipliers you used can be stored in L, while the row-echelon form you end with becomes U. So LU is not a random trick, it is a structured record of the elimination process.

If you have a system Ax = b, LU decomposition turns it into LUx = b. First you solve Ly = b using forward substitution, then you solve Ux = y using back substitution. That two-step setup is the main reason the method is efficient, especially when the same matrix A appears with several different right-hand sides.

A compact example helps. Suppose A = [[2, 1], [4, 3]]. After elimination, you get U = [[2, 1], [0, 1]], and the multiplier used to clear the 4 below the pivot is 2, so L = [[1, 0], [2, 1]]. Then solving Ax = b becomes solving two triangular systems instead of restarting elimination from scratch each time.

Not every matrix has an LU factorization in the simple form A = LU. If elimination requires row swaps, you usually need pivoting and write PA = LU, where P is a permutation matrix. That is why pivoting shows up right next to LU in class, because it fixes the cases where the naive factorization breaks down.

One common mistake is thinking LU is a brand new method separate from elimination. It is really Gaussian elimination organized into matrices, with the elimination steps saved instead of thrown away.

## Why It Matters

LU decomposition shows up whenever a linear algebra problem asks you to solve more than one system with the same coefficient matrix. Instead of repeating elimination each time, you factor once and reuse the result, which is faster by hand and much faster in computation-heavy settings.

It also gives you a cleaner view of what Gaussian elimination is doing. The method is not just producing a final answer, it is building two simpler matrices that separate the elimination process from the substitution step. That makes it easier to track where multipliers come from and why certain matrices are easier to solve than others.

In Differential Equations, this matters when systems of equations or matrix methods appear, because you often need to solve linear systems repeatedly inside a larger process. LU decomposition gives you a practical way to carry out those solves without starting over each time.

It is also a good checkpoint for understanding when pivoting is necessary. If a matrix forces row exchanges, that tells you something about the structure of the system and why the plain factorization failed. So LU is not just about computation, it is also about reading the shape of a matrix.

## Connections

### Gaussian Elimination

LU decomposition is built from Gaussian elimination. The elimination multipliers become the entries of L, and the final echelon-style matrix becomes U. If you understand elimination step by step, LU starts to look like a saved version of the same process rather than a separate topic.

### Triangular Matrix

LU works because triangular matrices are easy to solve. A lower triangular matrix lets you use forward substitution, and an upper triangular matrix lets you use back substitution. The whole factorization is designed to turn one hard system into two easier triangular ones.

### Pivoting

Some matrices need row swaps during elimination, and that changes how LU is written. When pivoting is needed, you usually use PA = LU instead of A = LU. That means the row order matters, and the permutation matrix keeps track of those swaps.

### [Back Substitution](/linear-algebra-and-differential-equations/key-terms/back-substitution)

After LU splits the system, back substitution solves the upper triangular part. You do forward substitution first to get an intermediate vector, then back substitution finishes the job. If you mix up the order, the whole method breaks down.

## On the AP Exam

A quiz or problem set question on LU decomposition usually asks you to factor a matrix, identify whether pivoting is needed, or use the factorization to solve Ax = b. You may need to show the elimination multipliers clearly, because those values become the entries of L. Then you solve two triangular systems in order, first with forward substitution and then with back substitution.

If the matrix needs a row swap, the problem may expect PA = LU instead of plain A = LU. That is a common place to lose points, since the factorization is not valid unless you account for the swap. When you check your work, make sure L has 1s on the diagonal and U is the matrix left after elimination. A well-written solution usually shows both the factorization and the final system solve, not just one or the other.

## LU Decomposition vs Gauss-Jordan Elimination

Gauss-Jordan elimination keeps going past row echelon form until you reach reduced row echelon form. LU decomposition stops at an upper triangular matrix and stores the elimination steps in L. If you are asked for a factorization or repeated solves, LU is the better match.

## Key Takeaways

- LU decomposition rewrites a matrix as a lower triangular matrix times an upper triangular matrix.
- It is closely tied to Gaussian elimination, because the elimination multipliers become the L matrix.
- Once you have LU, you solve Ax = b by doing forward substitution first and back substitution second.
- If elimination requires row swaps, you often need pivoting and the form becomes PA = LU.
- LU is especially useful when the same coefficient matrix is used with several different right-hand sides.

## FAQs

### What is LU Decomposition in Linear Algebra and Differential Equations?

LU decomposition is a factorization of a square matrix into a lower triangular matrix L and an upper triangular matrix U. In this course, it is used mainly to solve linear systems more efficiently by turning one system into two triangular systems. It comes straight out of Gaussian elimination.

### How do you find LU decomposition?

You usually find it by doing Gaussian elimination and keeping track of the multipliers used to eliminate entries below the pivots. Those multipliers go into L, while the matrix you end with after elimination is U. If row exchanges are needed, you may have to include a permutation matrix and write PA = LU.

### What is the difference between LU decomposition and Gaussian elimination?

Gaussian elimination is the row-reduction process itself, while LU decomposition packages that process into two matrices. Elimination gives you the upper triangular matrix, and LU keeps the multipliers from that process in a lower triangular matrix. So LU is like a reusable record of elimination.

### Why is LU decomposition useful for solving systems?

It saves time when you need to solve multiple systems with the same matrix A but different right-hand sides. You factor A once, then reuse L and U for each new vector b. That is faster than repeating elimination from scratch every time.

## Related Study Guides

- [1.1 Gaussian Elimination and Matrix Operations](/linear-algebra-and-differential-equations/unit-1/gaussian-elimination-matrix-operations/study-guide/wLn2RdLV1J55dpes)

## About This Document

Canonical Fiveable pages are available as Markdown at the same path plus `.md`.

- [llms.txt](https://fiveable.me/llms.txt): index of Fiveable's sections and URL patterns
- [llms-full.txt](https://fiveable.me/llms-full.txt): complete subject and unit listing
- [MCP server](https://fiveable.me/mcp): call Fiveable as tools instead of fetching pages (`https://fiveable.me/api/mcp`)
- [MCP server for AP teachers](https://fiveable.me/mcp/teachers): a teacher's classes, assignments and AP-rubric grading (`https://fiveable.me/api/mcp/teacher`)

## Structured Data

```json
{"@context":"https://schema.org","@graph":[{"@type":"LearningResource","@id":"https://fiveable.me/linear-algebra-and-differential-equations/key-terms/lu-decomposition#resource","name":"LU Decomposition in Linear Algebra","url":"https://fiveable.me/linear-algebra-and-differential-equations/key-terms/lu-decomposition","learningResourceType":"Concept explainer","educationalLevel":"AP® / High School","about":{"@id":"https://fiveable.me/linear-algebra-and-differential-equations/key-terms/lu-decomposition#term"},"audience":{"@type":"EducationalAudience","educationalRole":"student"},"dateModified":"2026-07-03T02:23:26.893Z","isPartOf":{"@type":"Collection","name":"Linear Algebra and Differential Equations Key Terms","url":"https://fiveable.me/linear-algebra-and-differential-equations/key-terms"},"author":{"@type":"Organization","@id":"https://fiveable.me/editorial#content-team","name":"Fiveable Content Team","url":"https://fiveable.me/editorial","parentOrganization":{"@id":"https://fiveable.me/#organization"},"member":[{"@type":"Person","name":"Amanda DoAmaral","sameAs":["https://www.linkedin.com/in/adoamaral"]},{"@type":"Person","name":"Becky Bahr","sameAs":["https://www.linkedin.com/in/becky-bahr-b52743132"]}]},"publisher":{"@type":"Organization","name":"Fiveable","url":"https://fiveable.me"}},{"@type":"DefinedTerm","@id":"https://fiveable.me/linear-algebra-and-differential-equations/key-terms/lu-decomposition#term","name":"LU Decomposition","description":"LU decomposition splits a matrix into a lower triangular matrix L and an upper triangular matrix U. In Linear Algebra and Differential Equations, you use it to solve systems efficiently by turning one hard solve into forward and back substitution.","url":"https://fiveable.me/linear-algebra-and-differential-equations/key-terms/lu-decomposition","inDefinedTermSet":{"@type":"DefinedTermSet","name":"Linear Algebra and Differential Equations Key Terms","url":"https://fiveable.me/linear-algebra-and-differential-equations/key-terms"}},{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What is LU Decomposition in Linear Algebra and Differential Equations?","acceptedAnswer":{"@type":"Answer","text":"LU decomposition is a factorization of a square matrix into a lower triangular matrix L and an upper triangular matrix U. In this course, it is used mainly to solve linear systems more efficiently by turning one system into two triangular systems. It comes straight out of Gaussian elimination."}},{"@type":"Question","name":"How do you find LU decomposition?","acceptedAnswer":{"@type":"Answer","text":"You usually find it by doing Gaussian elimination and keeping track of the multipliers used to eliminate entries below the pivots. Those multipliers go into L, while the matrix you end with after elimination is U. If row exchanges are needed, you may have to include a permutation matrix and write PA = LU."}},{"@type":"Question","name":"What is the difference between LU decomposition and Gaussian elimination?","acceptedAnswer":{"@type":"Answer","text":"Gaussian elimination is the row-reduction process itself, while LU decomposition packages that process into two matrices. Elimination gives you the upper triangular matrix, and LU keeps the multipliers from that process in a lower triangular matrix. So LU is like a reusable record of elimination."}},{"@type":"Question","name":"Why is LU decomposition useful for solving systems?","acceptedAnswer":{"@type":"Answer","text":"It saves time when you need to solve multiple systems with the same matrix A but different right-hand sides. You factor A once, then reuse L and U for each new vector b. That is faster than repeating elimination from scratch every time."}}]},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Linear Algebra and Differential Equations","item":"https://fiveable.me/linear-algebra-and-differential-equations"},{"@type":"ListItem","position":2,"name":"Key Terms","item":"https://fiveable.me/linear-algebra-and-differential-equations/key-terms"},{"@type":"ListItem","position":3,"name":"Unit 1","item":"https://fiveable.me/linear-algebra-and-differential-equations/unit-1"},{"@type":"ListItem","position":4,"name":"LU Decomposition"}]}]}
```
