Mathematica and Matrices

This short demo is inteded to show you a bit about how to define
and manipulate matrices using Mathematica.  It is nowhere near
comprehensive, but as always, you have the supplement to the
textbook and the Mathematica help features to tell you more.

\(Let\ \(a\_n\) 
      denote\ the\ nth\ Fibonacci\ number, \ \(\(Let\)\(\ \)\(v\&⇀\_n\) \(denote\)\(\ \)\(the\)\(\ \)\)\)
\(vector\ \((a\_n, 
            a\_\(n - 1\))\) . \ \ Then\ \ v\&⇀\_0 = \ \(\((1, 
          1)\)\(\ \)\(and\)\(\ \)\(
\)\)\)
\(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\(v\&⇀\_\(n + 
            1\)\)\(\ \)\(=\)\(\ \)\(A\ v\&⇀\_n\  = \ \(\(...\)\(\ \)\(=\)\(A\^\(n + 1\)\ v\&⇀\_0\)\)\)\(
\)\)\)
where

A  =  {{1, 1}, {1, 0}}

is a 2×2 matrix.  To display A as a matrix, rather than a list
of lists, use the "MatrixForm" command:

MatrixForm[A]

In order to find a (non-recursive) formula for the nth Fibonacci number
we diagonalize A.  First we find eigenvalues and eigenvectors using these 
to find the diagonal matrix conjugate to A and the conjugating matrix, 
respectively.

Eigenvalues[A]

Diag  =  DiagonalMatrix[%]

T  =  Eigenvectors[A]

But we want our eigenvectors to be columns, not rows, of the 
conjugating matrix:

T  =  Transpose[T]

Better.  But how do we know that these are in the right order--that is,
in the same order as the eigenvalues in "Diag"?

Eigensystem[A]

gives us the eigenvalues and corresponding eigenvectors together. Now 
we see that things are in order above.  At this point we have 
diagonalized A:

Simplify[T . Diag . Inverse[T]]

To compute the 1000  
      th Fibonacci number we use the diagonalization
\(to\ compute\ \(\(A\^1000\)\(:\)\)
		\)

Simplify[Expand[T . (Diag^1000) . Inverse[T] . {1, 1}]]

The first entry of the result is (Subscript[a, 1000])!  Actually,  
    Mathematica is
\(pretty\ good\ at\ handling\ matrix\ powers\ on\ its\ \(\(own\)\(:\)\)\)

MatrixPower[A, 1000] . {1, 1}