Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

given the similarity relation between $A$ and $B$ matrices;

$$ A = L^{-1} B L $$

if $A$ and $B$ are given, what is the best way to compute the similarity transformation matrix $L$?

share|cite|improve this question
The matrix $L$ need not be unique. One method is to find a "canonical form" for $A$ and $B$, which should be equal up to some easy permutation of blocks (e.g., the rational canonical form). If $R_A = R_B$, and $\beta$ is a rational canonical basis for $A$, $\gamma$ a rational canonical basis for $B$, then letting $P$ be the change-of-basis matrix for $\beta$ and $Q$ the change-of-basis matrix for $\gamma$, you get $Q^{-1}AQ = P^{-1}BP$, from whence you get $A = (QP^{-1})B(QP^{-1})^{-1}$. – Arturo Magidin Oct 26 '11 at 20:23
up vote 1 down vote accepted

Answering the unanswered before it gets too old to be pushed to the front page. One possible answer is already given by Arturo Magidin in the comment.

If $A$ and $B$ are similar then they are also similar to a canonical form (typically the Jordan form). Thus, one way to find the similarity matrix is to reach to the canonical form, say $J$, from both matrices via $$Q^{-1}AQ = J = P^{-1}BP$$

Then, one can use either $A = (QP^{-1})B(QP^{-1})^{-1}$ or $B = (PQ^{-1})A(PQ^{-1})^{-1}$

share|cite|improve this answer
If $A$ and $B$ are matrices with inexact numbers, replace "Jordan" with "Schur" in this answer. – J. M. Nov 6 '11 at 1:06
@J.M. Feel free to edit my answers whenever you think something is missing or you simply have additional content :) – user13838 Nov 6 '11 at 1:43
Naw, I'm fine with it as a comment. :) (The first upvote's mine.) – J. M. Nov 6 '11 at 1:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.