---
title: "LU factorization: 5x1+2x2+3x3"
subject: "Numerical Method"
chapter: 3
key: "semester_4/numerical_method:lu-factorization-5x1"
source: https://www.bctengineer.com/q/semester_4/numerical_method/lu-factorization-5x1
site: BCT Engineering
---

# LU factorization: 5x1+2x2+3x3

Numerical Method · Chapter 3: Solution of system of linear algebraic equations

- Asked in: 2074 Bhadra, 8 marks; 2070 Bhadra, 8 marks (asked 2 times)
- Video: [LU Decomposition Method To Solve Linear Equations. Quick, Easy, Credible](https://www.youtube.com/watch?v=Cq7CS2Lgsdg) — Ganesh Institute
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/numerical_method/lu-factorization-5x1
- Whole chapter: https://www.bctengineer.com/md/semester_4/numerical_method/chapter-3

## Question

Solve the following system of equations using LU factorization method.
5x1 + 2x2 + 3x3 = 31
3x1 + 3x2 + 2x3 = 25
x1 + 2x2 + 4x3 = 25

## Short answer

LU factorization (Doolittle): decompose A into L and U, solve Ly=b by forward substitution, then Ux=y by back substitution. Solution: x1=2.5172, x2=3.1034, x3=4.0690.

## Answer

**LU factorization (Doolittle):** write A = L·U, where L is lower triangular with 1s on the diagonal and U is upper triangular. Then solve L·y = b by forward substitution and U·x = y by back substitution.

#### Step 1: System
```text
5x1 + 2x2 + 3x3 = 31
3x1 + 3x2 + 2x3 = 25
x1 + 2x2 + 4x3 = 25
```
A = [5 2 3; 3 3 2; 1 2 4], b = [31, 25, 25]ᵀ

#### Step 2: Find L and U
From A = L·U (compare row by row):

```text
Row 1 of U: u11 = 5.0000, u12 = 2.0000, u13 = 3.0000
Column 1 of L: l21 = a21/u11 = 3.0000/5.0000 = 0.6000, l31 = a31/u11 = 1.0000/5.0000 = 0.2000
Row 2 of U: u22 = a22 − l21·u12 = 3.0000 − (0.6000)(2.0000) = 1.8000; u23 = a23 − l21·u13 = 2.0000 − (0.6000)(3.0000) = 0.2000
l32 = (a32 − l31·u12)/u22 = (2.0000 − (0.2000)(2.0000))/1.8000 = 0.8889
u33 = a33 − l31·u13 − l32·u23 = 4.0000 − (0.2000)(3.0000) − (0.8889)(0.2000) = 3.2222
```

Result:

L =
```text
1.0000  0.0000  0.0000
0.6000  1.0000  0.0000
0.2000  0.8889  1.0000
```
U =
```text
5.0000  2.0000  3.0000
0.0000  1.8000  0.2000
0.0000  0.0000  3.2222
```
(Check: L·U reproduces A.)

#### Step 3: Solve L·y = b (forward substitution)
```text
y1 = 31.0000
y2 = 25.0000 − (0.6000)(31.0000) = 6.4000
y3 = 25.0000 − (0.2000)(31.0000) − (0.8889)(6.4000) = 13.1111
```

#### Step 4: Solve U·x = y (back substitution)
```text
x3 = (13.1111) / 3.2222 = 4.0690
x2 = (6.4000 − (0.2000)(4.0690)) / 1.8000 = 3.1034
x1 = (31.0000 − (2.0000)(3.1034) − (3.0000)(4.0690)) / 5.0000 = 2.5172
```

**Answer: x1 = 2.5172, x2 = 3.1034, x3 = 4.0690**

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. In Doolittle LU, L has:
   A. 1s on its diagonal
   B. 1s on U's diagonal
   C. zeros
   D. only rows
   Answer: A. A = LU with unit lower L. (Key point: Doolittle)

2. l21 = a21/u11 equals:
   A. 0.2
   B. 0.6
   C. 1.8
   D. 3
   Answer: B. 3/5. (Key point: l21)

3. After LU, we solve:
   A. Ux = b then Ly = x
   B. Ax = L
   C. Ly = b forward, then Ux = y backward
   D. Both back
   Answer: C. Two triangular solves. (Key point: Steps)

4. The solution is:
   A. x1=1,x2=2,x3=3
   B. x1=4.069,x2=3.1034,x3=2.5172
   C. x1=5,x2=3,x3=1
   D. x1 = 2.5172, x2 = 3.1034, x3 = 4.0690
   Answer: D. From back substitution. (Key point: Solution)

## Related in Numerical Method

- [LU factorization: x-3y+10z=3](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Alu-factorization-x-3y-10z) — Numerical Method, chapter 3, asked 2×
- [Gauss elimination: 4x4 system](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Agauss-elimination-4x4-eleven) — Numerical Method, chapter 3, asked 3×
- [Laplace: 3x3 grid 500/1000/500](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Alaplace-3x3-0-500-1000) — Numerical Method, chapter 7, asked 6×
- [Laplace: 3x3 grid 400/800/600/1200](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Alaplace-3x3-0-400-800) — Numerical Method, chapter 7, asked 6×
- [Laplace: 3x3 grid 200/300/400/500](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Alaplace-3x3-200-300-400-500) — Numerical Method, chapter 7, asked 5×

## Related in other subjects

- [Transfer function from state equations, output x1](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Atf-from-de-3x1-x2) — Control Systems, chapter 8, asked 2×
- [Free body diagram and X1/F, X2/F of two-mass system](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Afbd-m1-m2-k1k2-b1b2) — Control Systems, chapter 2
- [Free body diagram and X1/F1 of two-mass system](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Afbd-tf-m1-m2-k12-b12) — Control Systems, chapter 2
- [Two-mass system with numeric values: F-V analogy and X1/F](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Afv-tf-m1m2-k1k2k3) — Control Systems, chapter 2, asked 3×
