0% found this document useful (0 votes)
20 views3 pages

Chapter 10 Matrix Inverse

The document discusses calculating the inverse of a matrix. It describes using LU decomposition to solve systems with unit vectors as the right-hand side to obtain each column of the inverse matrix. An example calculates the inverse of a 3x3 matrix using this method and verifies the result. Pseudocode is provided for computing the inverse of a matrix.

Uploaded by

Princess Vargas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views3 pages

Chapter 10 Matrix Inverse

The document discusses calculating the inverse of a matrix. It describes using LU decomposition to solve systems with unit vectors as the right-hand side to obtain each column of the inverse matrix. An example calculates the inverse of a 3x3 matrix using this method and verifies the result. Pseudocode is provided for computing the inverse of a matrix.

Uploaded by

Princess Vargas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Chapter 10

Lu Decomposition and Matrix Inversion

THE MATRIX INVERSE

In the discussion of matrix operations, we introduced the notion that if a matrix [A] is square, there is another
matrix, [𝐴]−1 , called the inverse of [A], for which

[A] [𝐴−1 ] = [𝐴]−1 [𝐴] = [𝐼]

Now we will focus on how the inverse can be computed numerically. Then we will explore how it can be
used for engineering analysis.

Calculating the Inverse

The inverse can be computed in a column-by-column fashion by generating solutions with unit vectors as
the right-hand-side constants. For example, if the right-hand-side constant has a 1 in the first position and
zeros elsewhere,
1
{𝑏} = {0}
0

the resulting solution will be the first column of the matrix inverse. Similarly, if a unit vector with a 1 at the
second row is used
0
{𝑏} = {1}
0

the result will be the second column of the matrix inverse.


The best way to implement such a calculation is with the LU decomposition algorithm described at
the beginning of this chapter. Recall that one of the great strengths of LU decomposition is that it provides
a very efficient means to evaluate multiple right-hand-side vectors. Thus, it is ideal for evaluating the
multiple unit vectors needed to compute the inverse.

EXAMPLE 1. Matrix Inversion

Problem Statement. Employ LU decomposition to determine the matrix inverse for the system previous
example.
3 −0.1 −0.2
[A] = [0.1 7 −0.3]
0.3 −0.2 10

Recall that the decomposition resulted in the following lower and upper triangular matrices:

3 −0.1 −0.2 1 0 0
[U] = [0 7.00333 −0.293333] [L] = [0.0333333 1 0]
0 0 10.0120 0.100000 −0.0271300 1

Solution. The first column of the matrix inverse can be determined by performing the forward-substitution
solution procedure with a unit vector (with 1 in the first row) as the right-hand-side vector. Thus, the lower-
triangular system, can be set up as

1 0 0 𝑑1 0
[0.0333333 1 0] {𝑑2 } = {0}
0.100000 −0.0271300 1 𝑑3 1

Chapra & Canale, 2015, Numerical Methods for Engineers, 7th Edition
and solved with forward substitution for {𝐷}𝑇 =⌊1 − 0.03333 − 0.1009⌋. This vector can then be used
as the right-hand side,

3 −0.1 −0.2 𝑥1 1
[0 7.00333 −0.293333] {𝑥2 } = {−0.03333}
0 0 10.0120 𝑥3 −0.1009

which can be solved by back substitution for {𝑋}𝑇 = ⌊0.33249 − 0.00518 − 0.01008⌋, which is the first
column of the matrix,

0.33249 0 0
[𝐴]−1 = [−0.00518 0 0]
−0.01008 0 0

To determine the second column, it is formulated as

1 0 0 𝑑1 0
[0.0333333 1 0] {𝑑2 } = {1}
0.100000 −0.0271300 1 𝑑3 0

This can be solved for {D}, and the results are used to determine {𝑋}𝑇 = ⌊0.004944 0.142903 0.00271⌋,
which is the second column of the matrix,

0.33249 0.004944 0
[𝐴]−1 = [−0.00518 0.142903 0]
−0.01008 0.002271 0

Finally, the forward- and back-substitution procedures can be implemented with {𝐵}𝑇 = ⌊0 0 1⌋to solve for
{𝑋}𝑇 = ⌊0.006798 0.004183 0.09988⌋ which is the final column of the matrix

0.33249 0.004944 0.006798


[𝐴]−1 = [−0.00518 0.142903 0.004183]
−0.01008 0.002271 0.09988

The validity of this result can be checked by verifying that [A][𝐴−1 ] = [𝐼].

Pseudocode to generate the matrix inverse is shown in figures. Notice how the decomposition
subroutine is called to perform the decomposition and then generates the inverse by repeatedly calling the
substitution algorithm with unit vectors. The effort required for this algorithm is simply computed as

𝑛3 𝑛 4𝑛3 𝑛
−3 + 𝑛(𝑛2 ) = −4 (Eq.1)
3 3

decomposition + n × substitutions

where the decomposition is defined and the effort involved with every right-hand-side evaluation involves
𝑛2 multiply/divide flops.

Chapra & Canale, 2015, Numerical Methods for Engineers, 7th Edition
CALL Decompose (a, n, tol, o, s, er)
IF er = 0 THEN
DOFOR i = 1, n
DOFOR j = 1, n
IF i = j THEN
b(j) = 1
FIGURE 1 ELSE
Driver program that b(j) = 0
uses some of the END IF
subprograms to END DO
generate a matrix CALL Substitute (a, o, n, b, x)
inverse. DOFOR j = 1, n
ai(j, i) = x(j)
END DO
END DO
Output ai, if desired
ELSE
PRINT "ill-conditioned system"
END IF

Chapra & Canale, 2015, Numerical Methods for Engineers, 7th Edition

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy