solve the system of equations using the matrix method
117 views (last 30 days)
Show older comments
1) solve the system of equations using the matrix method
a)
3*x1 + x2 + 5*x3 = 20
-x1 + 4*x2 = 0
2*x1 + 3*x2 - x3 = 7
b)
x1 + 5*x2 + x3 = 28
7*x1 + 3*x2 + x3 = 54
2*x1 - 5*x2 +x3 =-31
c)
4*x1 + 2*x2 + x3 = 18
4*x2 - x3 = -2
2*x1 + 3*x2 = 6
d)
2*x1 + 3*x2 + x4 = 8
2*x1 + x2 + 4*x3 + 2*x4 = 19
4*x1 + 2*x2 +x3 - 13 = 0
4*x2 - x3 +3*x4 = 4
0 Comments
Answers (1)
Sarvesh Kale
on 8 Mar 2023
start by writing the equations in matrix format ,
a.)
A = [3 1 5 ;...
-1 4 0 ; ...
2 3 -1
];
b = [20;...
0;...
7];
x= A\b
b.)
A = [1 5 1;...
7 3 1;...
2 -5 1];
b= [28;54;-31];
x = A\b
c.)
A = [4 2 1; 0 4 -1; 2 3 0];
b = [18;-2;6];
x= A\b % the A matrix is singular i.e the determinant is zero
d.)
A = [2 3 0 1;2 1 4 2;4 2 1 0;0 4 -1 3];
b = [8;19;13;4];
x= A\b
I hope this helps !
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!