Linear Algebra. Degrees in Engineering.
Solved problems.
Chapters 1 & 2.
Questions
Q1.-Is the following statement true or false? Justify your answer by citing appropriate facts or theorems if true or, if false, explain why or give a counterexample:
If a set is linearly dependent, then the set contains more vectors that there are entries in the vectors.
Answer:It is false. The set
S = 1 0 0 , 2 0 0
is dependent (the second vector is two times the first one) and has only two R3 vectors.
Q2.-If A, B and C are n × n invertible matrices, does the equation C−1(A + X)B−1
= In have
a solution? (In is the n × n identity matrix). If so, find it.
Answer: Multiplying by C on the left and by B on the right we get A + X = CB, from where we find X = CB − A.
Q3.-Is the following statement true or false? Justify your answer by citing appropriate facts or theorems if true or, if false, explain why or give a counterexample:
If a set contains fewer vectors that there are entries in the vectors, then the set is linearly independent.
Answer:It is false. The set
S = 1 0 0 , 2 0 0
has two R3 vectors and is dependent (the second vector is two times the first one).
Q4.- Suppose A and B are n × n matrices, B is invertible, and AB is invertible. Show that A is invertible.
Answer:Let us call C = AB. By hypothesis, B is invertible, and we can multiply by both sides of the previous equation by B−1. We thus obtain CB−1 = A. Therefore, A is the product of two
invertible matrices and hence it is itself invertible.
Q5.-Let B, C and D be matrices. If BC = BD, then C = D.
Answer:False. If B is not invertible, it can not be taken out of the equation.
Q6.- If A is a 3 × 3 matrix and the equation Ax = (1 0 0)T has a unique solution, then A is invertible.
Answer:True. For the system to have a unique solution, A must have 3 pivots and, being 3 × 3 it is henceforth invertible.
Problems P1.-Let T : R3 −→ R2, given by T x1 x2 x3 = x1− 5x2+ 4x3 x2− 6x3
Show that T is a linear transformation by finding a matrix that implements it and discuss whether T is onto, one-to-one, both or none of them.
Answer:To find the matrix one has to compute T (e1), T (e2) and T (e3), i.e., the transformation
of the columns of the identity, which are straightforwardly obtained as
T (e1) = 1 0 , T (e2) = −5 1 , T (e3) = 4 −6 , and hence the matrix is given by
A =
1 −5 4 0 1 −6
The matrix has obviously two pivots, so the system Ax = b will always be consistent, and the transformation is onto (its range is all of R2). It cannot be one-to-one because two many vectors are mapped to the same one in R2, as the system will always have a free variable. P2.-Let A be given below. Compute A−1.
A = 1 0 −2 −3 1 4 2 −3 4
By row operations one finds
A−1 = 8 3 1 10 4 1 7/2 3/2 1/2
P3.-Let T : R3 −→ R3, with T (x) = Ax, and
A = 1 −4 2 0 3 5 −2 8 −4
Find Range(T ) and discuss whether T is onto, one-to-one, both or none of them.
Answer: To find Range(T ) is to find the set of vectors b ∈ R3 such that the equation Ax = b has a solution. The augmented matrix of the system is
1 −4 2 b1 0 3 5 b2 −2 8 −4 b3 1 −4 2 b1 0 3 5 b2 0 0 0 (b3+ 2b1)
Therefore, consistency of the system requires b3+ 2b1= 0 ⇒ b1 = −b3/2, b2 free, and
Range(T ) = Span −1 0 2 , 0 1 0
T is neither onto (its range is not all of R3) nor one-to-one (the system has an infinite number
of solutions and therefore an infinite number of vectors that share every image).
P4.-Let A be given below. Discuss without any calculation why it should be invertible. Compute A−1 . A = 5 0 0 −3 1 0 8 5 −1
The matrix is invertible because its columns form clearly an independent set. By row operations one finds A−1 = 1/5 0 0 3/5 1 0 23/5 5 −1 P5.-Let A be given below. Compute A−1.
A = 1 2 3 1 1 2 0 1 2 .
Answer: The matrix is invertible because its columns form clearly an independent set. By row operations one finds
A−1 = 0 1 −1 2 −2 −1 −1 1 1 .
P6.-Let A be given below. Compute A−1
. A = 0 1 2 1 0 3 4 −3 8 .
Answer: The matrix is invertible because its columns form clearly an independent set. By row operations one finds
A−1= −9/2 7 −3/2 −2 4 −1 3/2 −2 1/2 .
Linear Algebra. Degrees in Engineering.
Solved problems.
Chapters 3 & 4.
Questions
Q1.- Let V and W be vector spaces, and let T : V → W be a linear transformation. Given a subspace Z ⊂ W , let U be the set of all x ∈ V such that T (x) ∈ Z. Show that U is a subspace of V .
Answer:
We need to show that ∀α, β ∈ R and ∀x, y ∈ U, αx + βy ∈ U. If x, y ∈ U, the definition of U implies that there T (x), T (y) ∈ Z. Therefore, using linearity of T and the fact that Z is a subspace, we know that
αT (x) + βT (y) = T (αx + βy) ∈ Z and hence αx + βy ∈ U as required.
Q2.- Let A be an invertible n × n matrix. Show that det(A−1)=1/det(A). Answer:
We know that A · A−1
= In, In being the n × n identity matrix. We can then apply the
property of the determinant of a product of matrices to find det(A · A−1) = det(I
n) = 1;
det(A)det(A−1) = 1 ⇒ det(A−1) = 1 det(A).
Q3.- Let V and W be vector spaces, and let T : V → W be a linear transformation. Given a subspace U ⊂ V , let T (U) denote the set of all images of the form T (x), where x ∈ U. Show that T (U ) is a subspace of W .
Answer:
From the definition we see that vectors of T (U ) are of the form T (x). Therefore, for T (U ) to be a subspace, it is needed that ∀α, β ∈ R and ∀x, y ∈ U, αT (x) + βT (y) ∈ T (U). Using linearity of T :
αT (x) + βT (y) = T (αx + βy)
and as U is a subspace, αx + βy ∈ U, which implies that T (αx + βy) ∈ T (U) as required. Q4.-Is the set of points inside and on the unit circle in the xy-plane,
H = x y : x2+ y2 ≤ 1 ,
a subspace of R2? Justify your answer. Answer:
No, because neither the addition nor the product by scalars are closed in H. For instance, 1 0 + 0 1 = 1 1 6∈ H whereas the two vectors in the left-hand-side do belong to H.
Q5.- If {u, v, w} are linearly independent vectors, then u, v, w 6∈ R2.
Answer: True. If the vectors belonged to R2, they would have two components, and a set with more vectors than components has each vector is necessarily linearly dependent. Therefore, if they are independent, they must have at least three components.
Q6.- Let A be a m × n matrix, row equivalent to an echelon form with k nonzero rows. Then the dimension of the space of solutions of A is m − k.
Answer:False. m is the number of equations, n is the number of variables. If there are k nonzero rows, there are k pivots, and hence n − k free variables. Then the dimension of the space of solutions of A is n − k.
Q7.- If A is an m × n matrix with m pivot columns, then the linear transformation x 7→ Ax is a one-to-one mapping.
Answer:False. A corresponds to a system of m equations and n unknowns, and n ≥ m (otherwise A cannot have m pivots). Therefore, for any independent term (i.e., any image vector) there are an infinite number of solutions, with n − m free parameters. Only in the special case m = n would A be one-to-one.
Q8.- If B = {b1, . . . , bn} and C = {c1, . . . , cn} are bases for a vector space V , then the jth
column of the change of coordinates matrix PC←B is the coordinate vector of cj in the basis B.
Answer: False. The jth column of the change of coordinates matrix PC←B is the coordinate
vector of bj in the basis C.
Problems
P1.-Let S = {v1, v2, v3} and T = {w1, w2, w3} be basis for R3, where
v1 = 2 0 1 , v2 = 1 2 0 , v3 = 1 1 1 , w1 = 6 3 3 , w2 = 4 −1 3 , w3 = 5 5 2 .
Compute the change of basis matrix from T to S.
Answer: To compute the matrix we need the coordinates of the vectors of basis T on basis S. This means we need to solve three linear systems:
α1iv1+ α2iv2+ α3iv3 = wi, i = 1, 2, 3.
We can solve the three systems at the same time by writing an augmented matrix with the three wi vectors as independent terms, as follows:
2 1 1 6 4 −5 0 2 1 3 −1 5 1 0 1 3 3 2 .
This matrix is reduced by row operations to its reduced echelon form, which turns out to be 1 0 0 2 2 1 0 1 0 1 −1 2 0 0 1 1 1 1 ,
and therefore the change of basis matrix is PS←T = 2 2 1 1 −1 2 1 1 1 . P2.-Let H = x1 x2 x3 : x1− x2+ x3 = 0 .
a subspace of R3. Find a basis of H and subsequently write the vector
v= 1 2 1
in coordinates in that basis.
Answer:H is the null space of matrix A = (1 − 2 1), which is already in reduced echelon form, and therefore it has one pivot and two free variables. The solution of the homogeneous equation is x1= 2x2− x3 which leads to the following basis for Nul(A), {v1, v2}, with
v1 = 2 1 0 , v2 = −1 0 1 .
To find the coordinates of v we have to solve v = α1v1 + α2v2, or equivalently we have the
augmented matrix 2 −1 1 1 0 2 0 1 1 ∼ 2 −1 1 0 1 1 0 1 1 ∼ 2 −1 1 0 1 1 0 0 0 ∼ 1 0 1 0 1 1 0 0 0 ⇒ α1= α2 = 1
The coordinates of v in this basis are then [v]B = 1 1 .
P3.-Compute the determinant of the matrix
A = 2 5 4 1 4 7 6 2 6 −2 −4 0 −6 7 7 0 .
With that result and without any further computations, discuss how many solutions does the system Ax = b have and when is it consistent.
Answer: 2 5 4 1 4 7 6 2 6 −2 −4 0 −6 7 7 0 = 2 5 4 1 0 −3 −2 0 6 −2 −4 0 −6 7 7 0 = 0 −3 −2 6 −2 −4 −6 7 7 = = 0 −3 −2 6 −2 −4 0 5 3 = −(−6) −3 −2 5 3 = 6
As det(A) is nonzero, A is invertible, and therefore the system Ax = b has a unique solution for all b.
P4.-Assume that the matrix A is row equivalent to B, where A and B are
A = 1 −4 9 −7 −1 2 −4 1 5 −6 10 7 , B = 1 0 −1 5 0 −2 5 −6 0 0 0 0 .
Without calculations, list rank(A) and dim(Nul(A)). Then find bases for Col(A), Row(A) and Nul(A).
Answer:
Inspection of B allows to conclude that A has two pivot columns and Ax = 0 has two free variables, and hence rank(A)=2 and dim(Nul(A))=2.
The basis for Col(A) is given by the first two columns of A, the pivot columns, so 1 −1 5 , −4 2 −6
is the requested basis. As for the row space, we can directly use the nonzero rows in the echelon form B, finding the basis
1 0 −1 5 , 0 −2 5 −6 .
Finally, for Nul(A), we need the reduced echelon form, which can be obtained from B:
A ∼ B ∼ 1 0 −1 5 0 1 −5/2 3 0 0 0 0 ; x1 − x3+ 5x4 = 0 x2− (5/2)x3+ 3x4 = 0
and from here we find the solution x1 x2 x3 x4 = x3− 5x4 (5/2)x3− 3x4 x3 x4 = x3 1 5/2 1 0 + x4 −5 −3 0 1 ,
the last two vectors being the basis for Nul(A). P5.-Let T : R3 −→ R3, with T (x) = Ax, and
A = 1 0 1 0 2 5 2 2 7 .
Find Range(T ) and discuss whether T is onto, one-to-one, both or none of them.
Answer: To find Range(T ) is to find the set of vectors b ∈ R3 such that the equation Ax = b has a solution. The augmented matrix of the system is
1 0 1 b1 0 2 5 b2 2 2 7 b3 1 0 1 b1 0 2 5 b2 0 0 0 (b3− 2b1− b2) .
Therefore, consistency of the system requires b3− 2b1− b2 = 0 ⇒ b1 = (b3 − b2)/2, b2 and b3 free, and Range(T ) = Span 1 0 2 , −1 2 0 .
T is neither onto (its range is not all of R3) nor one-to-one (the system has an infinite number
of solutions and therefore an infinite number of vectors that share every image b). P6.-Assume that the matrix A is row equivalent to B, where A and B are
A = 1 2 3 1 1 3 2 1 3 8 7 3 , B = 1 0 5 1 0 1 −1 0 0 0 0 0 .
Without calculations, list rank(A) and dim(Nul(A)). Then find bases for Col(A), Row(A) and Nul(A).
Answer:
Inspection of B allows to conclude that A has two pivot columns and Ax = 0 has two free variables, and hence rank(A)=2 and dim(Nul(A))=2.
The basis for Col(A) is given by the first two columns of A, the pivot columns, so 1 1 3 , 2 3 8
is the requested basis. As for the row space, we can directly use the nonzero rows in the echelon form B (using the pivot rows of A would be equally correct), finding the basis
1 0 5 1 , 0 1 −1 0 .
Finally, for Nul(A), we need the reduced echelon form, but B is already in reduced echelon form and therefore we can read the solution directly:
x1 x2 x3 x4 = −5x3− x4 x3 x3 x4 = x3 −5 1 1 0 + x4 −1 0 0 1 ,
the last two vectors being the basis for Nul(A).
P7.-Let S = {v1, v2} and T = {w1, w2} be basis for R2, where
v1= 1 2 , v2= 0 1 , w1= 1 1 , w2 = 2 3 .
Compute the change of basis matrix from T to S.
Answer: To compute the matrix we need the coordinates of the vectors of basis T on basis S. This means we need to solve two linear systems:
We can solve the two systems at the same time by writing an augmented matrix with the two wi vectors as independent terms, as follows:
1 0 1 2 2 1 1 3
.
This matrix is reduced by row operations to its reduced echelon form, which turns out to be
1 0 1 2 0 1 −1 −1
,
and therefore the change of basis matrix is PS←T = 1 2 −1 −1 .
P8.-Let T : R3 −→ R3, with T (x) = Ax, and
A = 1 0 1 0 2 5 0 0 3 .
Find Range(T ) and discuss whether T is onto, one-to-one, both or none of them.
Answer: To find Range(T ) is to find the set of vectors b ∈ R3 such that the equation Ax = b has a solution. The matrix is already in echelon form and it obviously has three pivots, hence it has a unique solution for any b ∈ R3. Hence, Range(T )=b ∈ R3.
T is both onto (its range is all of R3) and one-to-one (the system has a unique solution and therefore a unique vector for every image b).
P9.-Assume that the matrix A is row equivalent to B, where A and B are
A = −3 9 −2 −7 2 −6 4 8 3 −9 −2 2 , B = 1 −3 6 9 0 0 4 5 0 0 0 0 .
Without calculations, list rank(A) and dim(Nul(A)). Then find bases for Col(A), Row(A) and Nul(A).
Answer:
Inspection of B allows to conclude that A has two pivot columns and Ax = 0 has two free variables, and hence rank(A)=2 and dim(Nul(A))=2.
The basis for Col(A) is given by the first and third columns of A, the pivot columns, so −3 2 3 , −2 4 −2
is the requested basis. As for the row space, we can directly use the nonzero rows in the echelon form B (using the pivot rows of A would be equally correct), finding the basis
1 −3 6 9 , 0 0 4 5 .
Finally, for Nul(A), we need the reduced echelon form, which is 1 −3 0 3/2 0 0 1 5/4 0 0 0 0 .
and therefore the solution is: x1 x2 x3 x4 = 3x2− 3x4/2 x2 −5x4/4 x4 = x2 3 1 0 0 + x4 −3/2 0 −5/4 1 ,
the last two vectors being the basis for Nul(A).
P10.- Let S = {v1, v2} and T = {w1, w2} be basis for R2, where
v1= 1 0 , v2= 2 1 , w1= 1 1 , w2 = 1 2 . Compute the change of basis matrix from T to S.
Answer: To compute the matrix we need the coordinates of the vectors of basis T on basis S. This means we need to solve two linear systems:
α1iv1+ α2iv2= wi, i = 1, 2.
We can solve the two systems at the same time by writing an augmented matrix with the two wi vectors as independent terms, as follows:
1 2 1 1 0 1 1 2
.
This matrix is reduced by one row operation to its reduced echelon form, which turns out to be
1 0 −1 −3 0 1 1 2
,
and therefore the change of basis matrix is PS←T = −1 1 −3 2 .
Linear Algebra. Degrees in Engineering.
Solved problems.
Chapter 5.
Questions
Q1.-A is a 7 × 7 matrix with three distinct eigenvalues. One eigenspace is two-dimensional, and one of the other eigenspaces is three-dimensional. Is it possible that A is not diagonalizable? Justify your answer.
Answer:
The remaining eigenspace is at least one-dimensional, but it can also be two-dimensional, because the matrix, being 7×7 can have up to 7 independent eigenvectors. In case the remaining eigenspace is one-dimensional it does not complete a basis of R4 formed by eigenvectors, and hence A may not be diagonalizable.
Q2.- Show that if x is an eigenvector of the matrix product AB and Bx 6= 0, then Bx is an eigenvector of BA.
Answer: As x is an eigenvector of the matrix product AB, we have ABx = λx. Multiplying by B on the left, we have BABx = Bλx = λBx, i.e., BA(Bx) = λ(Bx), as requested.
Q3.- A is a 4 × 4 matrix with three distinct eigenvalues. One eigenspace is one-dimensional, and one of the other eigenspaces is two-dimensional. Is it possible that A is not diagonalizable? Justify your answer.
Answer:
The remaining eigenspace is at least one-dimensional, and in fact it cannot have a larger dimension because as the matrix is 4 × 4 it can have at most four independent eigenvectors. Therefore the remaining eigenspace is one-dimensional and it completes a basis of R4 formed by eigenvectors, and hence A is necessarily diagonalizable.
Q4.- Let A be a n × n matrix and v1, v2 two of its eigenvectors. Is v1+ v2 an eigenvector of
A? Justify your answer.
Answer:No, if the corresponding eigenvalues are different:
A(v1+ v2) = Av1+ Av2= λ1v1+ λ2v2 6= λ(v1+ v2).
For the special case they correspond to the same eigenvalue, the sum is an eigenvector with the same eigenvalue (apply the calculation above or recall that they belong to the same eigenspace). Q5.-Two eigenvectors with the same eigenvalue are always linearly dependent.
Answer:False. For instance, any vector is an eigenvector of the identity matrix with eigenvalue 1, because Ix = x, and they can be chosen independent.
Q6.- If A is an n × n diagonalizable matrix, then each vector in Rn can be written as a linear combination of eigenvectors A.
True. For A to be diagonalizable it has to have n independent eigenvectors, which in turn is a basis for Rn, hence the result.
Problems
P1.-Diagonalize the matrix
A = 1 2 −1 1 0 1 4 −4 5 . Answer:
The characteristic equation is
A = 1 − λ 2 −1 1 λ 1 4 −4 5 − λ = −(1 − λ)λ(5 − λ) + 12 − 4λ + 4(1 − λ) − 2(5 − λ) = = −(1 − λ)λ(5 − λ) + 6(1 − λ) = = −(1 − λ)[−λ(5 − λ) + 6] = = −(1 − λ)(λ2− 5λ + 6) = −(1 − λ)(2 − λ)(3 − λ)
Therefore the eigenvalues are 1, 2 and 3 and the matrix is diagonalizable. The corresponding eigenvectors are obtained by solving for each eigenvalue the homogeneous system (A − λI)x = 0, finding v1 = −1 1 2 , v2 = −2 1 4 , v3= −1 1 4
as representative eigenvectors for 1, 2 and 3, respectively. We can now form the matrix P = (v1v2v3) and then A = P DP−1 = P 1 0 0 0 2 0 0 0 3 P −1 . P2.-Let A and x0 be A = 3 5 3 1 , x0 = 1 −1 .
Find the general solution of xk+1= Axkfor x0given above. Is the origin an attractor, a repellor
or a saddle point? What happens to xk as k → ∞?
Answer:The characteristic equation for A is (3−λ)(1−λ)−15 = λ2−4λ+12 = 0, and therefore the eigenvalues are −2 and 6. Solving the corresponding homogeneous systems (A − λI)x = 0 leads to the eigenvectors
v1= 1 −1 , v2 = 5 3
respectively. We thus see that x0 = v1 and hence x1 = Ax0 = 6x0, and so on. The general
solution is then xk= 2k −2k .
As both eigenvalues are larger than 1 in absolute value, the origin is a repellor. Indeed, it can be seen that xk goes to ∞ as k → ∞.
P3.-Diagonalize the matrix
A = −2 2 2 2 −2 2 2 2 −2 .
Answer:
The characteristic equation is
A = −2 − λ 2 −2 2 −2 − λ 2 −2 −2 2 − λ = (−2 − λ)3+ 16 − 12(−2 − λ) = = −8 − 12λ − 6λ2− λ3+ 40 + 12λ = −λ3− 6λ2+ 32 = 0
Therefore the eigenvalues are 2 and −4 (twice) and the matrix is diagonalizable. The corres-ponding eigenvectors are obtained by solving for each eigenvalue the homogeneous system (A − λI)x = 0, finding v1 = 1 1 1 , v2 = 1 −1 0 , v3 = 1 0 −1
as representative eigenvectors for 2, −4, respectively. We can now form the matrix P = (v1v2v3)
and then A = P DP−1= P 2 0 0 0 −4 0 0 0 −4 P −1 . P4.-Let A and x0 be A = 3 5 3 1 , x0 = 1 −1 . Find the general solution of x′
= Ax for x0 given above. Is the origin an attractor, a repellor or
a saddle point? What happens to x(t) as t → ∞?
Answer:The characteristic equation for A is (3−λ)(1−λ)−15 = λ2−4λ+12 = 0, and therefore the eigenvalues are −2 and 6. Solving the corresponding homogeneous systems (A − λI)x = 0 leads to the eigenvectors
v1= 1 −1 , v2 = 5 3
respectively. The general solution is then
x(t) = c1e−2tv1+ c2e6tv2.
We now impose the initial condition x(0) = x0:
x(0) = c1 1 −1 + c2 3 −5 = x0 = 1 −1 ,
from which we trivially see that c1 = 1 and c2 = 0. The solution is therefore
x(t) = e−2t 1 −1 .
As one eigenvalue is positive and the other is negative, the origin is a saddle point. Indeed, it can be seen that x(t) goes to the origin as k → ∞ along the direction of v1.
P5.-Compute the eigenvalues of the matrix A = 0 2 2 2 0 2 2 2 0 .
Discuss whether the matrix is diagonalizable or not without computing its eigenvectors. Answer:
The characteristic equation is
det(A − λI) = −λ 2 2 2 −λ 2 2 2 −λ = (λ + 2)2(λ − 4) = 0
Therefore the eigenvalues are −2 (twice) and 4. In spite of having a double eigenvalue, we can be sure that the matrix is diagonalizable because it is symmetric.
P6.-The eigenvalues of the matrix
A = 0 0 1 0 1 2 0 0 1 .
are 0 and 1 (twice). Compute its eigenvectors and discuss whether the matrix is diagonalizable or not.
Answer:
The eigenvectors are obtained by solving for each eigenvalue the homogeneous system (A − λI)x = 0, finding v1= 1 0 0 , v2 = 0 1 0
as representative eigenvectors for 0, 1, respectively. As we have only two independent eigenvec-tors, the matrix is not diagonalizable.
P7.-Compute the eigenvalues of the matrix
A = 1 3 3 −3 −5 −3 3 3 1 .
Discuss whether the matrix is diagonalizable or not without computing its eigenvectors. Answer:
The characteristic equation is
det(A − λI) = 1 − λ 3 3 −3 −5 − λ −3 3 3 1 − λ = −(λ − 1)(λ + 2)2= 0
Therefore the eigenvalues are −2 (twice) and 1. We cannot say whether the matrix is diagona-lizable or not without computing its eigenvalues, because we do not know whether −2 has two eigenvectors and the matrix is not symmetric.
P8.-The eigenvalues of the matrix A = 2 4 3 −4 −6 −3 3 3 1 .
are 1 and -2 (twice). Compute its eigenvectors and discuss whether the matrix is diagonalizable or not.
Answer:
The eigenvectors are obtained by solving for each eigenvalue the homogeneous system (A − λI)x = 0, finding v1= 1 −1 1 , v2 = −1 1 0
as representative eigenvectors for 1, −2, respectively. As we have only two independent eigen-vectors, the matrix is not diagonalizable.
Linear Algebra. Degrees in Engineering.
Solved problems.
Chapter 6.
Questions
Q1.- Given u1, u2 and u3 ∈ Rn, with u3 ∈ Span({u1, u2}), what is the projection of u3 onto
Span({u1, u2})? Justify your answer.
Answer: The projection is u3 itself. By the theorem of the best approximation, the projection
is the best approximation to a given vector within a given subspace, and as in this case vector u3 is in the subspace, it is the best approximation to itself, and hence its own projection.
Q2.-Let U and V be n × n orthogonal matrices. Show that UV is also orthogonal.
Answer:An orthonormal square matrix verifies that its transpose is its inverse. U V is also n ×n. Then,
(U V )T(U V ) = (VTUT)(U V ) = VTUTU V = VT(UTU )V = VTV = I as required.
bigskip
Q3.- Given u1, u2 and u3∈ Rn, with u36∈ Span({u1, u2}), how could you find a vector that is
orthogonal to Span({u1, u2})? Justify your answer.
Answer:By substracting from u3 its projection onto Span({u1, u2}). By definition of projection,
the difference between a vector and its projection must be orthogonal to the subspace onto which it is projected.
Q4.-Find a formula that yields explicitly the least-squares solution of Ax = b when the columns of A are orthonormal.
Answer:As the columns of A are orthonormal, we have ATA = I. Therefore the normal equations
ATAˆx= ATb become simply ˆx= ATb.
Q5.- If ||u − v||2= ||u||2+ ||v||2, then u and v are orthogonal.
Answer: True. The Pythagorean theorem states ||u + v||2 = ||u||2 + ||v||2 ⇔ u and v are orthogonal. Applying it to u and −v and using ||v|| = || − v|| we have the result above.
Q6.- If W is a subspace, then ||projWv||2+ ||v − projWv||2 = ||v||2
Answer: True. The Pythagorean theorem states ||u + v||2 = ||u||2 + ||v||2 ⇔ u and v are orthogonal. Applying it to V and v − projWvwhich are orthogonal by construction we have the
result above. Problems P1.-Find a QR factorization of A = 1 1 0 1 −1 0 1 1 1 1 1 1 .
Answer:
We apply the Gram-Schmidt orthogonalization procedure (we refer to the columns of A as x1, x2, x3): v1 = x1= 1 1 1 1 v2 = x2− x2· v1 v1· v1 v1 = 1 2 1 −3 1 1 v3 = x3− x3· v1 v1· v1 v1− x3· v2 v2· v2 v2= 1 3 −2 0 1 1 Normalizing the so obtained vectors we can form Q
Q = 1 2√3 1/2 √3/6 −√6/3 1/2 −√3/2 0 1/2 √3/6 √6/6 1/2 √3/6 √6/6 , and finally R = QTA =√3 2 1 1 0 √3 √3/3 0 0 √6/3 . P2.-Given A = 1 1 1 2 1 3 , b = 2 2 4 ,
find a least-squares solution of Ax = b and the orthogonal projection of b onto Col(A). Answer: We compute ATA = 3 6 6 14 , ATb= 8 18 , and with this we solve the normal equations ATAˆx= ATbto obtain
ˆ x= 2/3 1 .
The orthogonal projection of b onto Col(A) is then simply Aˆx, yielding
projCol(A)b= 5/3 8/3 11/3 . P3.-Find a QR factorization of A = 1 2 −1 1 −1 2 1 −1 2 −1 1 1 .
Answer:
We apply the Gram-Schmidt orthogonalization procedure (we refer to the columns of A as x1, x2, x3): v1 = x1 = 1 1 1 −1 v2 = x2− x2· v1 v1· v1 v1= 1 4 9 −3 −3 3 v3 = x3− x3· v1 v1· v1 v1− x3· v2 v2· v2 v2 = 0 1 1 2 Normalizing the so obtained vectors we can form Q
Q = 1 2√3 1/2 √3/2 0 1/2 −√3/6 √6/6 1/2 −√3/6 √6/6 −1/2 √3/6 √6/3 , and finally R = QTA =√3 2 −1/2 1 0 3√3/2 −√3 0 0 √6 . P4.-Given A = 1 5 2 −2 −1 1 , b = 3 2 5 ,
find a least-squares solution of Ax = b and the orthogonal projection of b onto Col(A). Answer: We compute ATA = 6 0 0 30 , ATb= 2 16 , and with this we solve the normal equations ATAˆx= ATbto obtain
ˆ x= 1/3 8/15 .
The orthogonal projection of b onto Col(A) is then simply Aˆx, yielding
projCol(A)b= 3 −2/5 1/5 .
P5.-Find the matrix Q corresponding to the QR factorization of
A = 1 0 2 −1 2 0 −1 −2 2 .
Answer:
We apply the Gram-Schmidt orthogonalization procedure (we refer to the columns of A as x1, x2, x3): v1 = x1 = 1 −1 −1 v2 = x2− x2· v1 v1· v1 v1= x2 = 0 2 −2 v3 = x3− x3· v1 v1· v1 v1− x3· v2 v2· v2 v2 = 2 1 1 Normalizing the so obtained vectors we can form Q
Q = 1 2√3 1/√3 0 2/√6 −1/√3 1/√2 1/√6 −1/√3 −1/√2 1/√6 . P6.-Given A = 1 2 1 2 1 1 , b = 1 0 1 , find a least-squares solution of Ax = b.
Answer: We compute ATA = 3 5 5 9 , ATb= 2 3 , and with this we solve the normal equations ATAˆx= ATbto obtain
ˆ x= 3/2 −1/2 .
P7.-Find the matrix Q corresponding to the QR factorization of
A = 1 1 1 0 1 1 0 0 1 . Answer:
We apply the Gram-Schmidt orthogonalization procedure (we refer to the columns of A as x1, x2, x3): v1 = x1 = 1 0 0 v2 = x2− x2· v1 v1· v1 v1= x2 = 0 1 0 v3 = x3− x3· v1 v1· v1 v1− x3· v2 v2· v2 v2 = 0 0 1
There is no need for normalizing as the obtained vectors have already unit norm, so we can form Q Q = 1 0 0 0 1 0 0 0 1 . P8.-Given A = 2 3 2 4 1 1 , b = 7 3 1 , find a least-squares solution of Ax = b.
Answer: We compute ATA = 9 15 15 26 , ATb= 21 34 , and with this we solve the normal equations ATAˆx= ATbto obtain
ˆ x= 4 −1 .