Hot answers tagged linear-algebra
9
As $P$ is explicitly constructed from eigenvectors of a self-adjoint matrix, it is unitary, i.e $P P^\dagger = I\qquad$ where the $\dagger$ is the conjugate transpose (or Hermitian conjugate, if you prefer). So, calculating the inverse is simply ConjugateTranspose[P] which is much faster than calculating it using Inverse. That said, you have to ensure that ...
5
Update
I got a MatrixRank of 4 with the original approximate data, but with the updated exact data, the rank is 3.
The basic idea is that Orthogonalize will return an orthonormal basis for the subspace spanned by the vectors, along with some zero vectors interspersed. (Orthonormal means unit length vectors that are pairwise perpendicular.) Deleting the ...
3
Another idea to shorten the notation for the cross product in the special case where you have a Pauli matrix vector as the first argument is this:
ClearAll[OverVector];
OverVector /: Cross[OverVector[σ], x_?VectorQ] :=
x.LeviCivitaTensor[3].PauliMatrix[Range[3]]
Cross[OverVector[σ], {x, y, z}]
(*
==> {{{-y, -I z}, {I z, y}}, {{x, -z}, {-z, -x}}, {{0, ...
Only top voted, non community-wiki answers of a minimum length are eligible