Question

In: Advanced Math

11.1      Determine the matrix inverse for the following system: 10x1 + 2x2 − x3 = −27...

11.1      Determine the matrix inverse for the following system:

10x1 + 2x2x3 = −27

−3x1 −6x2 +2x3 = −61.5

x1   + x2   +5x3 = −21.5

Check your results by verifying that [A][A]-1 = [I ]. Do not use a pivoting strategy.

Calculate A^-1 using the LU decomposition of A. Use the Matlab lu command to perform the LU decomposition. Use the Matlab backslash \ operator to perform intermediate linear system solutions. Use Matlab matrix multiplication to verify that A^-1 was correctly calculated.

Solutions

Expert Solution

MATLAB Code:

close all
clear
clc
format short

% Given system of equations when written in matrix form, Ax = b
A = [10 2 -1; -3 -6 2; 1 1 5];
b = [-27 -61.5 -21.5]';
% and x = [x1; x2; x3]

[L,U] = lu(A); % LU Decomposition
% A = LU => A_inverse = inverse(LU) = U_inverse * L_inverse
A_inv = inv(U)*inv(L);
disp('Inverse of A using LU decomposition ='), disp(A_inv)
disp('and A times inverse(A) obtained above ='), disp(A*A_inv)
disp('which is an identity matrix, verifying that the obtained inverse is correct.')

x = A\b; % Solve the linear system
fprintf('\nSolution to the system, x =\n'), disp(x)

Output:

Inverse of A using LU decomposition =
0.1107 0.0381 0.0069
-0.0588 -0.1765 0.0588
-0.0104 0.0277 0.1869
and A times inverse(A) obtained above =
1.0000 0.0000 0
0.0000 1.0000 0.0000
-0.0000 0.0000 1.0000
which is an identity matrix, verifying that the obtained inverse is correct.

Solution to the system, x =
-5.4792
11.1765
-5.4394


Related Solutions

Using a system of equations, prove that a 2x2 matrix A has a right inverse if...
Using a system of equations, prove that a 2x2 matrix A has a right inverse if and only if it has a left inverse.
For the system 2x1 − 4x2 + x3 + x4 = 0, x1 − 2x2 +...
For the system 2x1 − 4x2 + x3 + x4 = 0, x1 − 2x2 + 5x4 = 0, find some vectors v1, . . . , vk such that the solution set to this system equals span(v1, . . . , vk).
use matlab to create a function that finds inverse of 2x2 matrix and returns result. Should...
use matlab to create a function that finds inverse of 2x2 matrix and returns result. Should be a error check to make sure matrix is 2x2, and nonsingular.
Consider the following. x1 − 2x2 + 3x3 = 3 −x1 + 3x2 − x3 =...
Consider the following. x1 − 2x2 + 3x3 = 3 −x1 + 3x2 − x3 = 2 2x1 − 5x2 + 5x3 = 3 (a) Write the system of linear equations as a matrix equation, AX = B. x1 x2 x3 = (b) Use Gauss-Jordan elimination on [A    B] to solve for the matrix X. X = x1 x2 x3 =
1. Solve linear system using Gaussian elimination a) x1 + 2x2 + x3 = 2 -x1...
1. Solve linear system using Gaussian elimination a) x1 + 2x2 + x3 = 2 -x1 − 3x2 + 2x3 = -3   x1 − 6x2 + 3x3 = -6 b) -2b + 2c = 10 3a + 12b -3c = -6 6a + 18b + 0c = 19 c) 4x - 1y + 4z + 3t = 5 1x - 4z + 6t = 7 5x - 5y + 1z + 2t = -5 4x + 1y + 3z +...
Solve the following set of equations with LU factorization with pivoting: 3x1 -2x2 + x3 =...
Solve the following set of equations with LU factorization with pivoting: 3x1 -2x2 + x3 = -10 2x1 + 6x2- 4x3 = 44 -8x1 -2x2 + 5x3 = -26 Please show all steps
4-Consider the following problem: max − 3x1 + 2x2 − x3 + x4 s.t. 2x1 −...
4-Consider the following problem: max − 3x1 + 2x2 − x3 + x4 s.t. 2x1 − 3x2 − x3 + x4 ≤ 0 − x1 + 2x2 + 2x3 − 3x4 ≤ 1 − x1 + x2 − 4x3 + x4 ≤ 8 x1, x2, x3, x4 ≥ 0 Use the Simplex method to verify that the optimal objective value is unbounded. Make use of the final tableau to construct an unbounded direction..
Find [A]^-1 for the following equation using LU Decomposition and {x}. 3x1 - 2x2 + x3...
Find [A]^-1 for the following equation using LU Decomposition and {x}. 3x1 - 2x2 + x3 = -10 2x1 + 6x2 - 4x3 = 44 -x1 - 2x2 + 5x3 = -26
Find the inverse for [A] for the following equation using LU Decomposition 8x1 + 4x2 -x3...
Find the inverse for [A] for the following equation using LU Decomposition 8x1 + 4x2 -x3 = 11 -2x1 + 5x2 + x3 = 4 2x1 - x2 + 6x3 = 7
Use this theorem to find the inverse of the given matrix or show that no inverse...
Use this theorem to find the inverse of the given matrix or show that no inverse exists. (If an answer does not exist, enter DNE in any cell.) 1    2    5    1 −1    0    2    1 2    1    −5    0 1    1    2    1
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT