Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (*Norm of Eigenvectors from Eigenvalues*)
- (*start*)
- Clear[nn, t, n, k, M, x];
- nn = 12;(*size of matrix*)
- t[n_, 1] = 1;
- t[1, k_] = 1;
- t[n_, k_] :=
- t[n, k] =
- If[n < k,
- If[And[n > 1, k > 1], -Sum[t[k - i, n], {i, 1, n - 1}], 0],
- If[And[n > 1, k > 1], -Sum[t[n - i, k], {i, 1, k - 1}], 0]];
- "T is your favourite nn*nn Hermitian matrix"
- T = Table[Table[t[n, k], {k, 1, nn}], {n, 1, nn}];
- HermitianMatrixQ[T]
- TableForm[A = Table[Table[T[[n, k]], {k, 1, nn}], {n, 1, nn}]];
- lambdaA = N[Eigenvalues[A]];
- TableForm[M = Table[Table[T[[n, k]], {k, 1, nn - 1}], {n, 1, nn - 1}]];
- lambdaM = N[Eigenvalues[M]];
- Quiet[Table[
- N[Product[(lambdaA[[i]] - lambdaM[[k]]), {k, 1, nn - 1}]/
- Product[If[Not[k == i], (lambdaA[[i]] - lambdaA[[k]]), 1], {k, 1,
- nn}]], {i, 1, nn}]]
- Table[Norm[N[Eigenvectors[A]][[i]]]^(-2), {i, 1, nn}]
- "The values are equal and thereby the left hand side is equal to the \
- right hand side in the formula."
- (*end*)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement