November 21, 2024

How to Calculate Eigenvalues and Eigenvectors of Matrices by Hand – Mathematics, Dynamics, and Control Engineering Tutorial


In this mathematics, linear algebra, and control engineering tutorial, we explain how to calculate eigenvalues and eigenvectors of matrices by hand. This tutorial is very important for control engineers and people studying the stability of dynamical systems. The YouTube video accompanying this post is given below.

Problem Formulation: Consider the 2 by 2 matrix A defined below.

(1)   \begin{align*}A=\begin{bmatrix}7 & -4 \\ 5 & -2  \end{bmatrix}\end{align*}

Calculate by hand the eigenvalues and eigenvectors of this matrix.

To solve this problem, first, we need to recall the definition of the eigenvalues and eigenvectors. The eigenvalue \lambda and the eigenvector \mathbf{w} of the matrix A are defined and related by the following equation

(2)   \begin{align*}A\mathbf{w}=\lambda \mathbf{w}\end{align*}

From the last equation, we have

(3)   \begin{align*} A\mathbf{w}-\lambda \mathbf{w}=0 \\\end{align*}

and finally

(4)   \begin{align*} \big(A-\lambda \cdot I \big)\mathbf{w}=0\end{align*}


For the fixed eigenvalue \lambda, the equation in (4) represents a linear system of equations, where the variables that we want to solve for are the entries of the eigenvector \mathbf{w}. This system always has a trivial solution \mathbf{w}=0 (all entries of \mathbf{w} are zero). However, we are not interested in a trivial solution. Instead, we are interested in a nontrivial solution. A nontrivial solution is a solution \mathbf{w}, where at least one entry of \mathbf{w} is not equal to zero. We are searching for nontrivial solutions.

The main condition for the existence of the nontrivial solution is

(5)   \begin{align*}\text{det}\big(A-\lambda \cdot I \big) =0\end{align*}

where I is the identity matrix, and \text{det}\big(\cdot \big) is the matrix determinant operator. The equation (5) is a polynomial in \lambda. In fact, the polynomial

(6)   \begin{align*}p(\lambda)=\text{det}\big(A-\lambda \cdot I \big)\end{align*}

is called the characteristic polynomial. The eigenvalues are determined as zeros of the characteristic polynomial, that is, as the solutions of (5). To summarize

  • The eigenvalues \lambda are determined as zeros of the characteristic polynomial, that is, as the solutions of (5).
  • For the computed value of \lambda obtained by solving (5), the corresponding eigenvector is obtained by solving

    (7)   \begin{align*} \big(A-\lambda \cdot I \big)\mathbf{w}=0\end{align*}


    for \mathbf{w}.

Next, let us apply this theory to our problem. We first need to compute the zeros of the characteristic polynomial:

(8)   \begin{align*}& \text{det}\big(A-\lambda \cdot I \big) =0 \\& \text{det}\Big( \begin{bmatrix}7 & -4 \\ 5 & -2  \end{bmatrix} - \lambda \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \Big)=0 \\& \text{det}\Big( \begin{bmatrix}7 & -4 \\ 5 & -2  \end{bmatrix} - \begin{bmatrix} \lambda  & 0 \\ 0 & \lambda  \end{bmatrix} \Big) =0 \\ & \text{det}\Big( \begin{bmatrix}7 - \lambda  & -4 \\ 5 & -2 -\lambda \end{bmatrix} \Big) =0  \\& \lambda^{2}-5\lambda +6=0\end{align*}

The zeros of the characteristic polynomial are found by computing the zeros of the last equation. To compute the zeros (eigenvalues), we use the equation for zeros of a quadratic equation. The eigenvalues are

(9)   \begin{align*}\lambda_{1}=2,\;\; \lambda_{2}=3\end{align*}

For these two eigenvalues, we need to compute the corresponding eigenvectors. The eigenvectors are computed by solving the corresponding systems of homogeneous equations (7). For \mabda_{1}=2, we have

(10)   \begin{align*}&  \big(A-\lambda_{1} \cdot I \big)\mathbf{w}=0 \\& \big(\begin{bmatrix}7 & -4 \\ 5 & -2  \end{bmatrix}-2 \cdot \begin{bmatrix}1 & 0 \\ 0 & 1 \end{bmatrix}\big)\mathbf{w}=0 \\& \begin{bmatrix} 5 & -4 \\ 5 & -4  \end{bmatrix}\begin{bmatrix}w_{1} \\ w_{2} \end{bmatrix} =\begin{bmatrix} 0 \\ 0 \end{bmatrix}\end{align*}

where w_{1} and w_{2} are the entries of \mathbf{w}. From the last equation, we have

(11)   \begin{align*}& 5w_{1}-4w_{2} =0 \\& 5w_{1}-4w_{2} =0\end{align*}

This is actually a single equation:

(12)   \begin{align*}& 5w_{1}-4w_{2} =0\end{align*}

From this equation, we have

(13)   \begin{align*}w_{1}=\frac{4}{5}w_{2} \end{align*}

and w_{2} can be freely selected. That is, there are an infinite number of eigenvectors for the eigenvalue \lambda_{1}=2. These eigenvectors are parametrized as follows

(14)   \begin{align*}\mathbf{w}=\alpha \begin{bmatrix}\frac{4}{5} \\ 1  \end{bmatrix}\end{align*}

where \alpha is a real parameter that can take any value.

Next, we determine the eigenvectors for \lambda_{2}=3. We have

(15)   \begin{align*}&  \big(A-\lambda_{2} \cdot I \big)\mathbf{w}=0 \\& \big(\begin{bmatrix}7 & -4 \\ 5 & -2  \end{bmatrix}-3 \cdot \begin{bmatrix}1 & 0 \\ 0 & 1 \end{bmatrix}\big)\mathbf{w}=0 \\& \begin{bmatrix} 4 & -4 \\ 5 & -5  \end{bmatrix}\begin{bmatrix}w_{1} \\ w_{2} \end{bmatrix} =\begin{bmatrix} 0 \\ 0 \end{bmatrix}\end{align*}

From the last equation, we have

(16)   \begin{align*}& 4w_{1}-4w_{2} =0 \\& 5w_{1}-5w_{2} =0 \end{align*}

By dividing the first equation by 4 and the last equation by 5, we obtain

(17)   \begin{align*}& w_{1}-w_{2} =0 \\& w_{1}-w_{2} =0 \end{align*}

These two equations are actually a single equation that looks like this

(18)   \begin{align*}w_{1}-w_{2} =0 \end{align*}

From this equation, we obtain

(19)   \begin{align*}w_{1}=w_{2}\end{align*}

where w_{2} can freely be selected. This means that there are an infinite number of eigenvectors of the matrix A. These eigenvectors are parameterized by the following equation

(20)   \begin{align*}\mathbf{w}=\beta \begin{bmatrix}1 \\ 1  \end{bmatrix}\end{align*}

where \beta is a real number that can take any value in the real set.