Aller au contenu

Mathc matrices/b0a4a

Un livre de Wikilivres.


La décomposition spectral

1/E1 b1r1 + 1/E2 b2r2 + 1/E3 b3r3 = inv(A)

Copy/Paste into the octave window
%  A property of spectral decomposition:
%
%      1/E1 * b1r1 + 1/E2 * b2r2 + 1/E3 * b3r3 = inv(A)
%
%  We can calculate the inverse of A by taking
%  the inverse of each of the eigenvalues.
%
% V (b) : The columns of the eigenvectors of A
% V'(r) : The rows of the eigenvectors of the inverse of A
%         (Here the transpose: see the first example)
%
%     E : The eignvalues of A.
%
% V1V1' (b1r1) is obtained by multiplying the first column of the eigenvector
%              of A by the first row of the eigenvector of the inverse of A


clear, clc

A = round(10*randn(3));    %% A matrix 3x3
A = A'*A                   %% A symetric matrix

% Eigenvectors, Eigenvalues
[Evectors,Evalues] = eigs(A);

V1 = Evectors(:,1);
V2 = Evectors(:,2);
V3 = Evectors(:,3);

Evalues = diag([Evalues]);

E1 = Evalues(1);
E2 = Evalues(2);
E3 = Evalues(3);

invE1_b1r1 = 1/E1.*V1*V1';
invE2_b2r2 = 1/E2.*V2*V2';
invE3_b3r3 = 1/E3.*V3*V3';

invA = invE1_b1r1 + invE2_b2r2 + invE3_b3r3

invA = inv(A)

%%

Nous voyons une des propriétés de la décomposition spectral:

  • 1/E1 * b1r1 + 1/E2 * b2r2 + 1/E3 * b3r3 = inv(A)

On peux calculer l'inverse de A en simplement prenant l'inverse de chacune des valeurs propres.