Determination of the Eigenvalues 
using the QR-Decomposition
Author's Data: Housam BINOUS
Department of Chemical Engineering
National Institute of Applied Sciences and Technology
Tunis, TUNISIA
Email: binoushousam@yahoo.com

Reference :
A. Quarteroni, R. Sacco and F. Saleri, Méthodes numériques pour le calcul scientifique, Programmes en Matlab, Springer, Paris, 2000

We would like to determine the Eigenvalues 
of a Matrix M.

M = Table[Table[a[i, j], {j, 1, 4}], {i, 1, 4}]

a[i_, i_] := 2.

a[i_, j_] := If[i < j, i + j, i + 2  j]

M // MatrixForm

We form (T^0) = M and use the QR-Decomposition ((T^0)=Q R) to form (T^1) = R (Q^T). We follow the same approach and form (T^2),  (T^3),  (T^4),   ...   After a sufficient number of iterations, we get (T^N) which is has an upper-triangular form. Eigenvalues of M appear as just the diagonal terms of (T^N) .

T[0] = M;

T[0] // MatrixForm

i = 0;

While[
      i < 101, {{q, r} = QRDecomposition[T[i]]; 
T[i + 1] = 
          r . Transpose[q]; i++}]

Eigenvalues of M (obtained with the built-in function Eigenvalues) are equal diagonal 
terms of (T^100) .

T[100] // MatrixForm // Chop

Eigenvalues[M]