Linear Algebra and the C Language/a0oh


b1r1**2 = b1r1; ... ... ... b1r1**3 = b1r1; ... ... ... b1r1**P = b1r1;

Copy/Paste into the octave window
% A property of spectral decomposition:
%
% The b*r* are projectors. For example, if I project point P onto the x-axis,
% P is on the x-axis. Once P is on the x-axis, I can project it an infinite
% number of times onto the x-axis, and it will not move.
% This is materialized in our case by the fact :
%
%            b1r1**2 = b1r1
%            b1r1**3 = b1r1
%            b1r1**4 = b1r1
%                          ...
%            b1r1**n = b1r1
%
% 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).
%
% 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);

b1r1_2 = (V1*V1')^2
b1r1_4 = (V1*V1')^4
b1r1_6 = (V1*V1')^6

%%