0% found this document useful (0 votes)
3 views2 pages

Question2 Comp

The document outlines the solution to a linear algebra problem involving LU decomposition with partial pivoting for a given matrix A. It details the steps taken for pivoting, elimination, and constructing the lower triangular factor L, resulting in the equation P A = LU. Additionally, it discusses the impact of the condition number on the significant digits of the solution, concluding that 2 significant digits remain after accounting for digits lost due to ill-conditioning.

Uploaded by

musazubaircode
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)
3 views2 pages

Question2 Comp

The document outlines the solution to a linear algebra problem involving LU decomposition with partial pivoting for a given matrix A. It details the steps taken for pivoting, elimination, and constructing the lower triangular factor L, resulting in the equation P A = LU. Additionally, it discusses the impact of the condition number on the significant digits of the solution, concluding that 2 significant digits remain after accounting for digits lost due to ill-conditioning.

Uploaded by

musazubaircode
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

Solution to Question 2

Part (a): LU Decomposition with Partial Pivoting


We are given:  
1.0 −2.5 −2.0
A = −4.0 −1.0 −0.1
3.0 2.0 1.0

Step 1: Pivoting
The largest absolute value in the first column is | − 4.0| = 4.0, so we swap Row 1 and Row 2:
   
0 1 0 −4.0 −1.0 −0.1
P = 1 0 0 , P A =  1.0 −2.5 −2.0
0 0 1 3.0 2.0 1.0

Step 2: Eliminate Below the First Pivot


Compute the multipliers:
1.0 3.0
m21 = = −0.25, m31 = = −0.75
−4.0 −4.0
Apply row operations R2 ← R2 − m21 R1 and R3 ← R3 − m31 R1 :
 
−4.0 −1.0 −0.1
 0 −2.75 −2.025
0 1.25 0.925

Step 3: Eliminate Below the Second Pivot


Compute the multiplier:
1.25
m32 = ≈ −0.454
−2.75
Apply row operation R3 ← R3 − m32 R2 :
 
−4.0 −1.0 −0.1
U = 0 −2.75 −2.025
0 0 0.0045

Constructing L
The lower triangular factor L is built from the multipliers:
 
1 0 0
L = −0.25 1 0
−0.75 −0.454 1

1
Final Result: P A = LU
     
0 1 0 1 0 0 −4.0 −1.0 −0.1
P = 1 0 0 , L = −0.25 1 0 , U = 0 −2.75 −2.025
0 0 1 −0.75 −0.454 1 0 0 0.0045

Part (b): Significant Digits in the Solution


Given:

• The right-hand side b has 5 significant digits.

• The condition number κ(A) = 2103.2.

Method: The number of digits lost due to ill-conditioning is estimated by:



digits lost ≈ log10 κ(A)

Calculation:
log10 (2103.2) ≈ 3.32 ≈ 3 digits lost
Remaining significant digits:

remaining digits = 5 − 3 = 2 significant digits

You might also like