Method on @sym: J = jordan (A)
Method on @sym: [V, J] = jordan (A)

Symbolic Jordan canonical form of a matrix.

Example:

A = sym ([6 5 -2 -3; -3 -1 3 3; 2 1 -2 -3; -1 1 5 5]);
jordan (A)
  ⇒ ans = (sym 4×4 matrix)
      ⎡2  1  0  0⎤
      ⎢          ⎥
      ⎢0  2  0  0⎥
      ⎢          ⎥
      ⎢0  0  2  1⎥
      ⎢          ⎥
      ⎣0  0  0  2⎦

We can also compute the generalized eigenvectors:

[V, J] = jordan (A)
  ⇒ V = (sym 4×4 matrix)
      ⎡4   1  5   0⎤
      ⎢            ⎥
      ⎢-3  0  -3  1⎥
      ⎢            ⎥
      ⎢2   0  1   0⎥
      ⎢            ⎥
      ⎣-1  0  1   0⎦
  ⇒ J = (sym 4×4 matrix)
      ⎡2  1  0  0⎤
      ⎢          ⎥
      ⎢0  2  0  0⎥
      ⎢          ⎥
      ⎢0  0  2  1⎥
      ⎢          ⎥
      ⎣0  0  0  2⎦

A*V - V*J
  ⇒ ans = (sym 4×4 matrix)
      ⎡0  0  0  0⎤
      ⎢          ⎥
      ⎢0  0  0  0⎥
      ⎢          ⎥
      ⎢0  0  0  0⎥
      ⎢          ⎥
      ⎣0  0  0  0⎦

The generalized eigenvectors are the columns of V. Those corresponding to a Jordan block form a cycle. We can check those columns corresponding to the leftmost Jordan block:

lambda = J(2, 2)
  ⇒ lambda = (sym) 2
B = A - lambda*eye (4);
v2 = V(:, 2)
  ⇒ v2 = (sym 4×1 matrix)
      ⎡1⎤
      ⎢ ⎥
      ⎢0⎥
      ⎢ ⎥
      ⎢0⎥
      ⎢ ⎥
      ⎣0⎦
v1 = B * v2
  ⇒ v1 = (sym 4×1 matrix)
      ⎡4 ⎤
      ⎢  ⎥
      ⎢-3⎥
      ⎢  ⎥
      ⎢2 ⎥
      ⎢  ⎥
      ⎣-1⎦
v0 = B * v1
  ⇒ v0 = (sym 4×1 matrix)
      ⎡0⎤
      ⎢ ⎥
      ⎢0⎥
      ⎢ ⎥
      ⎢0⎥
      ⎢ ⎥
      ⎣0⎦

See also: @sym/charpoly, @sym/eig.

Package: symbolic