It is not overly difficult to write a simple (but inefficient) method for symbolically performing Hessenberg decomposition, based on repeated similarity transformations with Householder matrices. It is interesting to compare the routine for QR decomposition in this answer with the Hessenberg decomposition function given below:
hesdec[mat_?SquareMatrixQ] := Module[{h = mat, r, n, q, v, v2},
n = Length[h]; q = IdentityMatrix[n];
Do[v = PadLeft[h[[k + 1 ;;, k]], n];
v2 = v - SparseArray[{k + 1 -> Norm[v]}, n];
r = If[! TrueQ[Norm[v2, ∞] == 0], ReflectionMatrix[v2], IdentityMatrix[n]];
q = q.r; h = r.h.r, {k, n - 2}];
{q, h}]
Applied to your matrix,
{qq, hh} = hesdec[{{0, -I a, 0, b Cos[x]}, {I a, 0, I c Sin[x], 0},
{0, -I c Sin[x], 0, -I a}, {b Cos[x], 0, I a, 0}}];
one however obtains expressions of horrendous complexity:
LeafCount[hs = Simplify[ComplexExpand[hh, TargetFunctions -> {Re, Im}]]]
3583
LeafCount[qs = Simplify[ComplexExpand[qq, TargetFunctions -> {Re, Im}]]]
134
What to do with these matrices afterwards is up to you. But you might appreciate a little that writing functions like these so that expression swell is minimized is not trivial.
Eigensystem
. $\endgroup$Eigensystem
gives eigenvectors (full matrix) and eigenvalues (diagonal matrix) but not the Hessenberg form of my matrix. $\endgroup$Eigensystem
returns an eigensystem. But it can serve in similar use cases to a Hessenberg decomposition and moreover works for symbolic input.HessenbergDecomposition
is strictly numeric. Another alternative might beJordanDecomposition
by the way. $\endgroup$