Exercises 3.5 - 3.6
Chapter 3. Systems of Linear Equations
3.5 The Geometry of Linear Systems
No MATLAB problems in this section.
3.6 Matrices with Special Forms
Exercise 3.5. (Inverting \((I-A)\))
-
(Inverting \((I-A)\) when \(A\) is nilpotent)
\[A = \begin{bmatrix} 2 & 11 & 3\\ -2 & -11 & -3\\ 8 & 35 & 9 \end{bmatrix}\]
Using MATLAB, show that the matrixis nilpotent, and then use Theorem 3.6.6 in the text book to compute \((I-A)^{-1}\). Check your answer by computing the inverse directly in MATLAB.
-
(Approximating \((I-A)^{-1}\) by a power series)
\[A = \begin{bmatrix} 0 & \displaystyle\frac{1}{4} & \displaystyle\frac{1}{8}\\ \displaystyle\frac{1}{4} & \displaystyle\frac{1}{8} & \displaystyle\frac{1}{10}\\ \displaystyle\frac{1}{8} & \displaystyle\frac{1}{10} & \displaystyle\frac{1}{10} \end{bmatrix}\]
Using MATLAB, confirm that the matrixsatisfies the condition in Theorem 3.6.7 of the text book. You may use the command
\[(I-A)^{-1}\approx I+A+A^2+A^3+\cdots+A^{10},\]sum
. Since \(A\) satisfies that condition, \((I-A)\) is invertible and can be expressed by the series in Formula (18) in Section 3.6 of the text book. Compute the approximationand compare it with the inverse of \(I-A\) produced directly by MATLAB. To how many decimal places do the results agree? You may use the command
format
to display the output with long digits.
Solution for 1.
% (a)-i
A = [ 2 11 3 ; -2 -11 -3; 8 35 9]; % Construct the matrix A.
% Compute the A^2, A^3, ... , and display.
disp('A^2 is'); disp(A^2);
disp('A^3 is'); disp(A^3);
% (a)-ii Comparing two result
% By Theorem 3.6.6, (I-A)^(-1)=I+A+A^2.
result1=eye(3)+A+A^2;
% Compute the inverse of (I-A) directly.
result2=inv(eye(3)-A);
disp('I+A+A^2 is'); disp(result1);
disp('(I-A)^(-1) is'); disp(result2);
% Display as a rational form.
format rat;
disp('Rational form of (I-A)^(-1) is'); disp(result2);
MATLAB results.
A^2 is
6 6 0
-6 -6 0
18 18 0
A^3 is
0 0 0
0 0 0
0 0 0
I+A+A^2 is
9 17 3
-8 -16 -3
26 53 10
(I-A)^(-1) is
9 17 3
-8 -16 -3
26 53 10
Rational form of (I-A)^(-1) is
9 17 3
-8 -16 -3
26 53 10
Since \(A^{3} = \mathbf{0}\), \(A\) is nilpotent. By the Theorem \(3.6.6\), since \(A^{3} = \mathbf{0}\), \(I-A\) is invertible and \((I-A)^{-1} = I + A + A^{2}.\) To check answer by computing the inverse directly in MATLAB, we implement as in the next page.
Solution for 2.
% Construct the matrix A.
A=[0 1/4 1/8; 1/4 1/8 1/10; 1/8 1/10 1/10];
% Check that the condition in Theorem 3.6.7
% of the text book is satisfied for matrix A.
column_sum = sum(abs(A),1); % column-wise sum
row_sum = sum(abs(A),2); % row-wise sum
disp('The sum of the absolute values of the entries in each column is');
disp(column_sum);
disp('The sum of the absolute values of the entries in each row is');
disp(row_sum);
result3 = eye(size(A))+A+A^2+A^3+A^4+A^5+A^6+A^7+A^8+A^9+A^10;
result4 = inv(eye(3)-A);
format long; % Display the result with long digits
disp('With format long');
disp('Approximated inv(I-A) is'); disp(result3);
disp('Exact inv(I-A) is'); disp(result4);
MATLAB results
The sum of the absolute values of the entries in each column is
0.3750 0.4750 0.3250
The sum of the absolute values of the entries in each row is
0.3750
0.4750
0.3250
With format long
Approximated inv(I-A) is
1.108587459181130 0.338615080927493 0.191581699462210
0.338615080927493 1.260966638806045 0.187122081247432
0.191581699462210 0.187122081247432 1.158500720998029
Exact inv(I-A) is
1.108610894508188 0.338643199287067 0.191600757491367
0.338643199287067 1.261000334187368 0.187144925921800
0.191600757491367 0.187144925921800 1.158516208087334
The approximation result agrees with the exact result to 2 decimal places.
Leave a comment