Matrix

  1. Create:matrix
    • y=matrix([[1,0,0],[0,2,0],[0,0,3]])*6 >>>y=60001200018

  2. Determinant:det
    • m=matrix([[1,2,3],[4,5,6],[7,8,9]]) det(m) >>>0

  3. Rank:rank
    • A=matrix([[1,2],[3,5]]) rank(A) >>>2

  4. Transposition:transpose
    • m=matrix([[1,2,3],[4,5,6],[7,18,9]]) transpose(m) >>>1472518369

  5. Adjugate:
    • m=matrix([[1,2,3],[4,5,6],[7,18,9]]) adjugate(m) >>>-6336-36-12637-4-3

  6. Inverse:inv
    • m=matrix([[1,2,3],[4,5,6],[7,18,9]]) inv(m) >>>-1.050.6-0.050.1-0.20.10.616666666666667-0.0666666666666667-0.05

  7. Eigenvalues:EigVal
    • A=matrix([[3,-2,4,-2],[5,3,-3,-2],[5,-2,2,-2],[5,-2,-3,3]]) EigVal(A) >>>{-2:1,3:1,5:2}

    Matrix A has eigenvalues -2, 3, and 5, and that the eigenvalues -2 and 3 have algebraic multiplicity 1 and that the eigenvalue 5 has algebraic multiplicity 2.

  8. Eigenvectors:EigVec
    • A=matrix([[3,-2,4,-2],[5,3,-3,-2],[5,-2,2,-2],[5,-2,-3,3]]) EigVec(A) >>> (-2,1, 0 1 1 1 ), (3,1, 1 1 1 1 ), (5,2, 1 1 1 0 , 0 -1 0 1 )

  9. Dot product:dot
    • v1=matrix([[1,2,3]]) v2=matrix([[4,5,6]]) dot(v1,v2) >>>32

  10. Cross product:cross
    • v1=matrix([[1,2,3]]) v2=matrix([[4,5,6]]) cross(v1,v2) >>>-36-3

  11. LUdecomposition:LU
    • A=matrix([[4,3],[1.5,1]]) L,U=LU(A) >>>L=100.3751 >>>U=430-0.125

  12. QRdecomposition:QR
    • A=matrix([[1,1,1],[1,1,3],[2,3,4]]) Q,R=QR(A) >>>Q=0.408248290463863-0.577350269189626-0.7071067811865480.408248290463863-0.5773502691896260.7071067811865480.8164965809277260.5773502691896260 >>>R=2.449489742783183.26598632371094.8989794855663600.5773502691896260001.4142135623731

  13. Diagonalize:Diag
    • A=matrix([[1,2,0],[0,3,0],[2,-4,2]]) P,D=Diag(A) >>>P=-10-100-1212 >>>D=100020003