Finding the eigenvalues with an augmented matrix 2x2

8 views (last 30 days)
Hi, I somehow have a problem with obtaining the row reduction in an augumented matrix to find lamda. Currently I have this code:
% A
I = eye(2)
m1 = [7 3; 3 -1]
Lamda = 8 % The value for λ
% B
LaI = I * Lamda % Identity matrix - value of λ
m2s = m1 - LaI % Caluculating the new matrix
% C
zc = zeros(size(m2s,1),1) % creating a zero column
m3s = [m2s, zc] % adding the zero column at the end
% D
A3 = [-1 3;
3 -9]
b = [0; 0]
[L, U, P] = lu(A3) % L = all multipliers, U = upper triangular matrix, P = row interchanges
% factors to solve linear system
y = L\(P*b) % Forward substitution
x = U\y %Backward substitution
In part D there I get this warning:
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 5.551115e-17. <warning </warning>
I got 2 question:
First, how do I fix it?
Second how can I define the relationship between x1 and x2?
Help is much appreciated <3 Thanks!
  1 Comment
David Goodmanson
David Goodmanson on 3 May 2022
Edited: David Goodmanson on 3 May 2022
Hi Jonas,
in %D, the matrix A3 is singular. So solving the Ax = b problem by LU decomposition or any other method is not going to work.
A3 is the same as m2s, which you obtained from m1 - 8*I, where 8 is one of the eigenvalues of m1. Therefore m2s is singular by construction. It looks like you need to go bakc and reassess the entire process.

Sign in to comment.

Answers (0)

Categories

Find more on Linear Algebra in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by