Skip to main content

Section 3.1 Linear Algebra in a Nutshell

Linear algebra and matrices provide a convenient notation for representing the 2×2 system
dxdt=ax+by,dydt=cx+dy.
If we let
A=(abcd)andx(t)=(x(t)y(t)),
then we can rewrite our system as
(x′(t)y′(t))=(ax(t)+by(t)cx(t)+dy(t))=(abcd)(x(t)y(t)).
In other words, we can write our system as
dxdt=Ax,
x′=dxdt=(x′(t)y′(t)).

Subsection 3.1.1 Matrices and Systems of Linear Equations

A short review of linear algebra and 2×2 matrices is useful at this point. Recall that any system of two equations in two variables,
ax+by=α,cx+dy=β,
can be written as a matrix equation
(3.1.1)(abcd)(xy)=(ax+bycx+dy)=(αβ).
We will denote the 2×2 coefficient matrix by A. That is,
A=(abcd).
If a solution for the system (3.1.1) exists, it is easy to find. A unique solution will occur exactly when the matrix A is invertible (or nonsingular). The unique solution is given by
(xy)=(abcd)−1(αβ),
A−1=1ad−bc(d−b−ca).
The matrix A is invertible if and only if its determinant is nonzero,
det(A)=ad−bc≠0.
If det(A)=0, then we either have no solution or infinitely many solutions.
Let us consider the special case
A(xy)=(00).
If det(A)≠0, we have exactly one solution, x=0 and y=0. On the other hand, if det(A)=0, we have infinitely many solutions. Suppose that a≠0. Then x=−(b/a)y, and
−c(ba)y+dy=0.
Therefore, (ad−bc)y=0. Since det(A)=ad−bc=0, the variable y can assume any value and x=−(b/a)y. Thus, the solutions to our system lie along a line through the origin. In fact, we will always get a line of solutions through the origin as long as at least one entry in our matrix is nonzero.
 1 
We will not worry about the 2×2 zero matrix, since it will not play a role in our study of linear equations.

Subsection 3.1.2 Linear Independence

We say that two vectors x and y in R2 are linearly independent if they do not lie on the same line through the origin. If, on the other hand, they do lie on the same line, then the vectors are linearly dependent. Equivalently, two vectors are linearly dependent if one vector is a multiple of the other. We leave the proof of the following theorem as an exercise.
If we have a pair of linearly independent vectors in R2, then we can write any vector in R2 as a unique linear combination of the two vectors. That is, given two linearly independent vectors x=(x1,x2) and y=(y1,y2), we can write z=(z1,z2) as
(z1z2)=α(x1x2)+β(y1y2),
where α and β are unique. To see why this is true, we must solve the equations
z1=αx1+βy1z2=αx2+βy2
for α and β. However, this system has a unique solution since
det(x1y1x2y2)≠0.
Two vectors are said to be a basis for R2 if we can write any vector in R2 as a linear combination of these two vectors. By our arguments above, any two linearly independent vectors will form a basis for R2.

Example 3.1.2.

The vectors e1=(1,0) and e2=(0,1) form a basis for R2. Indeed, if z=(z1,z2), then we can write
z=z1e1+z2e2.
The vectors e1 and e2 are called the standard basis for R2.

Example 3.1.3.

Let v1=(2,1) and v2=(3,2). Since
det(2312)≠0,
these vectors form a basis for R2. If z=(−5,−4), then we can write
z=2v1−3v2.
We say that the coordinates of z are (2,−3) with respect to the basis {v1,v2}.

Example 3.1.4.

The vectors (1,1) and (−1,−1) do not form a basis for R2 since these two vectors lie along the same line.
If 2×2 matrices and the rest of what we have described above make you nervous, you should work through the exercises at the end of this section.

Subsection 3.1.3 Finding Eigenvalues and Eigenvectors

A nonzero vector v is an eigenvector of A if Av=λv for some λ∈R. The constant λ is called an eigenvalue of A. Letting
A=(abcd)andv=(xy)≠0,
we have Ax=λv or Av−λv=0. In matrix form this is
(abcd)(xy)−λ(xy)=(abcd)(xy)−(λ00λ)(xy)=(a−λbcd−λ)(xy)=(00).
This matrix equation is certainly true if (x,y)=(0,0). However, we seek nonzero solutions to this system. This will occur exactly when the determinant of
A−λI=(a−λbcd−λ)
is zero. In this case
det(A−λI)=det(a−λbcd−λ)=λ2−(a+d)λ+(ad−bc).
We say that
det(A−λI)=λ2−(a+d)λ+(ad−bc)
is the characteristic polynomial of A. We summarize the results of this discussion in the following theorem.

Example 3.1.6.

Suppose that we wish to find the eigenvalues and associated eigenvectors of
A=(1243).
To find the eigenvalues and eigenvectors for A, we must solve the equation
A(xy)=λ(xy).
If we let I denote the 2×2 identity matrix,
I=(1001),
we can rewrite this equation in the form
(3.1.2)(A−λI)(xy)=(00).
We know that A−λI is a 2×2 matrix and that this system will only have nonzero solutions if det(A−λI)=0. In our example,
det(A−λI)=det(1−λ243−λ)=(1−λ)(3−λ)−8=λ2−4λ−5=(λ−5)(λ+1).
Thus, λ=5 or −1.
To see this from a different perspective, we will rewrite equation (3.1.2) as
x+2y=λx4x+3y=λy.
This system is equivalent to
(1−λ)x+2y=04x+(3−λ)y=0
which can be reduced to
(1−λ)x+2y=0(λ2−4λ−5)y=0.
Therefore, either λ=5 or λ=−1 to obtain a nonzero solution.
  • If λ=5, the first equation in the system becomes −2x+y=0, and the eigenvectors corresponding to this eigenvalue are the nonzero solutions of this equation. That is, a vector must be a nonzero multiple of (1,2) to be an eigenvector of A corresponding to λ=5.
  • If λ=−1, then the corresponding eigenvectors are the nonzero multiples of (1,−1).

Subsection 3.1.4 Important Lessons

  • A matrix A is invertible (or nonsingular) if there exists a matrix A−1 such that AA−1=A−1A=I, where I is the identity matrix. In the case of 2×2 matrices,
    I=(1001).
  • If
    A=(abcd),
    then
    A−1=1ad−bc(d−b−ca).
  • A matrix A is invertible if and only if its determinant is nonzero,
    det(A)=ad−bc≠0.
  • We say that two vectors x and y in R2 are linearly independent if they do not lie on the same line through the origin. If, on the other hand, they do lie on the same line, then the vectors are linearly dependent. Equivalently, two vectors are linearly dependent if one vector is a multiple of the other.
  • Let x=(x1,x2) and y=(y1,y2). Then x and y are linearly independent if and only if
    det(x1y1x2y2)≠0.
  • If we have a pair of linearly independent vectors in R2, then we can write any vector in R2 as a unique linear combination of the two vectors. That is, given two linearly independent vectors x=(x1,x2) and y=(y1,y2), we can write z=(z1,z2) as
    (z1z2)=α(x1x2)+β(y1y2),
    where α and β are unique.
  • Two vectors are a basis for R2 if we can write any vector in R2 as a linear combination of these two vectors. Any two linearly independent vectors will form a basis for R2.
  • The roots of the characteristic polynomial, det(A−λI), of a matrix A are the eigenvalues of A. Given a specific eigenvalue, λ, for a matrix A, the eigenvectors associated with A are the nonzero solutions of the system of equations
    (A−λI)(xy)=(00).
  • If v1 and v2 are eigenvectors of two distinct real eigenvalues of a matrix A, then v1 and v2 are linearly independent.

Reading Questions 3.1.5 Reading Questions

Exercises 3.1.6 Exercises

Finding Determinants.

Find the determinant of each of the matrices A in Exercise Group 3.1.6.4–13.

Finding Inverses.

Find the inverse (if it exists) of each of the matrices A in Exercise Group 3.1.6.14–21. that is, find the matrix A−1 such that AA−1=A−1A=I, where
I=(1001).

Finding Eigenvalues and Eigenvectors.

For each of the matrices A in Exercise Group 3.1.6.22–31:
  1. Find the characteristic polynomial of A.
  2. Find all of the eigenvalues of A.
  3. Find an eigenvector for each eigenvalue of A.

32.

For what values of a are the vectors (2,a) and (4,−1) linearly independent?

33.

We define the trace of a 2×2 matrix to be the sum of its diagonal entries. That is, the trace of
A=(abcd)
is tr(A)=a+d. Show that tr(AB)=tr(BA) for any 2×2 matrices A and B.

Subsection 3.1.7 Finding Eigenvalues and Eigenvectors with Sage

Sage can be used to find eigenvalues and eigenvectors for a matrix A for now. Consider the matrix
A=(131−1).
Using Sage, we would enter the matrix A as follows.
We can use the following command to find the eigenvalues of A.
Sage will also allow us to find eigenvectors for each of the eigenvalues of A.
Thus, the matrix A has two eigenvalues: λ1=2 with eigenvector v1=(1,1/3) and λ2=−2 with eigenvector v2=(1,−1).
There is a third entry in the Sage output which refers to the multiplicity of the eigenvalue. In the previous example, the multiplicity is 1. In the matrix
B=(11−13)
in the Sage cell below, we obtain a single repeated eigenvalue λ=2 and only one eigenvector v=(1,1). The multiplicity of this eigenvalue is 2. In our previous examples, we obtained two linearly independent eigenvalues allowing us to solve initial value problems given a general solution.
We may also have matrices such as
C=(41−14)
has complex eigenvalues, λ=4−i and μ=4+i. Eigenvectors for λ and μ are u=(1,−i) and v=(1,i), respectively.
The complex number 4−i is written as 4 - 1*I in Sage.
You have attempted 1 of 4 activities on this page.