0% found this document useful (0 votes)
34 views5 pages

Assignment 1 MTH501 Linear Algebra

Mth501

Uploaded by

khalil ahmed
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)
34 views5 pages

Assignment 1 MTH501 Linear Algebra

Mth501

Uploaded by

khalil ahmed
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/ 5

Virtual University of Pakistan Fall 2024

Department of Mathematics Assignment 1


Due Date: NOV. 22, 2024
Section: Dr Imran Talib
Marks 30

MTH501: Linear Algebra


Question 1: Find the LU decomposition of the following matrix A of order 3 × 3:
 
4 −2 1
A= 3
 6 −1
2 1 8

Answer to Question 1

Given the matrix A of order 3 × 3:


 
4 −2 1
A = 3 6 −1
2 1 8

Part A: 1. Find the LU decomposition of the matrix A, where A = LU . Here, L is a lower triangular
matrix, and U is an upper triangular matrix.
2. Show all the steps involved in the LU decomposition, including the calculation of the multipliers
used to transform A into an upper triangular matrix.
Part B: 1. Verify your result by multiplying the matrices L and U to check if they give the original
matrix A.

1
Solution
Part A: LU Decomposition
We begin by applying Gaussian elimination to transform the matrix A into an upper triangular
matrix U , while keeping track of the multipliers to construct the matrix L.
 
4 −2 1
A = 3 6 −1
2 1 8

Step 1: Eliminate entries below the pivot in the first column


For row 2, the multiplier is:

A21 3
l21 = = = 0.75
A11 4
For row 3, the multiplier is:

A31 2
l31 = = = 0.5
A11 4
Now, perform the row operations:
- Row 2: R2 → R2 − l21 R1 - Row 3: R3 → R3 − l31 R1
The matrix becomes:
 
4 −2 1
A = 0 7.5 −2.75
0 2 7.5

Thus, the lower triangular matrix L is:


 
1 0 0
L = 0.75 1 0
0.5 0 1

Step 2: Eliminate entries below the pivot in the second column


For row 3, the multiplier is:

A32 2
l32 = = ≈ 0.2667
A22 7.5
Now, perform the row operation:
- Row 3: R3 → R3 − l32 R2
The matrix becomes:
 
4 −2 1
A = 0 7.5 −2.75
0 0 7.4

Thus, the matrix U is:

2
 
4 −2 1
U = 0 7.5 −1.75
0 0 7.967

The lower triangular matrix L is updated to:


 
1 0 0
L = 0.75 1 0
0.5 0.2667 1

Thus, the LU decomposition of matrix A is:


   
1 0 0 4 −2 1
L = 0.75 1 0 , U = 0 7.5 −1.75
0.5 0.2667 1 0 0 7.967

Part B: Verification
To verify the LU decomposition, multiply the matrices L and U to check if we recover the original
matrix A:
  
1 0 0 4 −2 1
L · U = 0.75 1 0 0 7.5 −1.75
0.5 0.2667 1 0 0 7.967

Performing the multiplication:


 
4 −2 1
L · U = 3 6 −1
2 1 8

This is indeed the original matrix A, confirming that the LU decomposition is correct.

Question 2: Using the LU decomposition of the coefficientmatrix


 A as computed in Question 1, solve the
3
following system of linear equations Ax = b, where b = 5.
7

4x − 2y + z = 3
3x + 6y − z = 5
2x + y + 8z = 7.

Answer to Question 2

Solving the System Ax = b


 
3
We are given b = 5 and need to solve the system Ax = b using the LU decomposition. From
7
A = LU , we have the system:

LU x = b

3
Let y = U x, so the system becomes:

Ly = b
Ux = y

We solve these two systems step by step.

Step 1: Solve Ly = b
The system is:
    
1 0 0 y1 3
0.75 1 0 y2  = 5
0.5 0.2667 1 y3 7

Solve this system by forward substitution:


1. y1 = 3
2. 0.75y1 + y2 = 5 0.75 · 3 + y2 = 5 y2 = 5 − 2.25 = 2.75
3. 0.5y1 + 0.2667y2 + y3 = 7 0.5 · 3 + 0.2667 · 2.75 + y3 = 7 y3 = 7 − 1.5 − 0.7333 = 4.7667.
 
3
Thus, y =  2.75 .
4.7667

Step 2: Solve U x = y
Now, solve the system:
    
4 −2 1 x1 3
0 7.5 −1.75 x2  =  2.75 
0 0 7.967 x3 4.7667

Solve this system by backward substitution:

x1 = 0.853555927475593
x2 = 0.506277126917713
x3 = 0.598330543933054

Question 3: Define a linear transformation T : R2 → R2 by


    
0 −1 x1 −x2
T (x) = = .
1 0 x2 x1
   
4 2
Find the images under T of u = and v = .
1 3

Answer to Question 3

We are given the linear transformation


    
0 −1 x1 −x2
T (x) = = .
1 0 x2 x1

4
   
4 2
To find the images of u = and v = , we proceed as follows:
1 3

 
4
1. Image of u: Substituting u = into T :
1
  
0 −1 4
T (u) = .
1 0 1

Performing the matrix multiplication:


   
0 · 4 + (−1) · 1 −1
T (u) = = .
1·4+0·1 4

Thus, the image of u is:  


−1
T (u) = .
4

 
2
2. Image of v: Substituting v = into T :
3
  
0 −1 2
T (v) = .
1 0 3

Performing the matrix multiplication:


   
0 · 2 + (−1) · 3 −3
T (v) = = .
1·2+0·3 2

Thus, the image of v is:  


−3
T (v) = .
2

Final Results: The images under T are:


   
−1 −3
T (u) = , T (v) = .
4 2

You might also like