Sec 5.1, No 1: Find the angle between the vectors v and w in each of the following:
(a) v = (2, 1, 3)
T
, w = (6, 3, 9)
T
Solution: We use the result
cos =
v
T
w
v w
=
2(6) + 1(3) + 3(9)
2
2
+ 1
2
+ 3
2
6
2
+ 3
2
+ 9
2
=
42
14(3
14)
= 1
and so the angle is zero. Indeed, we now observe that w =3v, so the two vectors are parallel to
each other.
(c) v = (4, 1)
T
, w = (3, 2)
T
Solution: We use the result
cos =
v
T
w
v w
=
4(3) + 1(2)
4
2
+ 1
2
3
2
+ 2
2
=
14
17
13
= .94174
and so the angle is arccos(.94174) = .34303 radians, or .34303
180
= 19.654 degrees.
(d) v = (2, 3, 1)
T
, w = (1, 2, 4)
T
Solution: We use the result
cos =
v
T
w
v w
=
2(1) + 3(2) + 1(4)
(2)
2
+ 3
2
+ 1
2
1
2
+ 2
2
+ 4
2
=
8
14
21
= .46657
and so the angle is arccos(.46657) = 1.0854 radians, or 1.0854
180
= 62.189 degrees.
Sec 5.1, No 3: For each of the following pairs of vectors x and y , nd the projection p of x
onto y and verify that p and x p are orthogonal:
(a) x = (3, 4)
T
, y = (1, 0)
T
Solution: In this question the projection is
p =
x
T
y
y
T
y
y =
3(1) + 4(0)
1
2
+ 0
2
(1, 0)
T
= (3, 0)
T
Then
p
T
(x p) = (3, 0)
3 3
4 0
= (3, 0)
0
4
= 0
and so p and x p are orthogonal.
(d) x = (2, 5, 4)
T
, y = (1, 2, 1)
T
Solution: In this question the projection is
p =
x
T
y
y
T
y
y =
2(1) 5(2) + 4(1)
1
2
+ 2
2
+ (1)
2
(1, 2, 1)
T
=
12
6
(1, 2, 1)
T
= (2, 4, 2)
T
Then
p
T
(x p) = (2, 4, 2)
2 (2)
5 (4)
4 2
= (2, 4, 2)
4
1
2
= 0
and so p and x p are orthogonal.
Sec 5.2, No 1: For each of the following matrices A, determine a basis for each of the subspaces
R(A
T
), N(A), R(A), and N(A
T
):
(b)
A =
1 3 1
2 4 0
1 3 1
2 4 0
GE
1 0 2
0 1 1
(2, 1, 1)
T
1 2
3 4
1 0
GE
1 0
0 1
0 0
4 2
1 3
2 1
3 4
4 2
1 3
2 1
3 4
GE
1 0
0 1
0 0
0 0
and so z = 0 is the only vector in the null space of A. Therefore the null space has no basis in this
case. R(A
T
) is the orthogonal complement of this null space and so is all of R
2
. A basis would be
{e
1
, e
2
} = {(1, 0)
T
, (0, 1)
T
}.
Now consider in the same way the null space of A
T
:
A
T
=
4 1 2 3
2 3 1 4
GE
1 0
5
14
5
14
0 1
4
7
11
7
5
14
t
5
14
s
4
7
t
11
7
s
t
s
= t
5
14
4
7
1
0
+ s
5
14
11
7
0
1
(
5
14
,
4
7
, 1, 0)
T
, (
5
14
,
11
7
, 0, 1)
T
x
1
x
2
x
3
y
1
y
2
y
3
Show that S
= N(A).
Solution: A vector z is in S
x
T
y
T
z =
x
T
z
y
T
z
0
0
that is, if x
T
z = 0 and y
T
z = 0. Therefore S
= N(A).
Sec 5.2, No 3 (b): Find the orthogonal complement of the subspace of R
3
spanned by (1, 2, 1)
T
and (1, 1, 2)
T
.
Solution: Here we apply the result in part (a): by Gaussian Elimination
A =
1 2 1
1 1 2
GE
1 0
5
3
0 1
1
3
and so z is in S
when z
1
+
5
3
t = 0, z
2
1
3
t = 0, z
3
= t. Thus z has the form z = t(
5
3
,
1
3
, 1)
T
, and
therefore
S
= N(A) = Span
(
5
3
,
1
3
, 1)
T
Sec 5.3, No 1 (c): Find the least squares solution of the following system:
x
1
+ x
2
+ x
3
= 4
x
1
+ x
2
+ x
3
= 0
x
2
+ x
3
= 1
x
1
+ x
3
= 2
Solution: The vector x that we want in this case is x = (A
T
A)
1
A
T
b where A is the coecient
matrix and b is the vector of right-hand-sides. Thus
A
T
A =
1 1 1
1 1 1
0 1 1
1 0 1
1 1 1
1 1 1
0 1 1
1 0 1
3 0 1
0 3 1
1 1 4
(A
T
A)
1
=
3 0 1
0 3 1
1 1 4
1
=
11
30
1
30
1
10
1
30
11
30
1
10
1
10
1
10
3
10
x = (A
T
A)
1
A
T
b =
11
30
1
30
1
10
1
30
11
30
1
10
1
10
1
10
3
10
1 1 1
1 1 1
0 1 1
1 0 1
4
0
1
2
8
5
3
5
6
5
1 1 1
1 1 1
0 1 1
1 0 1
8
5
3
5
6
5
17
5
1
5
3
5
14
5
4
0
1
2
17
5
1
5
3
5
14
5
3
5
1
5
2
5
4
5
1 1 1
1 1 1
0 1 1
1 0 1
3
5
1
5
2
5
4
5
1 1 0 1
1 1 1 0
1 1 1 1
3
5
1
5
2
5
4
5
0
0
0
Sec 5.3, No 5 (a): Find the best least squares t by a linear function to the data
x 1 0 1 2
y 0 1 3 9
Solution: For a linear t y = c
1
+ c
2
x we need to solve Ac = y where
A =
1 1
1 0
1 1
1 2
, c =
c
1
c
2
, y =
0
1
3
9
Of course, this system does not (generally) have a solution and so we use the least squares solution.
The normal equations are
A
T
Ac = A
T
y
1 1
1 0
1 1
1 2
1 1
1 0
1 1
1 2
c =
1 1
1 0
1 1
1 2
0
1
3
9
4 2
2 6
c =
13
21
c =
4 2
2 6
13
21
9
5
29
10