| LeviCivita | The totally anti-symmetric Levi Civita tensor |
| Permutations | Form all permutations of a list |
| InProduct | Inner product of vectors |
| CrossProduct | Outer product of vectors |
| ZeroVector | Create a vector with all zeroes |
| BaseVector | Base vector |
| Identity | Identity matrix |
| ZeroMatrix | Matrix filled with zeroes |
| DiagonalMatrix | Construct a diagonal matrix |
| IsMatrix | Test whether argument is a matrix |
| Normalize | Normalize a vector |
| Transpose | Transpose of a matrix |
| Determinant | Determinant of a matrix |
| Trace | Trace of a matrix |
| Inverse | Inverse of a matrix |
| Minor | Principal minor of a matrix |
| CoFactor | Cofactor of a matrix |
| SolveMatrix | Solve a linear system |
| CharacteristicEquation | Characteristic polynomial of a matrix |
| EigenValues | Eigenvalues of a matrix |
| EigenVectors | Eigenvectors of a matrix |
| IsHermitean | Test whether a matrix is Hermitean |
| IsUnitary | Test whether a matrix is unitary |
In> LeviCivita({1,2,3})
Out> 1;
In> LeviCivita({2,1,3})
Out> -1;
In> LeviCivita({2,2,3})
Out> 0;
|
In> Permutations({a,b,c})
Out> {{a,b,c},{a,c,b},{c,a,b},{b,a,c},{b,c,a},{c,b,a}};
|
In> {a,b,c} . {d,e,f};
Out> a*d+b*e+c*f; |
In> {a,b,c} X {d,e,f};
Out> {b*f-c*e,c*d-a*f,a*e-b*d}; |
In> ZeroVector(4)
Out> {0,0,0,0}; |
In> BaseVector(2,4)
Out> {0,1,0,0}; |
In> Identity(3)
Out> {{1,0,0},{0,1,0},{0,0,1}}; |
In> ZeroMatrix(3,4)
Out> {{0,0,0,0},{0,0,0,0},{0,0,0,0}}; |
In> DiagonalMatrix(1 .. 4)
Out> {{1,0,0,0},{0,2,0,0},{0,0,3,0},{0,0,0,4}}; |
In> IsMatrix(ZeroMatrix(3,4)) Out> True; In> IsMatrix(ZeroVector(4)) Out> False; In> IsMatrix(3) Out> False; |
In> Normalize({3,4})
Out> {3/5,4/5};
In> % . %
Out> 1;
|
In> Transpose({{a,b}})
Out> {{a},{b}};
|
In> DiagonalMatrix(1 .. 4)
Out> {{1,0,0,0},{0,2,0,0},{0,0,3,0},{0,0,0,4}};
In> Determinant(%)
Out> 24;
|
In> DiagonalMatrix(1 .. 4)
Out> {{1,0,0,0},{0,2,0,0},{0,0,3,0},{0,0,0,4}};
In> Trace(%)
Out> 10;
|
In> DiagonalMatrix({a,b,c})
Out> {{a,0,0},{0,b,0},{0,0,c}};
In> Inverse(%)
Out> {{(b*c)/(a*b*c),0,0},{0,(a*c)/(a*b*c),0},{0,0,(a*b)/(a*b*c)}};
In> Simplify(%)
Out> {{1/a,0,0},{0,1/b,0},{0,0,1/c}};
|
In> A := {{1,2,3}, {4,5,6}, {7,8,9}};
Out> {{1,2,3},{4,5,6},{7,8,9}};
In> PrettyForm(A);
/ \
| ( 1 ) ( 2 ) ( 3 ) |
| |
| ( 4 ) ( 5 ) ( 6 ) |
| |
| ( 7 ) ( 8 ) ( 9 ) |
\ /
Out> True;
In> Minor(A,1,2);
Out> -6;
In> Determinant({{2,3}, {8,9}});
Out> -6; |
In> A := {{1,2,3}, {4,5,6}, {7,8,9}};
Out> {{1,2,3},{4,5,6},{7,8,9}};
In> PrettyForm(A);
/ \
| ( 1 ) ( 2 ) ( 3 ) |
| |
| ( 4 ) ( 5 ) ( 6 ) |
| |
| ( 7 ) ( 8 ) ( 9 ) |
\ /
Out> True;
In> CoFactor(A,1,2);
Out> 6;
In> Minor(A,1,2);
Out> -6;
In> Minor(A,1,2) * (-1)^(1+2);
Out> 6; |
In> A := {{1,2}, {3,4}};
Out> {{1,2},{3,4}};
In> v := {5,6};
Out> {5,6};
In> x := SolveMatrix(A, v);
Out> {-4,9/2};
In> A * x;
Out> {5,6}; |
In> DiagonalMatrix({a,b,c})
Out> {{a,0,0},{0,b,0},{0,0,c}};
In> CharacteristicEquation(%,x)
Out> (a-x)*(b-x)*(c-x);
In> Expand(%,x)
Out> (b+a+c)*x^2-x^3-((b+a)*c+a*b)*x+a*b*c;
|
In> M:={{1,2},{2,1}}
Out> {{1,2},{2,1}};
In> EigenValues(M)
Out> {3,-1};
|
In> M:={{1,2},{2,1}}
Out> {{1,2},{2,1}};
In> e:=EigenValues(M)
Out> {3,-1};
In> EigenVectors(M,e)
Out> {{-ki2/ -1,ki2},{-ki2,ki2}};
|
In> IsHermitean({{0,I},{-I,0}})
Out> True;
In> IsHermitean({{0,I},{2,0}})
Out> False;
|
In> IsUnitary({{0,I},{-I,0}})
Out> True;
In> IsUnitary({{0,I},{2,0}})
Out> False;
|