Eigenvalues and characteristic polynomials

1. Oct 26, 2012

dobedobedo

Hello guise.

I am familiar to a method of diagonalizing an nxn-matrix which fulfills the following condition:
the sum of the dimensions of the eigenspaces is equal to n.

As to the algorithm itself, it says:

1. Find the characteristic polynomial.
2. Find the roots of the characteristic polynomial.
3. Let the eigenvectors $v_{i}$ be the column vectors of some matrix S.
4. Let the eigenvalues $\lambda_{i}$ be the elements of some diagonal matrix, ordered to CORRESPOND the order of the eigenvectors in S.
5. Our Diagonalization of A should be:
$A = S \cdot A \cdot S^{-1} = (v_{1}...v_ {i}...v_ {n}) \cdot (\lambda_{1}...\lambda_{i}...\lambda_{n}) \cdot S^{-1}$

My question is: how do I find at least one such matrix A Corresponding to some randomly created polynomial of degree $m$ with integer roots? If it is too difficult to solve this for an arbitrary $m$, that's okay. But let's say for $m = 5$? Or for the much simpler case of $m = 2$?
Is this somehow related to the quadratic form?

2. Oct 26, 2012

HallsofIvy

Staff Emeritus
Given the m roots, construct the m by m diagonal matrix, D, having those roots on the main diagonal. For any invertible matrix, P, $A= PDP^{-1}$ will have characteristic polynomial with those roots.

3. Oct 26, 2012

dobedobedo

Jesus christ, I feel stupid. Thanks.

4. Oct 26, 2012

mathwonk

thats how people make up exercises and test problems.

5. Oct 27, 2012

dobedobedo

A follow-up question: how do I find a matrix with integer elements whose inverse also has integer elements? ^^

6. Oct 27, 2012

Hurkyl

Staff Emeritus
You need its determinant to be 1 or -1.

Any integer matrix is a product of integer elementary matrices corresponding to the row operations:
• Adding an integer multiple of one row to another
• Swapping two rows
• Multiplying a row by a constant

As long as you only use 1 or -1 for that last one, all three sorts are invertible.

7. Oct 27, 2012

dobedobedo

Hahahaha! How brilliant. Okay. Now I can finally randomly create integer matrices A such that $A = SDS^{-1}$ are integer matrices as well! Other questions:

-How do I find a matrix A with integer elements, which has an inverse with rational elements? I get the feeling that it always is that a "rational" matrix always has a "rational" inverse [but I do not know how to show it]?

-How do I find a matrix A with rational elements which has an inverse with integer elements?

-How do I prove that a real matrix never has an inverse with complex elements?

Last edited by a moderator: Oct 27, 2012
8. Oct 27, 2012

HallsofIvy

Staff Emeritus
You can't create a matrix A such that this will work for all S. You need both A and S having determinants 1 or -1.

The inverse of matrix A is the matrix of cofactors divided by the determinant of A so, yes, since the rational numbers is closed under addition, subtraction, multiplication, and division by non-zero numbers, the inverse of a matrix with rational entries (including integers) will always have rational entries.

An obvious way is to start with an invertible matrix with integer coefficients and let A be its inverse! More generally if the determinant of A is a common multiple of its denominators (and so an integer) then its inverse will have integer entries.

Again, every element of A-1 is its cofactor divided by the matrix of A. Since the real numbers is closed under the four basic operations, that will always give real numbers.

9. Oct 27, 2012

DonAntonio

If you don't have the eigenvalues you use the companion matrix of a monic polynomial:
$${}$$
$$\left(\begin{array} {}0&1&0&0&...&0\\0&0&1&0&...&0\\...&...&...&...&...&...\\0&0&0&...&0&1\\\!\!-c_0&\!\!-c_1&\!\!-c_2&\!\!-c_3&...&\!\!-c_{n-1}\end{array}\right)$$

The coolest feature of the above matrix is that $\,f(x)=c_0+c_1x+...+c_{n-1}x^{n-1}+x^n\,$ is not only its

characteristic but also its minimal polynomial...!

DonAntonio

10. Oct 27, 2012

dobedobedo

Very interesting! But I am somewhat confused. How do I actually use it? I was wondering how to find my matrix A out of some given polynomial - but that would require me to know it's roots, due to the design of the algorithm. For instance, if I have my matrix {{2,1},{1,2}} then it's characteristic polynomial is x^2-4x+3. If I use the formula you gave me, it's corresponding matrix would be {{0,1},{0,0},{-3,-2}}, which is non-square and therefore not a matrix A which fulfills the criteria of the algorithm? Or am I completely mistaken?

Last edited: Oct 27, 2012
11. Nov 4, 2012

$\left( \begin{array}{cc} 0 & 1\\ -3 & 4\\ \end{array} \right) ?$