Linear System of ODEs Solver (2x2)
This Linear System ODE Solver Calculator solves a pair of differential equations that feed into each other, and shows the working line by line. Written in matrix form the system asks which directions keep their shape as time passes, and those directions are exactly the eigenvectors of the matrix. Each eigenvalue supplies the exponential that rides along its own eigenvector. Following the same pattern every time keeps each eigenvector paired with the right eigenvalue.
Step-by-step method
- Set up the problem.
- Write the method.
- Find the eigenvalues and eigenvectors.
- Build a solution from each eigenvalue.
- Write the general solution.
Formula: Eigenvector Solution
Each eigenvalue λ and eigenvector v of A gives a solution v e^(λt). Adding them with constants gives the general solution.
Useful Tips to Remember
Every eigenvalue gives a solution of the form \(\mathbf{v}e^{\lambda t}\), where \(\mathbf{v}\) is its eigenvector. Complex eigenvalues come in pairs, and the real and imaginary parts of one solution give two real solutions, so the other eigenvalue adds nothing new. A repeated eigenvalue with too few eigenvectors needs a generalized eigenvector \(\mathbf{w}\) with \((A - \lambda I)\mathbf{w} = \mathbf{v}\). The general solution has one constant for each unknown function.
Required knowledge
- How to find the eigenvalues and eigenvectors, covered in the Eigenvector of a 2×2 Matrix Calculator.
- How to solve for a generalized eigenvector, covered in the Linear Equation Calculator.
- How the single equation case works, covered in the Second Order ODE Solver Calculator.
Where Are Linear Systems of Differential Equations Used?
Systems of differential equations describe several quantities that affect each other. Predator and prey populations, two tanks of liquid feeding each other and coupled springs all lead to them. The eigenvalues show whether the system settles, grows or oscillates, which is how engineers check the stability of circuits, aircraft and control systems.
- Predator and prey populations
- Coupled springs and masses
- Connected tanks in mixing problems
- Stability of control systems
- Electrical networks with several loops
Linear System ODE Practice Problems
Example 1 solves the system with \(A = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}\), and Example 2 uses \(A = \begin{bmatrix} 0 & 1 \\ -2 & -3 \end{bmatrix}\). Find the eigenvalues and eigenvectors, then build the solution. For two more free worked examples, check out the Linear System of ODEs Solver (2x2) Notes.
The worked examples below go through the same pattern from start to finish, so you can compare every step with your own working. For more practice, the notes page goes further with extra worked examples and fuller explanations of the ideas behind each step. Use them together to check your answers and to understand why each step works.
See Example 1 Hide Example 1
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the method.
- Find the eigenvalues and eigenvectors.
- Build a solution from each eigenvalue.
- Write the general solution.
Formula
Formula: Eigenvector Solution
Each eigenvalue λ and eigenvector v of A gives a solution v e^(λt). Adding them with constants gives the general solution.
Step 1
Step 1 - Set up the problem.
In this problem: We are solving the system \(\begin{bmatrix} x_{1}' \\ x_{2}' \end{bmatrix} = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}\begin{bmatrix} x_{1} \\ x_{2} \end{bmatrix}\), where each \(x_{i}\) is a function of \(t\).
Step 2
Step 2 - Write the method.
In this problem: If \(\mathbf{v}\) is an eigenvector of A with eigenvalue \(\lambda\), then \(\mathbf{v}e^{\lambda t}\) solves the system, because differentiating it multiplies it by \(\lambda\), and so does multiplying by A. Adding one such solution for each independent eigenvector, each times a constant, gives the general solution.
Step 3
Step 3 - Find the eigenvalues and eigenvectors.
In this problem: The eigenvalues and eigenvectors of A, covered in the Eigenvector of a 2×2 Matrix Calculator, give the building blocks of the solution.
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the formula.
- Find the eigenvalues.
- Find the eigenvector for each eigenvalue.
Formula
Formula: Eigenvector Equation
This equation gives the eigenvectors of A. For each eigenvalue, find the nonzero vectors that \(A - \lambda I\) sends to zero.
Step 1
Step 1 - Set up the problem.
In this problem: We are finding the eigenvectors of \(A = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}\), the nonzero vectors \(\mathbf{v}\) that A only stretches or shrinks, so that \(A\mathbf{v} = \lambda\mathbf{v}\).
Step 2
Step 2 - Write the formula.
In this problem: Moving \(\lambda\mathbf{v}\) to the left gives this equation, so each eigenvector is a nonzero solution for its own eigenvalue.
Step 3
Step 3 - Find the eigenvalues.
In this problem: The eigenvalues come first, covered in the Eigenvalue of a 2×2 Matrix Calculator, which gives \(\lambda_{1} = 1,\; \lambda_{2} = 3\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the formula.
- Subtract lambda from the main diagonal.
- Work out the determinant.
- Solve for the eigenvalues.
Formula
Formula: Characteristic Equation
This equation gives the eigenvalues of A. Subtract lambda from the main diagonal, take the determinant and set it equal to 0.
Step 1
Step 1 - Set up the problem.
In this problem: We are finding the eigenvalues of \(A = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}\), the numbers \(\lambda\) for which \(A\mathbf{v} = \lambda\mathbf{v}\) has a nonzero solution.
Step 2
Step 2 - Write the formula.
In this problem: An eigenvalue makes \(A - \lambda I\) squash some nonzero vector to zero, and that happens exactly when its determinant is 0.
Step 3
Step 3 - Subtract lambda from the main diagonal.
In this problem: Taking \(\lambda\) away from each entry on the main diagonal gives \(A - \lambda I = \begin{bmatrix} 2 - \lambda & 1 \\ 1 & 2 - \lambda \end{bmatrix}\).
Step 4
Step 4 - Work out the determinant.
In this problem: The determinant of a 2 by 2 matrix is \(ad - bc\), covered in the Determinant of a 2×2 Matrix Calculator. Multiplying out gives the characteristic polynomial \(\lambda^{2} - 4 \lambda + 3\).
Step 5
Step 5 - Solve for the eigenvalues.
In this problem: The eigenvalues are the solutions of \(\lambda^{2} - 4 \lambda + 3 = 0\). The polynomial factorises as \(\left(\lambda - 1\right)\left(\lambda - 3\right) = 0\), so \(\lambda = 1\) or \(\lambda = 3\).
Final Answer
Step 4
Step 4 - Find the eigenvector for each eigenvalue.
In this problem: Each eigenvalue is put back into \((A - \lambda I)\mathbf{v} = \mathbf{0}\) in turn.
Step 4a
Step 4a - Find the eigenvector for the first eigenvalue.
In this problem: Putting \(\lambda = 1\) into \(A - \lambda I\) gives \(\begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix}\). Its rows are multiples of each other, so they give the single equation \(x + y = 0\). Choosing simple numbers that satisfy it gives \(\mathbf{v}_{1} = \begin{bmatrix} 1 \\ -1 \end{bmatrix}\).
Step 4b
Step 4b - Find the eigenvector for the second eigenvalue.
In this problem: Putting \(\lambda = 3\) into \(A - \lambda I\) gives \(\begin{bmatrix} -1 & 1 \\ 1 & -1 \end{bmatrix}\). Its rows are multiples of each other, so they give the single equation \(x - y = 0\). Choosing simple numbers that satisfy it gives \(\mathbf{v}_{2} = \begin{bmatrix} 1 \\ 1 \end{bmatrix}\).
Final Answer
Step 4
Step 4 - Build a solution from each eigenvalue.
In this problem: Each eigenvalue gives its own solutions.
Step 4a
Step 4a - Build solution 1.
In this problem: The eigenvalue \(\lambda = 1\) has eigenvector \(\begin{bmatrix} 1 \\ -1 \end{bmatrix}\), which gives the solution \(\begin{bmatrix} 1 \\ -1 \end{bmatrix}e^{t}\).
Step 4b
Step 4b - Build solution 2.
In this problem: The eigenvalue \(\lambda = 3\) has eigenvector \(\begin{bmatrix} 1 \\ 1 \end{bmatrix}\), which gives the solution \(\begin{bmatrix} 1 \\ 1 \end{bmatrix}e^{3 t}\).
Step 5
Step 5 - Write the general solution.
In this problem: Adding the solutions, each times its own constant, and reading off each component gives the general solution.
Final Answer
See Example 2 Hide Example 2
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the method.
- Find the eigenvalues and eigenvectors.
- Build a solution from each eigenvalue.
- Write the general solution.
Formula
Formula: Eigenvector Solution
Each eigenvalue λ and eigenvector v of A gives a solution v e^(λt). Adding them with constants gives the general solution.
Step 1
Step 1 - Set up the problem.
In this problem: We are solving the system \(\begin{bmatrix} x_{1}' \\ x_{2}' \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -2 & -3 \end{bmatrix}\begin{bmatrix} x_{1} \\ x_{2} \end{bmatrix}\), where each \(x_{i}\) is a function of \(t\).
Step 2
Step 2 - Write the method.
In this problem: If \(\mathbf{v}\) is an eigenvector of A with eigenvalue \(\lambda\), then \(\mathbf{v}e^{\lambda t}\) solves the system, because differentiating it multiplies it by \(\lambda\), and so does multiplying by A. Adding one such solution for each independent eigenvector, each times a constant, gives the general solution.
Step 3
Step 3 - Find the eigenvalues and eigenvectors.
In this problem: The eigenvalues and eigenvectors of A, covered in the Eigenvector of a 2×2 Matrix Calculator, give the building blocks of the solution.
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the formula.
- Find the eigenvalues.
- Find the eigenvector for each eigenvalue.
Formula
Formula: Eigenvector Equation
This equation gives the eigenvectors of A. For each eigenvalue, find the nonzero vectors that \(A - \lambda I\) sends to zero.
Step 1
Step 1 - Set up the problem.
In this problem: We are finding the eigenvectors of \(A = \begin{bmatrix} 0 & 1 \\ -2 & -3 \end{bmatrix}\), the nonzero vectors \(\mathbf{v}\) that A only stretches or shrinks, so that \(A\mathbf{v} = \lambda\mathbf{v}\).
Step 2
Step 2 - Write the formula.
In this problem: Moving \(\lambda\mathbf{v}\) to the left gives this equation, so each eigenvector is a nonzero solution for its own eigenvalue.
Step 3
Step 3 - Find the eigenvalues.
In this problem: The eigenvalues come first, covered in the Eigenvalue of a 2×2 Matrix Calculator, which gives \(\lambda_{1} = -2,\; \lambda_{2} = -1\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the formula.
- Subtract lambda from the main diagonal.
- Work out the determinant.
- Solve for the eigenvalues.
Formula
Formula: Characteristic Equation
This equation gives the eigenvalues of A. Subtract lambda from the main diagonal, take the determinant and set it equal to 0.
Step 1
Step 1 - Set up the problem.
In this problem: We are finding the eigenvalues of \(A = \begin{bmatrix} 0 & 1 \\ -2 & -3 \end{bmatrix}\), the numbers \(\lambda\) for which \(A\mathbf{v} = \lambda\mathbf{v}\) has a nonzero solution.
Step 2
Step 2 - Write the formula.
In this problem: An eigenvalue makes \(A - \lambda I\) squash some nonzero vector to zero, and that happens exactly when its determinant is 0.
Step 3
Step 3 - Subtract lambda from the main diagonal.
In this problem: Taking \(\lambda\) away from each entry on the main diagonal gives \(A - \lambda I = \begin{bmatrix} - \lambda & 1 \\ -2 & - \lambda - 3 \end{bmatrix}\).
Step 4
Step 4 - Work out the determinant.
In this problem: The determinant of a 2 by 2 matrix is \(ad - bc\), covered in the Determinant of a 2×2 Matrix Calculator. Multiplying out gives the characteristic polynomial \(\lambda^{2} + 3 \lambda + 2\).
Step 5
Step 5 - Solve for the eigenvalues.
In this problem: The eigenvalues are the solutions of \(\lambda^{2} + 3 \lambda + 2 = 0\). The polynomial factorises as \(\left(\lambda + 2\right)\left(\lambda + 1\right) = 0\), so \(\lambda = -2\) or \(\lambda = -1\).
Final Answer
Step 4
Step 4 - Find the eigenvector for each eigenvalue.
In this problem: Each eigenvalue is put back into \((A - \lambda I)\mathbf{v} = \mathbf{0}\) in turn.
Step 4a
Step 4a - Find the eigenvector for the first eigenvalue.
In this problem: Putting \(\lambda = -2\) into \(A - \lambda I\) gives \(\begin{bmatrix} 2 & 1 \\ -2 & -1 \end{bmatrix}\). Its rows are multiples of each other, so they give the single equation \(x + \frac{1}{2}y = 0\). Choosing simple numbers that satisfy it gives \(\mathbf{v}_{1} = \begin{bmatrix} 1 \\ -2 \end{bmatrix}\).
Step 4b
Step 4b - Find the eigenvector for the second eigenvalue.
In this problem: Putting \(\lambda = -1\) into \(A - \lambda I\) gives \(\begin{bmatrix} 1 & 1 \\ -2 & -2 \end{bmatrix}\). Its rows are multiples of each other, so they give the single equation \(x + y = 0\). Choosing simple numbers that satisfy it gives \(\mathbf{v}_{2} = \begin{bmatrix} 1 \\ -1 \end{bmatrix}\).
Final Answer
Step 4
Step 4 - Build a solution from each eigenvalue.
In this problem: Each eigenvalue gives its own solutions.
Step 4a
Step 4a - Build solution 1.
In this problem: The eigenvalue \(\lambda = -2\) has eigenvector \(\begin{bmatrix} 1 \\ -2 \end{bmatrix}\), which gives the solution \(\begin{bmatrix} 1 \\ -2 \end{bmatrix}e^{- 2 t}\).
Step 4b
Step 4b - Build solution 2.
In this problem: The eigenvalue \(\lambda = -1\) has eigenvector \(\begin{bmatrix} 1 \\ -1 \end{bmatrix}\), which gives the solution \(\begin{bmatrix} 1 \\ -1 \end{bmatrix}e^{- t}\).
Step 5
Step 5 - Write the general solution.
In this problem: Adding the solutions, each times its own constant, and reading off each component gives the general solution.
Final Answer
Notes and Practice Mode
Want to understand the method more deeply? The 2×2 Linear System ODE Solver Notes go through the same pattern with extra worked examples and fuller explanations of the ideas behind each step, so you can see why every step works and not just what to do. When you are ready to test yourself, 2×2 Linear System ODE Solver Practice gives you a new problem at Easy, Medium or Hard level, checks your answer and shows the full working whenever you get one wrong. Practice Mode for this calculator is available on the Pro plan.
Login and upgrade to Pro to unlock the full step solution.
Example Problems
Click one to load it into the box and solve it.