However, the series refers to some basic algebra and matrix properties that, while used

__, usually don't have accessible or comprehensive proofs available on the Internet (You can find them in good linear algebra textbooks). It is also a good place to show some neat tricks for sagemath.__

**everywhere**There are better and more comprehensive proofs out there, but these are a good start.

We will start today with matrix traces and determinants, and their relationship to matrix eigenvalues. Basically we will be proving that for any n x n matrix, the eigenvalues add up to the sum of the diagonal elements, and multiply up to the determinant of the matrix.

First, let's look at a simple property of polynomial equations, using an order 3 equation as an example.

If a polynomial P(x) has a series of solutions (λ

_{1},λ

_{2},λ

_{3}), it can be written as:

Note the first line where a python list comprehension was used to generate a list of subscripted variables. Also note that the variable called lambda as this is a reserved keyword in python.wasn't |

^{(n-1)}coefficient (the x

^{2}term in this example)

__, and the constant term__

**equals****the sum of the roots**__. These rules hold for polynomials of any order.__

**equals the product of the roots**Now let's look at how this applies to the characteristic polynomial of matrices:

The

__of a given matrix M, is given by the__

**characteristic polynomial**__of__

**determinant**M - λI, and the

__are the__

**solutions of this polynomial**__of M.__

**eigenvalues**Note the use of a list comprehension again, to create a list of indexed variables m. |

Now we could take the

__of this matrix in sagemath and expand and collect on x. However, sagemath comes with a matrix method that returns the characteristic polynomial directly that we will use instead.__

**determinant**Before we do this, it should be clear that if

__in the matrix above,__

**x is set to zero**

**t****he constant term of the characteristic polynomial equals the determinant of the original matrix M.**Expanding the characteristic polynomial and taking the x

^{2}term

it can be seen that this term

**equals the sum of the diagonal elements, otherwise called the trace of a matrix**(ignoring signs).

Combining this with our polynomial rules from above, we end up proving the following matrix properties:

**The trace of the matrix equals the sum of the eigenvalues.**

**The product of the eigenvalues equals the determinant of the original matrix.**
We will use these properties in the next couple of posts to show some more advanced properties of matrices.

## No comments:

## Post a Comment