0% found this document useful (0 votes)
17 views10 pages

Assignment 1.

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)
17 views10 pages

Assignment 1.

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/ 10

LINEAR ALGEBRA

By:
Salman Ahmad
BCSM-S19-021
Submitted to: Mrs. Sidra

Assignment no.1
TOPIC:
MATRICES AND DETERMINANTS

Faculty of Computer Science & IT


Superior Group of Colleges.
QUESTION 1
• LINEAR ALGEBRA
Linear algebra is the study of lines and planes, vector spaces and mappings that are
required for linear transforms. It is a relatively young field of study, having initially been
formalized in the 1800s in order to find unknowns in systems of linear equations.
• IMPORTANCE IN CS
The concepts of Linear Algebra are crucial for understanding the theory behind Machine
Learning, especially for Deep Learning. They give you better intuition for how algorithms
really work, which enables you to make better decisions.

• APPLICATIONS IN CS
Linear algebra plays an important role in Computer Science. It has vast applications in CS.
Most common applications are:
1. 2D, 3D Graphics

2. Image Processing

3. Machine Learning
4. Graph Algorithm

5. Web Search
QUESTION 2
(a)
𝜆−4 0 0
A= ( 0 𝜆 2 )
0 3 𝜆−1

Solution
𝜆−4 0 0
A= ( 0 𝜆 2 )
0 3 𝜆−1
𝜆−4 0 0
A= | 0 𝜆 2 |
0 3 𝜆−1
Expanding by C1
𝜆 2
= 𝜆 − 4| |
3 𝜆−1
= 𝜆 − 4((𝝀𝟐 − 𝝀) − 𝟔)

According to question statement det(A) = 0


𝜆 − 4 ((𝝀𝟐 − 𝝀) − 𝟔) = 𝟎

𝜆 − 4(𝝀𝟐 − 𝝀 − 𝟔) = 𝟎
𝜆 − 4(𝝀𝟐 − 𝝀 − 𝟔) = 𝟎

By Factorization
𝟐
(𝜆 − 4)(𝝀 − 𝟑𝝀 + 𝟐𝝀 − 𝟔) = 𝟎
(𝜆 − 4)[𝝀(𝝀 − 𝟑) + 𝟐(𝝀 − 𝟑)] = 𝟎
(𝜆 − 4)(𝝀 − 𝟑) (𝝀 + 𝟐) = 𝟎
(𝝀 − 𝟒) = 0 (𝝀 − 𝟑) = 𝟎 (𝝀 + 𝟐) = 𝟎

𝝀=𝟒 𝝀=𝟑 𝝀 = −𝟐
(b)
−1 2 5

𝑩 = [0 1 3 ]
0 0 −4

Show that 2B2-3B+I is symmetric.


−1 2 5 −1 2 5
𝟐
𝑩 = [ 0 1 3 ][ 0 1 3 ]
0 0 −4 0 0 −4
1+0+0 −2 + 2 + 0 −5 + 6 − 20
= [0 + 0 + 0 0+1+0 0 + 3 − 12 ]
0+0−0 0+0−0 0 + 0 + 16

2 0 −38
𝟐𝑩𝟐 = [0 2 18 ]
0 0 32

3 −6 −15
−𝟑𝑩 = [0 −3 −9 ]
0 0 12

2B2-3B+I
2 0 −38 3 −6 −15 1 0 0
2
2B +3B+I = [0 2 18 ] + [0 −3 −9 ] + [0 1 0]
0 0 32 0 0 12 0 0 1

6 −6 −53
= [0 0 −27]
0 0 45

A matrix is symmetric if Bt = B

As transpose of this result will not give the same


matrix. So, this matrix is not symmetric.
QUESTION 3
(a)
Evaluate the determinant.
0 0 0 0 −3
0 0 0 −4 0
|𝐴| = ||0 0 −1 0 0 ||
0 2 0 0 0
5 0 0 0 0
Interchanging row 1 with 5.
5 0 0 0 0
0 0 0 −4 0
|
= (−) |0 0 −1 0 0 ||
0 2 0 0 0
0 0 0 0 −3

Interchanging row 2 with 4.


5 0 0 0 0
0 2 0 0 0
|
= (−)(−1) |0 0 −1 0 0 ||
0 0 0 −4 0
0 0 0 0 −3
Using triangular matrix trick.
= (𝟓)(𝟐)(−𝟏(−𝟒)(−𝟑)

=-120
(b)
Find inverse.
2 −4 0 0
1 2 12 0
𝑳𝒆𝒕 𝑨 = [ ]
0 0 2 0
0 −1 −4 −5

𝑨𝒅𝒋.𝑨
𝑨−𝟏 = |𝑨|
2 −4 0 0 1 0 0 0
1 2 12 0 0 1 0 0
𝑨𝒅𝒋. 𝑨 = [( | )]
0 0 2 0 0 0 1 0
0 −1 −4 −5 0 0 0 1
Interchanging row 1 with 2.
1 2 12 0 0 1 0 0
2 −4 0 0 1 0 0 0
= [( | )]
0 0 2 0 0 0 1 0
0 −1 −4 −5 0 0 0 1

R2 – 2R1.
1 2 12 0 0 1 0 0
0 −8 −24 0 1 −2 0 0
= [( | )]
0 0 2 0 0 0 1 0
0 −1 −4 −5 0 0 0 1

-1/8R2.
1 2 12 0 0 1 0 0
0 1 3 0 −1/8 1/4 0 0
= [( | )]
0 0 2 0 0 0 1 0
0 −1 −4 −5 0 0 0 1
R4+R2.
1 2 12 0 0 1 0 0
0 1 3 0 −1/8 1/4 0 0
= [( | )]
0 0 2 0 0 0 1 0
0 −1 −1 −5 −1/8 1/4 0 1

1/2R3.
1 2 12 0 0 1 0 0
0 1 3 0 −1/8 1/4 0 0
= [( | )]
0 0 1 0 0 0 1/2 0
0 −1 −1 −5 −1/8 1/4 0 1
R4 + R3.
1 2 12 0 0 1 0 0
0 1 3 0 −1/8 1/4 0 0
= [( | )]
0 0 1 0 0 0 1/2 0
0 0 0 −5 −1/8 1/4 1/2 1
-1/5R4.
1 2 12 0 0 1 0 0
0 1 3 0 −1/8 1/4 0 0
= [( | )]
0 0 1 0 0 0 1/2 0
0 0 0 −1 1/40 −1/20 −1/10 −1/5
R1 - 2R2.
1 0 6 0 1/4 −1/2 0 0
0 1 3 0 −1/8 1/4 0 0
= [( | )]
0 0 1 0 0 0 1/2 0
0 0 0 −1 1/40 −1/20 −1/10 −1/5
R2 - 3R3.
1 0 6 0 1/4 −1/2 0 0
0 1 0 0 −1/8 1/4 −3/2 0
= [( | )]
0 0 1 0 0 0 1/2 0
0 0 0 −1 1/40 −1/20 −1/10 −1/5
R1 - 6R3.
1 0 0 0 1/4 −1/2 −3 0
0 1 0 0 −1/8 1/4 −3/2 0
= [( | )]
0 0 1 0 0 0 1/2 0
0 0 0 −1 1/40 −1/20 −1/10 −1/5

A-1

𝟐 −𝟒 𝟎 𝟎
𝟏 𝟐 𝟏𝟐 𝟎
|𝑨| = | | = -80
𝟎 𝟎 𝟐 𝟎
𝟎 −𝟏 −𝟒 −𝟓

𝑨𝒅𝒋. 𝑨
𝑨−𝟏 =
|𝑨|
1/4 −1/2 −3 0
−1/8 1/4 −3/2 0
0 0 1/2 0
1/40 −1/20 −1/10 −1/5
=
−𝟖𝟎

You might also like