Chapter 9. Similarity of Matrices

A revision somewhat simplifies the material in the second half of Chapter 9 on rational canonical form, minimum polynomials, and so forth.

The commands A = diag([1 2]), U = xminusa(A), and pquick(U);ldisp(ans) do the computations to show that, when A is as in the first example in the Examples section (page 103), xI - A is equivalent to the strongly diagonal matrix whose diagonal entries are 1, x^2 - 3x + 2. To find the strongly diagonal matrix equivalent to xI - B is a little more difficult, because, since B does not have integer entries, `xminusa' cannot be used to enter xI - B in long format. Still, it is easy to enter xI - B, call it V, after which pquick(B);ldisp(ans) will show that xI - B is equivalent to xI - A because it will show that xI - B is equivalent to the same strongly diagonal matrix that xI - A is.

(Instead of using `pquick' you might prefer to use `pnewhat' and `palgo' to go through the steps of the reductions shown on page 103.)

It is easy to check that B is a root of its minimal polynomial x^2 - 3x + 2 found in this way. Just enter B and enter the command B^2 - 3*B + 2*eye(2). (Normally, a computation like this will, because of roundoff, only produce a matrix that is nearly zero, but since the denominator here is 4 there is no roundoff error and the result is exactly zero.)

Since B was defined to be P*A*inv(P) for a particular P, the matrices A and B are similar. Therefore, the Theorem of Section 3 tells us nothing we did not already know. The point of the calculation in the examples section is to show that the proof of the theorem of Section 3 actually gives a way of constructing a 2x2 matrix R1 for which B = R1*A*inv(R1). The calculations shown on page 104 can easily be done using Matlab.

The same steps used to construct an R1 for the first example can be used, at least in principle, to construct an R1 satisfying B = R1*A*inv(R1) whenever A and B are square matrices of rational numbers for which xI - A and xI - B are equivalent matrices of polynomials. Try some other examples. For example, with A equal to the matrix on page 105 and with B equal to its rational canonical form (page 106), find a matrix P such that B = P*A*inv(P).

As is mentioned in the footnote on page 98, the factorization of polynomials can be difficult. The Matlab function `roots' can be of assistance. For example, the command roots([1 -3 0 4]) will return an answer that will show you how to factor the characteristic polynomial of the matrix A on page 105.

Note that the condition B = P*A*inv(P) can also be written in the form B*P = P*A. This shows that if P has the required property, so does the matrix obtained by multiplying by a common denominator of the entries of P to obtain a matrix of integers. If A and B have integer entries, then B*P = P*A will be true without any roundoff error.

Return to Table of Contents.