You are on page 1of 18

Solutions to Linear Algebra Practice Problems

1. Find all solutions to the following systems of linear equations.


(a)
x
1
2x
2
+ 2x
3
= 5
x
1
x
2
= 1
x
1
+ x
2
+ x
3
= 5
(b)
x
1
+ x
2
+ 3x
3
= 3
x
1
+ x
2
+ x
3
= 1
2x
1
+ 3x
2
+ 8x
3
= 4
Answer:
(a) We create the augmented matrix and row reduce:
_
_
1 2 2 5
1 1 0 1
1 1 1 5
_
_

_
_
1 0 0 1
0 1 0 2
0 0 1 4
_
_
Thus, the solutions are x
1
= 1, x
2
= 2, x
3
= 4
(b) We create the augmented matrix and row reduce:
_
_
1 1 3 3
1 1 1 1
2 3 8 4
_
_

_
_
1 1 3 3
0 1 2 1
0 0 0 3
_
_
This system is inconsistent. There are no solutions.
1
2. Find a basis for the solutions to the following system of linear equations:
x
1
+ 2x
2
x
3
+ x
4
= 0
x
1
2x
2
+ 3x
3
+ 5x
4
= 0
x
1
2x
2
x
3
7x
4
= 0
Answer: We create the augmented matrix and row reduce:
_
_
1 2 1 1 0
1 2 3 5 0
1 2 1 7 0
_
_

_
_
1 2 0 4 0
0 0 1 3 0
0 0 0 0 0
_
_
Changing back to equations, we have
x
1
= 2x
2
4x
4
x
3
= 3x
4
If we set s = x
2
and t = x
4
, then we have:
_

_
x
1
x
2
x
3
x
4
_

_
= s
_

_
2
1
0
0
_

_
+ t
_

_
4
0
3
1
_

_
Thus, a basis for the subspace is
_

_
_

_
2
1
0
0
_

_
,
_

_
4
0
3
1
_

_
_

_
Note: This answer is not unique. Any two linearly independent vectors
which are in the subspace form a basis for the subspace.
2
3. Consider the following subspace of R
4
:
S = Span
_
_
_
_
_

_
1
2
1
3
_

_
,
_

_
3
6
3
9
_

_
,
_

_
1
3
5
4
_

_
,
_

_
2
3
2
5
_

_
_
_
_
_
Find a basis for S.
Answer: There are two methods.
Method 1: We place the vectors as columns of a matrix and row
reduce:
_

_
1 3 1 2
2 6 3 3
1 3 5 2
3 9 4 5
_

_
1 3 1 2
0 0 1 1
0 0 0 0
0 0 0 0
_

_
Row reductions do not change the dependencies among the columns of
a matrix. Since columns 1 and 3 are linearly independent in the row
reduced matrix, they were linearly independent in the original matrix.
Also, columns 2 and 4 are linearly dependent with columns 1 and 3 in
both the row reduced matrix and the original matrix. Thus, columns
1 and 3 of the original matrix form a basis for the subspace. Thus, a
basis for the subspace is
_

_
_

_
1
2
1
3
_

_
,
_

_
1
3
5
4
_

_
_

_
Method 2: We place the vectors as rows of a matrix and row reduce:
_

_
1 2 1 3
3 6 3 9
1 3 5 4
2 3 2 5
_

_
1 2 1 3
0 1 4 1
0 0 0 0
0 0 0 0
_

_
The nonzero rows of the row reduced matrix form a basis for the sub-
space. Thus, a basis for the subspace is
_

_
_

_
1
2
1
3
_

_
,
_

_
0
1
4
1
_

_
_

_
.
3
Note: These answers are not unique. Any two linearly independent
vectors which are in S form a basis for S.
4. Consider the planes x
1
+x
2
+3x
3
= 4 and x
1
+2x
2
+4x
3
= 5 in R
3
. Find
parametric equations for the line of intersection of these two planes.
Answer: We create the augmented matrix and row reduce:
_
1 1 3 4
1 2 4 5
_

_
1 0 2 3
0 1 1 1
_
Changing back to equation form, we have
x
1
= 3 2x
3
x
2
= 1 x
3
If we let x
3
= t, we can write the parametric equations for the line:
x
1
= 3 2t
x
2
= 1 t
x
3
= t
5. Determine whether the following matrices are invertible. If the matrix
is invertible, compute the inverse.
(a) A
1
=
_
3 4
1 2
_
(b) A
2
=
_
_
1 3 1
2 5 2
4 7 4
_
_
(c) A
3
=
_
_
1 0 4
1 1 1
1 0 3
_
_
Answer: For each of these matrices, we will rst compute the determi-
nant to quickly see whether the matrix is invertible. If the determinant
is nonzero, then the matrix is invertible, and we will then compute the
inverse.
4
(a) The determinant of this matrix is 6 4 = 2 = 0, so the matrix is
invertible. The inverse is
A
1
1
=
1
2
_
2 4
1 3
_
=
_
1 2
1/2 3/2
_
(b) The rst and third columns of this matrix are identical, so the
determinant is 0, so the matrix is not invertible
(c) We compute the determinant by expanding along the middle col-
umn:

1 0 4
1 1 1
1 0 3

1 4
1 3

= 1
Since the determinant is nonzero, the matrix is invertible. To
compute the inverse, we augment the matrix with the identity
matrix and then row reduce:
_
_
1 0 4 1 0 0
1 1 1 0 1 0
1 0 3 0 0 1
_
_

_
_
1 0 0 3 0 4
0 1 0 2 1 3
0 0 1 1 0 1
_
_
Thus, the inverse is
_
_
3 0 4
2 1 3
1 0 1
_
_
6. Compute the following determinants:
(a)

2 3
4 5

(b)

2 3 1
3 0 1
3 1 2

5
(c)

1 2 3 4
1 4 5 8
1 1 2 3
1 3 5 8

(d)

0 0 0 3 0
2 0 0 2 0
8 1 0 7 2
1 2 2 3 2
2 2 3 6 4

Answer:
(a)

2 3
4 5

= 10 12 = 2
(b) Expanding along the middle row:

2 3 1
3 0 1
3 1 2

= 3

3 1
1 2

2 3
3 1

= 3(5) (7) = 8
(c) We use row reduction to compute this determinant:

1 2 3 4
1 4 5 8
1 1 2 3
1 3 5 8

row 1
row 1
row 1

1 2 3 4
0 2 2 4
0 1 1 1
0 1 2 4

1
2
2

1 2 3 4
0 1 1 2
0 1 1 1
0 1 2 4

+row 2
row 2
2

1 2 3 4
0 1 1 2
0 0 0 1
0 0 1 2

1 2 3 4
0 1 1 2
0 0 1 2
0 0 0 1

= 2
6
(d) We use cofactor expansion to compute this determinant:

0 0 0 3 0
2 0 0 2 0
8 1 0 7 2
1 2 2 3 2
2 2 3 6 4

= 3

2 0 0 0
8 1 0 2
1 2 2 2
2 2 3 4

= 3(2)

1 0 2
2 2 2
2 3 4

= 3(2)(1)

2 2
3 4

3(2)(2)

2 2
2 3

= 6(2) + 12(2) = 12
7. Let A be the following matrix:
A =
_
_
1 1 1
1 2 t
1 4 t
2
_
_
(a) Compute the determinant of A. (Your answer will be in terms of t.)
(b) For what values of t is A invertible?
Answer:
(a) We compute the determinant:

1 1 1
1 2 t
1 4 t
2

2 t
4 t
2

1 t
1 t
2

1 2
1 4

= (2t
2
4t) (t
2
t) + 2
= t
2
3t + 2
(b) A is invertible when t
2
3t+2 = 0. Since t
2
3t+2 = (t2)(t1),
A is invertible for t = 2, t = 1
7
8. Let V be the vector space consisting of all functions of the form
e
2x
cos x + e
2x
sin x
Consider the following linear transformation L : V V :
L(f) = f

+ f
(a) Find the matrix representing L with respect to the basis {e
2x
cos x, e
2x
sin x}.
(b) Use your answer from part (a) to nd one solution to the following
dierential equation:
y

+ y = e
2x
cos x
Answer:
(a) We apply L to both e
2x
cos x and e
2x
sin x:
L(e
2x
cos x) = 2e
2x
cos xe
2x
sin x+e
2x
cos x = 3e
2x
cos xe
2x
sin x
L(e
2x
sin x) = 2e
2x
sin x+e
2x
cos x+e
2x
sin x = e
2x
cos x+3e
2x
sin x
The rst corresponds to the vector
_
3
1
_
with respect to the
given basis, and the second corresponds to the vector
_
1
3
_
with
respect to the given basis. These vectors are columns of the matrix
representing L. Thus, the matrix representing L with respect to
the given basis is
_
3 1
1 3
_
(b) To nd one solution to the dierential equation, we simply need
to solve the following matrix equation:
_
3 1
1 3
_
x =
_
1
0
_
Solving this matrix equation, we get x =
_
0.3
0.1
_
. Thus, one solu-
tion to the dierential equation is y = 0.3e
2x
cos x + 0.1e
2x
sin x
Note: Initially, this problem incorrectly asked you to solve the
dierential equation. The problem should have just asked to nd
one solution. You do not need to be able to nd all solutions to
the dierential equation.
8
9. Consider the following basis for R
2
:
E =
__
1
2
_
,
_
3
5
__
(a) Find the coordinates for the vector
_
2
4
_
in terms of the basis E.
(b) Let L : R
2
R
2
be the following linear transformation:
L(x, y) = (2x y, 3x 2y)
Find the matrix representing L with respect to the basis E.
Answer:
(a) We need to nd numbers c
1
and c
2
such that
c
1
_
1
2
_
+ c
2
_
3
5
_
=
_
2
4
_
Thus, we need to solve the following system of linear equations:
c
1
+ 3c
2
= 2
2c
1
+ 5c
2
= 4
Solving, we get c
1
= 22 and c
2
= 8. Thus, the coordinates in
terms of basis E are
_
22
8
_
(b) First, we apply L to each of the basis vectors:
L
__
1
2
__
=
_
0
1
_
L
__
3
5
__
=
_
1
1
_
Then, we nd the coordinates for each of the resulting vectors in
terms of the basis E. First, we compute the transition matrix to
change from the standard basis to the basis E:
_
1 3
2 5
_
1
=
_
5 3
2 1
_
9
Now, we simply multiply the vectors by this transition matrix.
(Note that we could have used this transition matrix in part (a)).
_
5 3
2 1
_ _
0
1
_
=
_
3
1
_
_
5 3
2 1
_ _
1
1
_
=
_
8
3
_
Thus, the matrix representing L with respect to the basis E is
_
3 8
1 3
_
10. Find the eigenvalues and eigenvectors of the following matrices:
(a) A
1
=
_
3 5
2 3
_
(b) A
2
=
_
_
4 4 2
2 2 2
0 0 1
_
_
Answer:
(a)
det(A
1
I) =

3 5
2 3

=
2
+ 1
Thus, the eigenvalues are = i, i. We can nd the eigenvectors
corresponding to = i:
A iI =
_
3 i 5
2 3 i
_

_
3 i 5
0 0
_
Thus,
_
5
3 i
_
is an eigenvector corresponding to = i (and any
multiple is also an eigenvector).
10
The eigenvector for = i is the complex conjugate. Thus, an
eigenvector corresponding to = i is
_
5
3 + i
_
(and any multi-
ple is also an eigenvector).
Thus, the eigenvalues and eigenvectors are = i,
_
5
3 i
_
and
= i,
_
5
3 + i
_
(b)
det(A
2
I) =

4 4 2
2 2 2
0 0 1

= (1 )

4 4
2 2

= (1 ) ((4 )(2 ) + 8)
= (1 )(2 +
2
) = (1 )(2 + )
Thus, the eigenvalues are = 0, 1, 2.
Now, we nd the eigenvalue corresponding to = 0:
A 0I =
_
_
4 4 2
2 2 2
0 0 1
_
_

_
_
1 1 0
0 0 1
0 0 0
_
_
Thus, an eigenvector corresponding to = 0 is
_
_
1
1
0
_
_
. Any multiple
of this vector is also an eigenvector.
Now, we nd the eigenvalue corresponding to = 1:
A I =
_
_
3 4 2
2 3 2
0 0 0
_
_
=
_
_
1 0 2
0 1 2
0 0 0
_
_
11
Thus, an eigenvector corresponding to = 1 is
_
_
2
2
1
_
_
. Any multiple
of this vector is also an eigenvector.
Now, we nd the eigenvalue corresponding to = 2:
A 2I =
_
_
2 4 2
2 4 2
0 0 1
_
_

_
_
1 2 0
0 0 1
0 0 0
_
_
Thus, an eigenvector corresponding to = 2 is
_
_
2
1
0
_
_
. Any multiple
of this vector is also an eigenvector.
Thus, the eigenvalues and eigenvectors are = 0,
_
_
1
1
0
_
_
, = 1,
_
_
2
2
1
_
_
,
and = 2,
_
_
2
1
0
_
_
11. Consider the following matrix:
A =
_
6 4
6 4
_
Find a general formula for the entries of A
n
. (Hint: Diagonalize A.)
Answer: The trace of A is 2 and the determinant is 0. This means that
the sum of the eigenvalues is 2, and the product is 0, so the eigenvalues
must be = 0, 2.
We nd the eigenvector corresponding to = 0:
A 0I =
_
6 4
6 4
_

_
3 2
0 0
_
Thus, an eigenvector corresponding to = 0 is
_
2
3
_
. Any multiple
of this vector is also an eigenvector.
12
We nd the eigenvector corresponding to = 2:
A 2I =
_
4 4
6 6
_

_
1 1
0 0
_
Thus, an eigenvector corresponding to = 0 is
_
1
1
_
. Any multiple
of this vector is also an eigenvector.
Thus:
A =
_
2 1
3 1
_ _
0 0
0 2
_ _
2 1
3 1
_
1
=
_
2 1
3 1
_ _
0 0
0 2
_ _
1 1
3 2
_
Now, we can compute powers of A:
A
n
=
_
2 1
3 1
_ _
0 0
0 2
n
_ _
1 1
3 2
_
=
_
3 (2
n
) 2
n+1
3 (2
n
) 2
n+1
_
12. (a) Find all solutions to the following system of dierential equations:
y

1
= 5y
1
+ 3y
2
y

2
= 4y
1
+ 2y
2
(b) Use your computations from part (a) to nd all solutions to the
following system of dierential equations:
y

1
= 5y
1
+ 3y
2
y

2
= 4y
1
+ 2y
2
Answer:
13
(a) We can express this as a matrix equation:
_
y
1
y
2
_

=
_
5 3
4 2
_ _
y
1
y
2
_
We need to nd the eigenvalues and eigenvectors of the matrix.
Since the trace is -3 and the determinant is 2, the sum of the
eigenvalues is -3 and the product of the eigenvalues is 2. Thus,
the eigenvalues are = 2, 1.
Now, we nd the eigenvector corresponding to eigenvalue = 2:
A + 2I =
_
3 3
4 4
_

_
1 1
0 0
_
Thus an eigenvalue corresponding to = 2 is
_
1
1
_
.
Now, we nd the eigenvector corresponding to eigenvalue = 1:
A + I =
_
4 3
4 3
_

_
4 3
0 0
_
Thus an eigenvalue corresponding to = 1 is
_
3
4
_
.
Thus, in the basis of eigenvectors the dierential equation be-
comes:
_
u
1
u
2
_

=
_
2 0
0 1
_ _
u
1
u
2
_
This has solutions u
1
= Ae
2t
and u
2
= Be
t
. Thus:
_
y
1
y
2
_
= u
1
_
1
1
_
+ u
2
_
3
4
_
= Ae
2t
_
1
1
_
+ Be
t
_
3
4
_
y
1
= Ae
2t
+ 3Be
t
y
2
= Ae
2t
+ 4Be
t
(b) We can express this as a matrix equation:
_
y
1
y
2
_

=
_
5 3
4 2
_ _
y
1
y
2
_
14
We can use the eigenvalues and eigenvectors computed in part (a).
In the basis of eigenvectors, the dierential equation becomes:
_
u
1
u
2
_

=
_
2 0
0 1
_ _
u
1
u
2
_
So, we have the dierential equations u

1
= 2u
1
and u

2
= u
1
.
This has solutions
u
1
= Acos(

2t) + Bsin(

2t)
u
2
= C cos t + Dsin t
Thus:
_
y
1
y
2
_
= u
1
_
1
1
_
+ u
2
_
3
4
_
=
_
Acos(

2t) + Bsin(

2t)
_
_
1
1
_
+ (C cos t + Dsin t)
_
3
4
_
y
1
= Acos(

2t) + Bsin(

2t) + 3C cos t + 3Dsin t


y
2
= Acos(

2t) + Bsin(

2t) + 4C cos t + 3Dsin t


Note: Your answer may look dierent if you used a multiple of
the eigenvectors.
15
13. Consider the vector space C[0, 1] with the following inner product:
f, g =
_
1
1
f(x)g(x) dx
Let S be the following subspace:
S = Span
_
1, x, x
2
_
Find an orthonormal basis for S.
Answer: We use the Gram-Schmidt process:
Make the rst vector a unit vector:
1 =
_
1, 1 =

_
1
1
(1)(1) dx =

2
So,
1

2
is a unit vector.
Make the second vector orthogonal to the rst:
_
1

2
, x
_
=
_
1
1
_
1

2
_
(x) dx = 0
Thus, the second vector is already orthogonal to the rst.
Make the second vector a unit vector:
x =
_
x, x =

_
1
1
(x)(x) dx =
_
2
3
Thus,
_
3
2
x is a unit vector.
Make the third vector orthogonal to the rst:
_
1

2
, x
2
_
=
_
1
1
_
1

2
_
(x
2
) dx =

2
3
Thus, x
2

2
3
__
1

2
_
= x
2

1
3
is orthogonal to the rst vector.
This is now the new third vector.
Make the third vector orthogonal to the second:
_
_
3
2
x, x
2

1
3
_
=
_
1
1
_
3
2
x
__
x
2

1
3
_
dx = 0
Thus, the third vector is already orthogonal to the second vector.
16
Make the third vector a unit vector:
_
_
_
_
x
2

1
3
_
_
_
_
=

_
1
1
_
x
2

1
3
__
x
2

1
3
_
dx =
2

2
3

5
thus,
3

5
2

2
_
x
2

1
3
_
is a unit vector.
Thus, the orthonormal basis is
_
1

2
,
_
3
2
x,
3

5
2

2
_
x
2

1
3
_
_
14. Find the Fourier series on the interval [, ] for the following function:
f(x) =
_
0 if < x < 0
1 if 0 < x <
Answer: We compute the coecients of the Fourier series:
a =
_
1

2
, f(x)
_
=
1

f(x)

2
dx
=
1

_

0
1

2
dx =
1

2
b
n
= cos(nx), f(x) =
1

cos(nx)f(x) dx
=
1

_

0
cos(nx) dx =
1

_
1
n
sin(nx)
_

0
= 0
17
c
n
= sin(nx), f(x) =
1

sin(nx)f(x) dx
=
1

_

0
sin(nx) dx =
1

_
1
n
cos(nx)
_

0
=
1

_
1
n
cos(n) +
1
n
cos(0)
_
=
_

_
0 n even
2
n
n odd
Thus, we get the Fourier series:
f(x) =
1
2
+
2

sin x +
2
3
sin(3x) +
2
5
sin(5x) +
2
7
sin(7x) + . . .
15. Compute the following integral:
_

(3 + 2 sin x + 3 cos x) (1 + 4 sin x) dx


Answer: Recall that 1, sin x, and cos x are orthogonal on [, ].
Thus:
_

(3 + 2 sin x + 3 cos x) (1 + 4 sin x) dx =


_

3 dx +
_

8 sin
2
xdx
= 3(2) + 8 = 14
18

You might also like