You are on page 1of 7

Linear Algebra Refresher

Part 2

An introduction to Lower Upper


Decomposition of a Matrix

Spotle.ai Study Material


1
Spotle.ai/Learn
Instructors

Mousum Dutta
Chief Data Scientist, Spotle.ai
IIT Kharagpur

Dr Soumen Nandi
Research Scientist
Indian Statistical Institute

Spotle.ai Study Material


2
Spotle.ai/Learn
Lower Upper (LU) Decompositions
For any nonsingular square matrix An×n, there exists two matrices L and U
such that A = LU, where L is a lower triangular matrix and U is an upper
triangular matrix.

𝑢11 𝑢12 ⋯ 𝑢1𝑛 𝑙11 0 ⋯ 0


0 𝑢22 ⋯ 𝑢2𝑛 𝑙21 𝑙22 ⋯ 0
𝑈= 𝐿=
⋮ ⋮ ⋱ ⋮ ⋮ ⋮ ⋱ ⋮
0 0 ⋯ 𝑢𝑛𝑛 𝑙𝑛1 𝑙𝑛2 ⋯ 𝑙𝑛𝑛

Note that LU decompositions are not unique. Given a matrix A that can be
expressed as a product of L and U, the following holds.

(𝜆 )
1
𝐴 = 𝐿𝑈 ⇒ 𝐴 = (𝜆𝐿) 𝑈 ∀𝜆 ≠ 0

Spotle.ai Study Material


3
Spotle.ai/Learn
Some Terms And Definitions

Upper Triangular Matrix is a square matrix with all the elements above
the principal diagonal are 0.
For example:

100
450
789

Lower Triangular Matrix is a square matrix where all elements below the
principal elements are 0.
For example:

167
024
008

Spotle.ai Study Material


4
Spotle.ai/Learn
How Are LU Decompositions Used?

The LU decomposition method is used by systems to solve simultaneous


equations and applied to real world problems like analysing call data
records, calculating current in a circuit etc.

a11x1 + a12x2 + a13x3 = b1


a21x1 + a22x2 + a23x3 = b2
a31x1 + a32x2 + a33x3 = b3

For example the above system of equations can solved by expressing the
problems as AX = B where A is the co-efficient matrix. A can then be
substituted by LU to give the value of X.

Spotle.ai Study Material


5
Spotle.ai/Learn
LU Decompositions and
Solving Simultaneous Equations

System of Linear Equations:

Suppose LU decompositions of A is
𝐿𝑈𝒙 = 𝒃 𝑜𝑟 𝐿𝒚 = 𝒃 𝑤h𝑒𝑟𝑒 𝒚 = 𝑈𝒙

We can solve Ly = b by forward substitution and get y

Then we can solve y = Ux by backward substitution and get x

Spotle.ai Study Material


6
Spotle.ai/Learn
LU Decompositions and
Solving Simultaneous Equations
Let us illustrate with an example:

(−4 −6)(𝑥2) (2)


2 1 𝑥1 1 1. Express equation in matrix form,
=
AX = B

(−4 −6) (−2 1)(0 −4)


2. The coefficient matrix A can be
2 1 1 0 2 1
= represented by a LU product as
indicated. Therefore Ly = B

(−2 1)(𝑦2) (2)


1 0 𝑦1 1 3. Solve for y by forward
= ⟹ 𝑦1 = 1, 𝑦2 = 4
substitution

(0 −4)(𝑥2) (4)
2 1 𝑥1 1 4. Solve for x by backward
= ⟹ 𝑥2 = − 1, 𝑥1 = 1
substitution

Spotle.ai Study Material


7
Spotle.ai/Learn

You might also like