---
title: "LU factorization: x-3y+10z=3"
subject: "Numerical Method"
chapter: 3
key: "semester_4/numerical_method:lu-factorization-x-3y-10z"
source: https://www.bctengineer.com/q/semester_4/numerical_method/lu-factorization-x-3y-10z
site: BCT Engineering
---

# LU factorization: x-3y+10z=3

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

- Asked in: 2071 Magh, 8 marks
- Video: [24. LU Decomposition Method, Solving System Of Equations - Problem 1|M1|](https://www.youtube.com/watch?v=__WG6iGAdEc) — Trouble- Free
- 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-x-3y-10z
- Whole chapter: https://www.bctengineer.com/md/semester_4/numerical_method/chapter-3

## Question

Solve the following set of linear equations using LU factorization method.
x - 3y + 10z = 3
-x + 4y + 2z = 20
5x + 2y + z = -12

## Short answer

Decompose A into L and U using Doolittle’s method. Forward substitution on L·y = b gives y, then back substitution on U·x = y yields x = -4.0000, y = 3.1739, z = 1.6522.

## 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
x - 3y + 10z = 3
-x + 4y + 2z = 20
5x + 2y + z = -12
```
A = [1 -3 10; -1 4 2; 5 2 1], b = [3, 20, -12]ᵀ

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

```text
Row 1 of U: u11 = 1.0000, u12 = -3.0000, u13 = 10.0000
Column 1 of L: l21 = a21/u11 = -1.0000/1.0000 = -1.0000, l31 = a31/u11 = 5.0000/1.0000 = 5.0000
Row 2 of U: u22 = a22 − l21·u12 = 4.0000 − (-1.0000)(-3.0000) = 1.0000; u23 = a23 − l21·u13 = 2.0000 − (-1.0000)(10.0000) = 12.0000
l32 = (a32 − l31·u12)/u22 = (2.0000 − (5.0000)(-3.0000))/1.0000 = 17.0000
u33 = a33 − l31·u13 − l32·u23 = 1.0000 − (5.0000)(10.0000) − (17.0000)(12.0000) = -253.0000
```

Result:

L =
```text
 1.0000   0.0000   0.0000
-1.0000   1.0000   0.0000
 5.0000  17.0000   1.0000
```
U =
```text
   1.0000    -3.0000    10.0000
   0.0000     1.0000    12.0000
   0.0000     0.0000  -253.0000
```
(Check: L·U reproduces A.)

#### Step 3: Solve L·y = b (forward substitution)
```text
y1 = 3.0000
y2 = 20.0000 − (-1.0000)(3.0000) = 23.0000
y3 = -12.0000 − (5.0000)(3.0000) − (17.0000)(23.0000) = -418.0000
```

#### Step 4: Solve U·x = y (back substitution)
```text
z = (-418.0000) / -253.0000 = 1.6522
y = (23.0000 − (12.0000)(1.6522)) / 1.0000 = 3.1739
x = (3.0000 − (-3.0000)(3.1739) − (10.0000)(1.6522)) / 1.0000 = -4.0000
```

**Answer: x = -4.0000, y = 3.1739, z = 1.6522**

## Check yourself

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

1. In the Doolittle LU factorization A = L·U used here, what is true of L?
   A. It is lower triangular with 1s on the diagonal
   B. It is upper triangular with 1s on the diagonal
   C. It is diagonal
   D. It is the same as U
   Answer: A. Doolittle has unit diagonal on L; U carries the pivots. (Key point: Doolittle form)

2. After finding L and U, in what order is the system solved?
   A. Solve U·y = b first, then L·x = y
   B. Solve L·y = b by forward substitution, then U·x = y by back substitution
   C. Invert A and multiply by b
   D. Iterate until x stops changing
   Answer: B. A·x = b becomes L·(U·x) = b; set y = U·x, solve for y then x. (Key point: Solution sequence)

3. For A = [1 -3 10; -1 4 2; 5 2 1], what are l21 and u22?
   A. l21 = 1 and u22 = 4
   B. l21 = -1 and u22 = 7
   C. l21 = -1 and u22 = 1
   D. l21 = 5 and u22 = 1
   Answer: C. l21 = a21/u11 = -1; u22 = a22 - l21·u12 = 4 - (-1)(-3) = 1. (Key point: Entries of L and U)

4. Given u33 = -253 and y3 = -418, what is z?
   A. z = 1.6522
   B. z = -1.6522
   C. z = 0.6053
   D. z = 3.1739
   Answer: A. z = y3/u33 = -418/-253 = 1.6522. (Key point: Back substitution)

## Close variants set in other exams

- [Iterative method: 4 equations](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Aiterative-method-four-equations) — Numerical Method, chapter 3, asked 2×

## Related in Numerical Method

- [LU factorization: 5x1+2x2+3x3](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Alu-factorization-5x1) — Numerical Method, chapter 3, asked 2×
- [Gauss elimination: x+2y+3z=6](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Agauss-elimination-x-2y-3z) — Numerical Method, chapter 3, asked 3×
- [Gauss-Seidel: 20x+y-2z=17](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Agauss-seidel-20x-y-2z) — Numerical Method, chapter 3

## Related in other subjects

- [Solve ODE by Laplace transform y''+4y'+3y=0](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Asolve-ode-by-laplace-transform-y-four) — Mathematics III, chapter 3, asked 18×
- [Solve ODE by Laplace transform y''+4y'+3y=eᵗ](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Asolve-ode-by-laplace-transform-y-five) — Mathematics III, chapter 3, asked 16×
- [Solve ODE by Laplace transform y''+4y'+3y=0](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Asolve-ode-by-laplace-transform-y-eight) — Mathematics III, chapter 3, asked 13×
- [Solve ODE by Laplace transform y''+4y'+3y=t](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Asolve-ode-by-laplace-transform-y-14) — Mathematics III, chapter 3
