Graduate Linear Algebra
Sections 6.1–6.3
Graduate Linear Algebra Assignment 8 – Solutions
Orthogonality, Orthogonal Sets, and Orthogonal Projections
| 15 problems
Sections 6.1–6.3
| 100 points
Reference. David C. Lay, Steven R. Lay, and Judi J. McDonald, Linear Algebra and Its Applications,
Global Edition, 6th ed. (Pearson, 2021). These solutions correspond to the graduate-level strengthened
variants in Assignment 8.
Problem 1
The third row of A is the sum of the first two rows, so it is enough to row-reduce the first two independent
rows. Row reduction gives
1 0 −3 −4
2 .
A ∼ 0 1 1
0 0 0
0
The first two original rows are linearly independent, and the third original row is their sum. Hence one
convenient basis for the row space is
Row A = Span
nh
i h
io
1 2 −1 0 , 0 1 1 2
.
To find the null space, solve
x1 − 3x3 − 4x4 = 0,
x2 + x3 + 2x4 = 0.
Let x3 = s and x4 = t. Then
x2 = −s − 2t,
x1 = 3s + 4t,
so
4
3
−2
−1
x = s + t .
0
1
1
0
Thus
3
4
−1 −2
Nul A = Span , .
1 0
0
1
Now let
r1 = (1, 2, −1, 0),
r2 = (0, 1, 1, 2),
n1 = (3, −1, 1, 0),
n2 = (4, −2, 0, 1).
and
Directly,
r1 · n1 = 3 − 2 − 1 = 0,
r2 · n1 = −1 + 1 = 0,
and
r1 · n2 = 4 − 4 = 0,
r2 · n2 = −2 + 2 = 0.
Page 1 of 12
Graduate Linear Algebra
Sections 6.1–6.3
Therefore every basis vector of Nul A is orthogonal to every basis vector of Row A. By linearity of the dot
product, every vector of Nul A is orthogonal to every vector of Row A. This is exactly the identity
(Row A)⊥ = Nul A.
The dimensions also agree with this conclusion: dim Row A = 2 and dim Nul A = 2 inside R4 .
Problem 2
First check pairwise orthogonality:
u1 · u2 = 1 − 1 = 0,
u1 · u3 = 0,
u2 · u3 = 1 − 1 = 0.
All three vectors are nonzero, so they are linearly independent. Since W is their span, they form an
orthogonal basis for W .
For an orthogonal basis, the projection formula is
projW y =
3
X
y · uj
j=1
Compute the coefficients separately:
and
uj .
uj · uj
4+2
y · u1
= 3,
=
u1 · u1
2
y · u2
4−2+3+1
3
=
= ,
u2 · u2
4
2
y · u3
3−1
=
= 1.
u3 · u3
2
Therefore
3
yb = projW y = 3u1 + u2 + u3
2
9/2
3/2
=
5/2 .
−1/2
The orthogonal remainder is
−1/2
1/2
.
z = y − yb =
1/2
−1/2
We verify that z is orthogonal to the basis of W :
1 1
z · u1 = − + = 0,
2 2
1 1 1 1
z · u2 = − − + + = 0,
2 2 2 2
1 1
z · u3 = − = 0.
2 2
Page 2 of 12
Graduate Linear Algebra
Sections 6.1–6.3
Thus z ∈ W ⊥ , while yb ∈ W by construction. Hence
y = yb + z
is the required orthogonal decomposition.
Problem 3
Let the columns of U be
1
1
u1 = √ 1 ,
2 0
1
1
u2 = √ −1 .
6 2
Their squared lengths are
∥u1 ∥2 =
and
1+1
= 1,
2
∥u2 ∥2 =
1+1+4
= 1,
6
1−1
u1 · u2 = √
= 0.
12
Thus the columns are orthonormal, equivalently U T U = I2 .
Now
2/3 1/3
1/3
P = U U T = 1/3 2/3 −1/3 .
1/3 −1/3 2/3
Therefore
2
yb = P y = 0 ,
2
1
z = y − yb = −1 .
−1
The norms are
∥y∥2 = 32 + (−1)2 + 12 = 11,
∥yb∥2 = 22 + 02 + 22 = 8,
∥z∥2 = 12 + (−1)2 + (−1)2 = 3.
Hence
∥y∥2 = 11 = 8 + 3 = ∥yb∥2 + ∥z∥2 .
This is the Pythagorean identity for the orthogonal vectors yb ∈ Col U and z ∈ (Col U )⊥ .
Problem 4
The vectors u1 and u2 are orthogonal because
u1 · u2 = 1 − 1 = 0.
Moreover,
u1 · u1 = 2,
u2 · u2 = 6.
For yh = (h, 2, 1)T ,
yh · u1 = h + 2,
yh · u2 = h − 2 + 2 = h.
Page 3 of 12
Graduate Linear Algebra
Sections 6.1–6.3
Therefore
projW yh =
h+2
h
u1 + u2
2
6
2h
The residual is
=
3 +1
h
3 +1 .
h
3
h
1
3 −1
h−3
yh − projW yh = 1 − h3 =
−1 .
3
−1
1 − h3
Thus yh ∈ W exactly when the residual is zero, namely
h=3.
The squared distance to W is the squared norm of the residual:
dist(yh , W )2 =
(h − 3)2
(h − 3)2
(1 + 1 + 1) =
.
9
3
Hence
dist(yh , W ) =
Setting this equal to
√
|h − 3|
√ .
3
3 gives |h − 3| = 3, so
h = 0 or
h = 6.
Problem 5
We seek u2 = αa + βb such that u2 · a = 0. Since
a · a = 2,
b · a = 1,
the condition is
(αa + βb) · a = 2α + β = 0.
A convenient choice is α = −1, β = 2, giving
1
u1 = a = 1 ,
0
1
u2 = −a + 2b = −1 .
2
These vectors are nonzero, orthogonal, and both lie in W . Since W is two-dimensional, they form an
orthogonal basis of W .
For y = (2, 3, 4)T ,
y · u1
5
y · u2
2−3+8
7
= ,
=
= .
u1 · u1
2
u2 · u2
6
6
Therefore the closest vector in W is the orthogonal projection
7
5
yb = u1 + u2
2
6
11/3
= 4/3 .
7/3
Page 4 of 12
Graduate Linear Algebra
Sections 6.1–6.3
The error vector is
−5/3
y − yb = 5/3 .
5/3
Hence
s dist(y, W ) = ∥y − yb∥ =
25
3
9
√
5
5 3
= √ =
.
3
3
Problem 6
Using the matrix U from Problem 3,
2/3 1/3
1/3
T
P = U U = 1/3 2/3 −1/3 .
1/3 −1/3 2/3
Therefore
1/3 −1/3 −1/3
1/3 .
Q = I − P = −1/3 1/3
−1/3 1/3
1/3
The matrix P is visibly symmetric, so P T = P . Also, since U T U = I2 ,
P 2 = (U U T )(U U T ) = U (U T U )U T = U I2 U T = U U T = P.
Finally,
P Q = P (I − P ) = P − P 2 = 0.
For y = (3, −1, 1)T ,
2
P y = 0 ,
2
1
Qy = y − P y = −1 .
−1
Because P is the projection matrix onto Col U , we have
P y ∈ Col U.
Also, for each column uj of U ,
uj · Qy = 0,
so
Qy ∈ (Col U )⊥ .
Thus P and Q separate a vector into its components in the subspace and its orthogonal complement.
Problem 7
Write the columns of U as
1
1
u1 = 2 ,
3
−2
2
1
u2 = 1 ,
3
2
Page 5 of 12
2
1
u3 = −2 .
3
−1
Graduate Linear Algebra
Sections 6.1–6.3
Each has squared norm
1+4+4
= 1.
9
The pairwise dot products are
2+2−4
= 0,
9
2−4+2
u1 · u3 =
= 0,
9
u1 · u2 =
and
4−2−2
= 0.
9
Thus U T U = I3 , so the columns are orthonormal. Since U is square,
u2 · u3 =
U −1 = U T .
The equation U x = b therefore gives
x = U T b.
Computing the coordinates by dot products,
−8/3
x = 11/3 .
2/3
Indeed,
∥b∥2 = 22 + (−1)2 + 42 = 21,
while
64 + 121 + 4
189
=
= 21.
9
9
Thus ∥U x∥ = ∥b∥ = ∥x∥ in this case. The general theorem is that a matrix with orthonormal columns
preserves lengths:
∥U x∥ = ∥x∥ for every x.
∥x∥2 =
Algebraically, this follows from
∥U x∥2 = (U x)T (U x) = xT U T U x = xT x = ∥x∥2 .
Problem 8
For a line L = Span{u}, the projection matrix is
P =
uuT
.
uT u
With u = (1, 1, 0)T ,
1 1 0
1
P1 = 1 1 0 .
2
0 0 0
With v = (1, 0, 1)T ,
1 0 1
1
P2 = 0 0 0 .
2
1 0 1
Page 6 of 12
Graduate Linear Algebra
Sections 6.1–6.3
Multiplication gives
1/4 0 1/4
P1 P2 = 1/4 0 1/4 ,
0 0 0
whereas
1/4 1/4 0
0 0 .
P2 P1 = 0
1/4 1/4 0
Therefore P1 P2 ̸= P2 P1 .
Let y = (x1 , x2 , x3 )T . The condition
(P1 P2 − P2 P1 )y = 0
is equivalent, after multiplying by 4, to
0 −1 1 x1
0 1 x2 = 0.
1
−1 −1 0 x3
The independent equations are
−x2 + x3 = 0,
x1 + x3 = 0.
Thus x2 = x3 and x1 = −x3 . Writing x3 = t gives
−1
{y : P1 P2 y = P2 P1 y} = Span 1 .
1
Problem 9
The defining equations of W can be written as orthogonality conditions:
1
1
· x = 0,
1
1
Set
1
1
n1 = ,
1
1
1
−1
· x = 0.
1
−1
1
−1
n2 = .
1
−1
Then n1 , n2 ∈ W ⊥ . They are orthogonal because
n1 · n2 = 1 − 1 + 1 − 1 = 0.
They are nonzero and independent, and the two independent equations defining W give dim W = 2, hence
dim W ⊥ = 2. Therefore
{n1 , n2 } is an orthogonal basis for W ⊥ .
For y = (3, 1, −2, 4)T ,
y · n1 = 6,
y · n2 = 3 − 1 − 2 − 4 = −4,
Page 7 of 12
Graduate Linear Algebra
Sections 6.1–6.3
and
n1 · n1 = n2 · n2 = 4.
Hence
6
4
projW ⊥ y = n1 − n2
4
4
1/2
5/2
=
.
1/2
5/2
Therefore
5/2
−3/2
.
projW y = y − projW ⊥ y =
−5/2
3/2
The distance from y to W is the length of the orthogonal component:
dist(y, W ) = ∥projW ⊥ y∥
r
1 25 1 25
+
+ +
4
4
4
4
√
= 13 .
=
Problem 10
The two spanning vectors of W are orthogonal:
1
1
1 · −1 = 0.
2
0
A vector orthogonal to both is
1
n = −1 ,
−1
so
W ⊥ = Span{n}.
Also,
1
2
1
p = 0 = 1 + −1 ∈ W.
2
0
2
If projW y = p, then by the orthogonal decomposition theorem
y =p+z
for some z ∈ W ⊥ . Thus z = tn for some real t. The distance condition becomes
√
2 = dist(y, W ) = ∥z∥ = |t|∥n∥ = |t| 3.
Page 8 of 12
Graduate Linear Algebra
Sections 6.1–6.3
Hence
√
2
2 3
t = ±√ = ±
.
3
3
Therefore the complete set of solutions is
√
2
1
2 3
y = 0 ±
−1 .
3
2
−1
There are no other possibilities because every vector with projection p must differ from p by a vector in
W ⊥ , and W ⊥ is the one-dimensional space spanned by n.
Problem 11
Suppose
c1 u1 + · · · + cp up = 0.
Fix an index k. Taking the dot product with uk gives
c1 (u1 · uk ) + · · · + ck (uk · uk ) + · · · + cp (up · uk ) = 0.
Because the set is orthogonal, every term except the kth vanishes. Thus
ck (uk · uk ) = 0.
Since uk ̸= 0, we have uk · uk = ∥uk ∥2 > 0, hence ck = 0. This is true for every k, so all coefficients are
zero. Therefore S is linearly independent.
Now let y ∈ W . Since S is a basis for W , write
y = c1 u1 + · · · + cp up .
Taking the dot product with uk gives
y · uk = ck (uk · uk ),
so
ck =
y · uk
.
uk · uk
Therefore
y=
p
X
y · uj
j=1
uj · uj
uj .
Because the vectors in this sum are mutually orthogonal, the Pythagorean theorem extends to the whole
sum:
2
p
X
y · uj
2
∥y∥ =
uj .
uj · uj
j=1
For the jth term,
y · uj
uj
uj · uj
2
=
(y · uj )2
(y · uj )2
(u
·
u
)
=
.
j
j
(uj · uj )2
uj · uj
Hence
∥y∥2 =
p
X
(y · uj )2
j=1
uj · uj
Page 9 of 12
.
Graduate Linear Algebra
Sections 6.1–6.3
Problem 12
T . For x ∈ Rn ,
Let the rows of A be r1T , . . . , rm
Ax = 0
means precisely that every row equation is zero:
ri · x = 0
(i = 1, . . . , m).
Thus x ∈ Nul A if and only if x is orthogonal to every row of A. A vector is orthogonal to every row if and
only if it is orthogonal to every linear combination of the rows, that is, to every vector in Row A. Therefore
(Row A)⊥ = Nul A.
Now let the columns of A be a1 , . . . , an ∈ Rm . A vector y ∈ Rm belongs to Nul AT exactly when
AT y = 0.
The entries of AT y are
a1 · y, . . . , an · y.
Thus AT y = 0 if and only if y is orthogonal to every column of A, equivalently to every vector in Col A.
Hence
(Col A)⊥ = Nul AT .
Finally assume A is n × n. If Row A = Rn , then
Nul A = (Row A)⊥ = (Rn )⊥ = {0}.
Conversely, if Nul A = {0}, then
(Row A)⊥ = {0}.
A proper subspace of Rn has a nonzero vector orthogonal to it; equivalently, by the orthogonal decomposition
theorem, the only subspace whose orthogonal complement is {0} is Rn . Hence
Row A = Rn .
Therefore
Nul A = {0} ⇐⇒ Row A = Rn .
Problem 13
For each y ∈ Rn , the orthogonal decomposition theorem gives a unique representation
w ∈ W,
y = w + z,
z ∈ W ⊥.
By definition, PW (y) = w.
Take y1 = w1 + z1 and y2 = w2 + z2 with wi ∈ W and zi ∈ W ⊥ . For scalars a, b,
ay1 + by2 = (aw1 + bw2 ) + (az1 + bz2 ).
Since W and W ⊥ are subspaces,
aw1 + bw2 ∈ W,
az1 + bz2 ∈ W ⊥ .
Page 10 of 12
Graduate Linear Algebra
Sections 6.1–6.3
By uniqueness of orthogonal decomposition,
PW (ay1 + by2 ) = aw1 + bw2 = aPW (y1 ) + bPW (y2 ).
Thus PW is linear.
If PW y = w, then w ∈ W . The orthogonal decomposition of w is
w = w + 0,
so
PW (PW y) = PW (w) = w = PW y.
Thus the projection is idempotent.
For the range, every output PW y lies in W , so
Range PW ⊆ W.
Conversely, if w ∈ W , then PW w = w, so every w ∈ W lies in the range. Hence
Range PW = W.
For the kernel, PW y = 0 exactly when the W -component of y is zero. By uniqueness of orthogonal
decomposition, this happens exactly when y ∈ W ⊥ . Therefore
Ker PW = W ⊥ .
Problem 14
Write the orthonormal columns of U as u1 , . . . , up . Then
u1 · y
..
T
U y = . .
up · y
Therefore
T
UU y =
p
X
(y · uj )uj .
j=1
Because the uj form an orthonormal basis for W = Col U , the orthogonal projection formula gives
U U T y = projW y.
Thus P = U U T is the standard matrix of the projection onto W .
Next,
P T = (U U T )T = U U T = P,
so P is symmetric. Also,
P 2 = U U T U U T = U (U T U )U T = U Ip U T = U U T = P,
because U T U = Ip .
Write the orthogonal decomposition
y = P y + (I − P )y.
Page 11 of 12
Graduate Linear Algebra
Sections 6.1–6.3
The two terms are orthogonal. Hence
∥y∥2 = ∥P y∥2 + ∥(I − P )y∥2 ≥ ∥P y∥2 .
Taking nonnegative square roots gives
∥P y∥ ≤ ∥y∥.
Equality holds exactly when
∥(I − P )y∥ = 0,
that is, when (I − P )y = 0, or equivalently P y = y. This occurs exactly when y ∈ W . Hence
∥P y∥ = ∥y∥ ⇐⇒ y ∈ W.
Finally, suppose V also has orthonormal columns spanning the same subspace W . For every y,
U U T y = projW y = V V T y.
Thus the two matrices define the same linear transformation on every vector in Rn . Therefore their
standard matrices are equal:
UUT = V V T .
This also shows that the projection matrix depends only on the subspace, not on the particular orthonormal
basis chosen for it.
Problem 15
Because v ∈ W and yb ∈ W , their difference
yb − v
belongs to W . Since z = y − yb ∈ W ⊥ , we have
z · (yb − v) = 0.
Now
y − v = (y − yb) + (yb − v) = z + (yb − v).
This is a sum of two orthogonal vectors, so the Pythagorean theorem gives
∥y − v∥2 = ∥z∥2 + ∥yb − v∥2 .
Since z = y − yb,
∥y − v∥2 = ∥y − yb∥2 + ∥yb − v∥2 .
The second term on the right is always nonnegative. Therefore
∥y − v∥2 ≥ ∥y − yb∥2 ,
and hence
∥y − v∥ ≥ ∥y − yb∥.
Equality occurs exactly when
∥yb − v∥2 = 0,
which is equivalent to v = yb. Thus yb is not merely a closest vector: it is the unique closest vector in W to
y.
Consequently,
dist(y, W ) = ∥y − yb∥.
This proves the Best Approximation Theorem directly from orthogonal decomposition and the Pythagorean
theorem.
Page 12 of 12