0% found this document useful (0 votes)
29 views4 pages

Practical 5

The document contains 6 linear algebra problems involving matrix operations like finding the inverse, determinant and solution to systems of linear equations using matrices. Matrices and vectors of varying sizes are given along with the operations to be performed on them. The problems cover basic to some advanced linear algebra concepts.

Uploaded by

Montage Maker
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)
29 views4 pages

Practical 5

The document contains 6 linear algebra problems involving matrix operations like finding the inverse, determinant and solution to systems of linear equations using matrices. Matrices and vectors of varying sizes are given along with the operations to be performed on them. The problems cover basic to some advanced linear algebra concepts.

Uploaded by

Montage Maker
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/ 4

Name: Faizal Bagwan Q2)

Practical:5 -->A=[3 5 -4;-3 -2 4;6 1 -8]

A =
Q1)
3. 5. - 4.
-->A=[1 -1 1;1 1 -3;1 1 1],B=[4;0;2]
- 3. - 2. 4.
A =
6. 1. - 8.
1. - 1. 1.
-->B=[0;0;0]
1. 1. - 3.
B =
1. 1. 1.
0.
B =
0.
4.
0.
0.
-->linsolve(A,-B)
2.
ans =
-->det(A)
0.
ans = 8.
0.
-->inv(A)
0.
0.5 0.25 0.25
-->[X kerA]=linsolve(A,-B)
- 0.5 0. 0.5
kerA =
0. - 0.25 0.25
0.8
-->x=inv(A)*b
2.204D-16
x =
0.6
2.75 - 4.25 3.25
X =
2.5 - 1.5 0.5
0.
0.75 - 0.25 0.25
0.

0.
Q3) 0. 2. 2. 0.

A]-->A=[1 1 1;1 -1 2;2 3 -1],B=[4;3;6] 0. 0. 1. 3.

A = - 2. 3. 2. 1.

1. 1. 1. B =

1. - 1. 2. - 3.

2. 3. - 1. 0.

B = 1.

4. 5.

3. -->linsolve(A,-B)

6. - 1.9565217

-->linsolve(A,-B) 0.5652174

2. - 0.5652174

1. 0.5217391

1. -->[X kerA]=linsolve(A,-B)

-->[X kerA]=linsolve(A,-B) kerA =

kerA = - 0.4170288

[] - 0.6255432

X = 0.6255432

2. - 0.2085144

1. X =

1. - 1.9565217

B]-->A=[1 0 0 -2;0 2 2 0;0 0 1 3;-2 3 2 1],B=[- 0.5652174


3;0;1;5]
- 0.5652174
A =
0.5217391

C]-->A=[2 1 1;3 2 3;1 4 9],B=[10;18;16]


1. 0. 0. - 2.
A =

2. 1. 1. 13.

3. 2. 3. 8.

1. 4. 9. 0.

B = -->linsolve(A,-B)

10. - 4.

18. 4.

16. 11.25

-->linsolve(A,-B) 3.25

7. -->[X kerA]=linsolve(A,-B)

- 9. kerA =

5. 1.804D-16

-->[X kerA]=linsolve(A,-B) 0.8164966

kerA = - 0.4082483

[] 0.4082483

X = X =

7. - 4.

- 9. 4.

5. 11.25

D] -->A=[1 -1 1 3;1 1 1 -1;3 1 1 -1],B=[13;8;0] 3.25

A =

1. - 1. 1. 3.

1. 1. 1. - 1.

3. 1. 1. - 1.

B =
E]-->A=[1 1 1 1;2 1 -1 0;3 1 0 2],B=[6;3;6] F]-->A=[1 1 1;-1 -2 3;3 -7 6],B=[7;6;1]

A = A =

1. 1. 1. 1. 1. 1. 1.

2. 1. - 1. 0. - 1. - 2. 3.

3. 1. 0. 2. 3. - 7. 6.

B = B =

6. 7.

3. 6.

6. 1.

-->linsolve(A,-B) -->linsolve(A,-B)

1. - 0.2702703

3. 3.2162162

2. 4.0540541

- 2.150D-15 -->[X kerA]=linsolve(A,-B)

-->[X kerA]=linsolve(A,-B) kerA =

kerA = []

- 0.5 X =

0.5 - 0.2702703

- 0.5 3.2162162

0.5 4.0540541

X =

1.

3.

2.

- 2.150D-15

You might also like