[go: up one dir, main page]

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

Cs301 Midterm Preparation

The document contains solutions to 4 questions on linear algebra topics like matrix multiplication, LU decomposition, and Jacobi's method to solve systems of linear equations. Question 1 verifies that a linear transformation satisfies T(u + v) = T(u) + T(v). Question 2 checks if two matrices are multiplicative inverses. Question 3 solves a system of equations using LU decomposition. Question 4 computes two iterations of Jacobi's method to solve a given system.

Uploaded by

nh6394866
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)
21 views3 pages

Cs301 Midterm Preparation

The document contains solutions to 4 questions on linear algebra topics like matrix multiplication, LU decomposition, and Jacobi's method to solve systems of linear equations. Question 1 verifies that a linear transformation satisfies T(u + v) = T(u) + T(v). Question 2 checks if two matrices are multiplicative inverses. Question 3 solves a system of equations using LU decomposition. Question 4 computes two iterations of Jacobi's method to solve a given system.

Uploaded by

nh6394866
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

Spring 2024

MTH501 - Linear Algebra


Assignment No 1-Solution
Section Incharge: Ms. Saima Kanwal

Question 1:

that

⃗ + 𝑣 ) = 𝑇(𝑢)
𝑇(𝑢 ⃗⃗⃗⃗ , 𝑤ℎ𝑒𝑟𝑒 𝐴 = [3 1] ,
⃗⃗⃗⃗ + 𝑇(𝑣) 𝑢
2 3
⃗ = [ ],𝑣 = [ ]
0 1 1 1

Solution:
2 3 5
𝑢
⃗ +𝑣 =[ ]+[ ]=[ ]
1 1 2
⃗ + 𝑣) = 𝐴(𝑢
𝑇(𝑢 ⃗ + 𝑣)
3 1 5 17
=[ ][ ] = [ ]
0 1 2 2
⃗⃗⃗⃗ = 𝐴(𝑢 3 1 2
Now 𝑇(𝑢) ⃗)=[ ][ ]
0 1 1
7
=[ ]
1
⃗⃗⃗⃗ = [3 1] [3] = [10]
𝑇(𝑣)
0 1 1 1

⃗⃗⃗⃗ = [7] + [10]


⃗⃗⃗⃗ + 𝑇(𝑣)
𝑇(𝑢)
1 1
17
= [ ]
2
⃗⃗⃗⃗ + 𝑇(𝑣)
⃗ + 𝑣) = 𝑇(𝑢)
Thus 𝑇(𝑢 ⃗⃗⃗⃗ verified.
Question 2:

−2 4 1 3
If 𝐴 = [ ] 𝑎𝑛𝑑 𝐵 = [ ], then check either B is a multiplicative inverse of A or
3 −1 4 −1
not?

Solution:
−2 4 1 3 −2 + 16 −10
LHS= 𝐴𝐵 = [ ][ ]=[ ]
3 −1 4 −1 3−4 9+1
14 −10
=[ ]
−1 10

1 3 −2 4 −2 + 9 4 − 3
RHS= 𝐵𝐴 = [ ][ ]=[ ]
4 −1 3 −1 −8 − 3 16 + 1
7 1
=[ ]
−11 17
Since 𝐴𝐵 ≠ 𝐼 ≠ 𝐵𝐴, therefore, B is not a multiplicative inverse of A.

Question 3:

Solve the system 𝐴𝑥 = 𝑏⃗ by using LU decomposition approach, where

Solution:

Since 𝐴𝑥 = 𝑏⃗ 𝑎𝑠 𝐴 = 𝐿𝑈, 𝑠𝑜
⃗⃗⃗⃗ = 𝑏⃗
(𝐿𝑈)𝑥 = 𝑏⃗ 𝑜𝑟 𝐿(𝑈𝑥)
1 2 𝑥 4
[ ] [𝑦] = [ ]
0 1 3
𝑥 + 2𝑦 4
[ ]=[ ]
𝑦 3
Thus 𝑦 = 3 𝑎𝑛𝑑 𝑥 + 2(3) = 4 𝑖𝑚𝑝𝑙𝑖𝑒𝑠 𝑥 = −2
Hence, the solution of the above linear system is

𝑥 = −2, 𝑦 = 3
Question 4:
Compute the two iterations for the following system of equations by using Jacobi’s method:

.
Solution:

Consider 𝑥 (0) = (0,0) as an initial approximation.


Let's use Jacobi's Method to compute two iterations for the given system of equations:
10x1 - x 2 = 25
x1 + 8x 2 = 43
(0)
with the initial approximation x = (0, 0)
First, we need to write the equations in the form:
25 + x 2
x1 = 10
43 − x1
x 2
=
8

Now, let's perform two iterations:

Iteration 1:
25 + x 2
0
1
x 1
=
10
=(25 + 0) / 10 = 2.5

43 − x1
0
1
x 2
=
8
= (43) / 8 = 5.375

so
= (2.5,5.375)
(1)
x
Iteration 2:
25 + x 2
1

=
2
x 1
10
= (20 +5.375) / 10 = 3.0375

43 − x1
1

= (43 - 2.5) / 8 = 5.0625


1
x 2
=
12
So
(2)
x = ( 3.0375,5.0625 )

You might also like