Menu
QuantML.orgQuantML.org
  • Linear Algebra
  • Similar Matrices

    Similar Matrices

    Say we have two
    \(n\times n\)
    square matrices
    \(A\)
    and
    \(B\)
    .
    \(A\)
    and
    \(B\)
    are similar matrices if there exists some
    \(M\)
    such that,
    \[ \begin{matrix} B=M^{-1}AM \end{matrix} \]
    \(\Lambda\)
    and
    \(A\)
    are similar matrices.
    Explanation:
    Say we have a
    \(n\times n\)
    matrix
    \(A\)
    ,
    \(\vec{x}_1,\vec{x}_2,\cdots,\vec{x}_n\)
    are eigenvectors of
    \(A\)
    , and
    \(\lambda_1, \lambda_2, \cdots, \lambda_n\)
    are the eigenvalues of
    \(A\)
    .
    \(S=\begin{bmatrix} \vdots & \vdots & \cdots & \vdots \\ \vec{x}_{1} & \vec{x}_{2} & \cdots & \vec{x}_{n} \\ \vdots & \vdots & \cdots & \vdots \\ \end{bmatrix},\)
    \(\Lambda=\begin{bmatrix} \lambda_1 & 0 & \cdots & 0 \\ 0 & \lambda_2 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & \lambda_n \\ \end{bmatrix}\)

    We have seen HERE that,
    \[ \Lambda =S^{-1}AS\]
    So,
    \(\Lambda\)
    and
    \(A\)
    are similar matrices.

    \(A\)
    has a family of similar matrices and
    \(\Lambda\)
    is the best(simplest) similar matrix among them.

    Let's take an example,
    Say
    \(A= \begin{bmatrix} 2&1\\ 1&2 \end{bmatrix}\)

    Eigenvalues of
    \(A\)
    are
    \(3,1\)
    so
    \(\Lambda= \begin{bmatrix} 3&0\\ 0&1 \end{bmatrix}\)

    So
    \(\begin{bmatrix} 2&1\\ 1&2 \end{bmatrix}\)
    and
    \(\begin{bmatrix} 3&0\\ 0&1 \end{bmatrix}\)
    are similar matrices.
    Let's get another similar matrix using
    \(B=M^{-1}AM\)
    .
    Let's choose a random full rank(invertible) matrix
    \(M\)
    Say
    \(M= \begin{bmatrix} 1&4\\ 0&1 \end{bmatrix}\)

    So
    \(\underbrace{\begin{bmatrix} 1&-4\\ 0&1 \end{bmatrix}}_{M^{-1}} \underbrace{\begin{bmatrix} 2&1\\ 1&2 \end{bmatrix}}_{A} \underbrace{\begin{bmatrix} 1&4\\ 0&1 \end{bmatrix}}_{M} = \underbrace{\begin{bmatrix} -2&-15\\ 1&6 \end{bmatrix}}_{B}\)

    So
    \(\begin{bmatrix} 2&1\\ 1&2 \end{bmatrix}\)
    and
    \(\begin{bmatrix} -2&-15\\ 1&6 \end{bmatrix}\)
    are similar matrices.
    Notice that here also eigenvalues are
    \(3,1\)

    Here we can see that
    \(\underbrace{\begin{bmatrix} 2&1\\ 1&2 \end{bmatrix}}_{A},\quad\)
    \(\underbrace{\begin{bmatrix} 3&0\\ 0&1 \end{bmatrix}}_{\Lambda},\quad\)
    and
    \(\underbrace{\begin{bmatrix} -2&-15\\ 1&6 \end{bmatrix}}_{B}\)
    have same eigenvalues
    \(3,1\)
    we can verify it by
    \(\text{trace}(\cdot) = 4\)
    and
    \(\text{det}(\cdot) = 3\)


    Similar matrices have same eigenvalues
    Explanation:
    Say we have a
    \(n\times n\)
    matrices
    \(A\)
    ,
    \(\vec{x}_1,\vec{x}_2,\cdots,\vec{x}_n\)
    are eigenvectors of
    \(A\)
    , and
    \(\lambda_1, \lambda_2, \cdots, \lambda_n\)
    are the eigenvalues of
    \(A\)
    .
    So
    \(A\vec{x}_i=\lambda_i \vec{x}\)

    (
    \(MM^{-1}=\mathcal{I}_n\)
    )
    \(A\mathcal{I}_n\vec{x}_i=\lambda_i \vec{x}\)

    \(AMM^{-1}\vec{x}_i=\lambda_i \vec{x}\)

    \(\underbrace{(M^{-1}AM)}_{B} M^{-1}\vec{x}_i=\lambda_i M^{-1}\vec{x}\)

    \(B \underbrace{M^{-1}\vec{x}_i}_{\text{(say) }\vec{v}}=\lambda_i \underbrace{M^{-1}\vec{x}_i}_{\text{(say) }\vec{v}}\)

    \(M^{-1}\)
    is just a transformation of
    \(\vec{x}\)
    from
    \(\mathbb{R}^n\)
    to
    \(\mathbb{R}^n\)

    So
    \(M^{-1}\vec{x}\)
    is a vector in
    \(\mathbb{R}^n\)

    \(B \vec{v}_i=\lambda_i \vec{v}\)

    So now we can see that eigenvalues of
    \(B=M^{-1}AM\)
    is same as eigenvalues of
    \(A\)

    And
    \((\)
    eigenvectors of
    \(B)=M^{-1}\)
    (eigenvectors of
    \(A\)
    )

    What if we have same eigenvalues ?

    If we don't have all eigenvalues to be different then, there might not be
    \(n\)
    independent eigenvectors, so the matrix might not be diagonalizable.
    Example
    Say
    \(A=\begin{bmatrix} 4&0\\ 0&4 \end{bmatrix}\)
    here eigenvalues are
    \(4,4\)
    and every vector is an eigenvector because all vectors are only scaled by
    \(4\)
    \(A\)
    doesn't change the direction
    Is there any matrices similar to
    \(A\)
    ?
    Say that matrix
    \(B\)
    is similar to
    \(A\)
    .
    \(B=M^{-1}AM\)

    \(B=M^{-1}\begin{bmatrix} 4&0\\ 0&4 \end{bmatrix}M\)

    \(B=4M^{-1}\begin{bmatrix} 1&0\\ 0&1 \end{bmatrix}M\)

    \(B=4M^{-1}\mathcal{I}M\)

    \(B=4M^{-1}M\)

    \(B=4\mathcal{I}\)

    \(B=\begin{bmatrix} 4&0\\ 0&4 \end{bmatrix}\)

    So similar matrix for
    \(A\)
    is only
    \(A\)
    itself.

    It is not necessary that if our eigenvalues repeat then we can't have similar matrices.
    Example
    Say
    \(A=\begin{bmatrix} 4&1\\ 0&4 \end{bmatrix}\)
    here eigenvalues are
    \(4,4\)

    It has a bunch of similar matrices, like
    \(\begin{bmatrix} 4&1\\ 0&4 \end{bmatrix},\quad\)
    \(\begin{bmatrix} 4&0\\ 7&4 \end{bmatrix},\quad\)
    \(\begin{bmatrix} 7&-2\\ 1&2 \end{bmatrix},\cdots\)
    these all are similar matrices.