next up previous contents
Next: Graphics Up: Mathematica Previous: Ordinary differential equations

Matrices

 

In Mathematica

For comparison with other CAS choose from: Axiom Derive Macsyma Maple Reduce

xx := a11,a12, a21,a22

yy := y1,y2

xx // MatrixForm

    a11   a12

    a21   a22
Det[ xx ]
    -(a12 a21) + a11 a22
zz = Inverse[xx] . yy // MatrixForm
           a22 y1                 a12 y2
    -------------------- - --------------------
    -(a12 a21) + a11 a22   -(a12 a21) + a11 a22

             a21 y1                  a11 y2
    -(--------------------) + --------------------
      -(a12 a21) + a11 a22    -(a12 a21) + a11 a22
Simplify[%] // MatrixForm
      a22 y1 - a12 y2
    --------------------
    -(a12 a21) + a11 a22

     -(a21 y1) + a11 y2
    --------------------
    -(a12 a21) + a11 a22
MatrixPower[ xx, -2 ] // Simplify // MatrixForm
                     2
        a12 a21 + a22             a12 (a11 + a22)
    -----------------------   -(--------------------)
                          2                        2
    (-(a12 a21) + a11 a22)      (a12 a21 - a11 a22)

                                     2
        a21 (a11 + a22)           a11  + a12 a21
    -(--------------------)   -----------------------
                         2                          2
      (a12 a21 - a11 a22)     (-(a12 a21) + a11 a22)
Eigenvalues[ 2,-1,1, 0,1,1, -1,1,1 ]
    {1, 1, 2}



Richard Liska