Question: x 1 - 5 x 2 = 5 3 x 1 - x 2 + 4 x 3 = - 1 1 x 1 +

x1-5x2=5
3x1-x2+4x3=-11
x1+10x2+x3=10
[Solve in computer] Use a programming language (python or R) to solve for question (1) in computer as follows. Make sure you have pracma library in R, and numpy, scipy and sympy libraries in Python.
a) Define the coefficient matrix and right-hand-side vector in your code for the problem
b) Form the augmented matrix (Use np.append in python, cbind in R)
c) Apply rref (reduced row echelon form) function to the augmented matrix to apply Gauss-Jordan elimination. Now you have the solution as the last column of the processed augmented matrix.
d) Use lu function to identify L and U matrices necessary for LU decomposition based solution. Solve Ly=b and Ux=y equations by applying rref function twice (Gauss Jordan elimination).
e) Use matrix-inverse based solution )=(A-1b to solve for the unknowns. But, do not use inv function, instead, use rref to get the inverse of A matrix.
f) Calculate determinant and rank of the coefficient matrices. What do they tell you? [Hint: you can use rank and det functions in R, det and matrix_rank functions in numpy]
 x1-5x2=5 3x1-x2+4x3=-11 x1+10x2+x3=10 [Solve in computer] Use a programming language (python

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!