next up previous contents
Next: The MMULT| instruction. Up: Linear algebra. Previous: Stack input/output for reduction

   
Diagonalization

The diagonalization instructions are: Given a square matrix A, JORDAN returns 6 levels:

Examples:

1.

\begin{displaymath}A=\left(\begin{array}{lcr}
1&-1 & 0\\
0 & 1 & -1 \\
-1 & 0 & 1
\end{array}\right) \end{displaymath}

returns:
6: 0
5: { { inf inf inf }
     { inf inf inf }
     { inf inf inf } }
4: {0 1 '3/2+i/2*V3' 1 '3/2-i/2*V3' 1 }
3: 'X^3-3*X^2+3*X'
2: 'X^3-3*X^2+3*X'
1: {    :0: {1 1 1}
        :'3/2+i/2*V3': {1 '-1/2-i/2*V3' '-1/2+i/2*V3'}
        :'3/2-i/2*V3': {1 '-1/2+i/2*V3' '-1/2-i/2*V3'} }
This means that A has 3 eigenvalues $\frac{3\pm\sqrt{3}i }{2}$, and a basis of eigenvectors is:

\begin{displaymath}\{ (1,1,1), (1,\frac{-1\mp i\sqrt{3} }{2}, \frac{-1\pm i\sqrt{3} }{2})
\} \end{displaymath}

corresponding to $0, (3+\sqrt{3}i)/2, (3-\sqrt{3}i)/2$. The characteristic and minimal polynomial are identical (this is generically the case) X3-3X2+3X. The matrix is not invertible and has a 0 determinant.

2.
For the identity matrix I2 (2 idn), we get:
6: 1
5: { { 1 0 } { 0 1 } }
4: {1 2}
3: 'X^2-2*X+1'
2: 'X-1'
1: { :1, Eigen: { 0 1 } :1, Eigen: { 1 0 } }
The minimal polynomial is X-1, different from the characteristic polynomial (X-1)2=X2-2X+1.

3.

\begin{displaymath}\left(\begin{array}{ccc}
1 &2 &1 \\
2 & 0 &0 \\
1 & 0 &3
\end{array}\right)\end{displaymath}

4.
An example with 1 parameter:
{ { 1 A }
  { A 1 } }

5.
In dimension greater than 2, the factorization routines may fail. For this reason, you may have to call MAD, factor the characteristic polynomial (e.g. by trying the FCTR instruction of ALG48) before calling JORDAN. If you have ALG48 installed, try this:
{ { 1 1 A }
  { 1 A 1 }
  { A 1 1 } }
MAD FCTR JORDAN
Note that this example is solved by typing JORDAN directly but it may fail in other situations.

6.
Jordan cycles example:

\begin{displaymath}A=\left(\begin{array}{ccc}
3& -1& 1\\
2 & 0 & 1\\
1 & -1 & 2
\end{array}\right),\end{displaymath}

returns:
6: -4
5: : { { '1/4' '1/4' '-1/4' }
       { '-3/4' '5/4' '-1/4' }
       { '-1/2' '1/2' '1/2'  } }
4: { 2 2 1 1}
3: 'X^3-5*X^2+8*X-4'
2: 'X^3-5*X^2+8*X-4'
1: { :2, Char: { 2 2 1 }  :2, Eigen:{ 1 1 0 }  :1: { 0 1 1 } }
This means that 2 has multiplicity 2, but the corresponding eigenspace is only 1-dimensional (spanned by (1,1,0) the last vector of the Jordan chain). The first vector (2,2,1) is only a characteristic vector, his image by (A-2I) is the eigenvector (1,1,0) .

Remark 8   You can not use the current variable name as a parameter of a symbolic matrix that you want to diagonalize. This would lead to incorrect results. For example, is VX is set to X, you can not diagonalize the following matrix:
{ { 1 1 X }
  { 1 X 1 }
  { X 1 1 } }
Workaround: make a change of variable, e.g. 'X=A' EXEC.


next up previous contents
Next: The MMULT| instruction. Up: Linear algebra. Previous: Stack input/output for reduction
Bernard Parisse
1998-07-31