Linear algebra reviews exercises Sophie Marques Tuesday 15 December, 2015

advertisement
Linear algebra reviews exercises
Sophie Marques
Tuesday 15th December, 2015
2
BE CAREFUL, THE SOLUTION IN THE FOLLOWING ARE QUICK
ANSWERS WITHOUT JUSTIFICATION AND DO NOT CONTAIN
ALWAYS ALL THE DETAILS AS THEY HAVE ALREADY BEEN
MENTIONED IN CLASS AND IN HOMEWORK MANY TIMES... For
justification and redaction for the exams refer to homework or/and class
notes.
Problem 1:
Find a bases for ColpAq
dim of NulpAq, where
¨
1 2
˚5 1
A“˚
˝4 6
3 4
and NulpAq and then deduce the rank of A and
´4
´9
´9
´5
4
2
12
8
˛ ¨
6
1
˚
10 ‹
‹„˚0
15 ‚ ˝ 0
9
0
Solution : Basis for Col (A):
$¨ ˛ ¨
1
’
’
&˚ ‹ ˚
˚ 5 ‹,˚
˝4‚˝
’
’
%
3
˛ ¨
2
´4
‹
˚
1 ‹ ˚ ´9
,
6 ‚ ˝ ´9
4
´5
2
2
0
0
8
3
5
0
˛,
/
/
‹.
‹
‚/
/
-
So, rankpAq “ dimpColpAqq “ 3. Basis for Nul(A):
$¨
˛ ¨
˛,
0
0
/
’
/
’
/
’
/
˚
‹
˚
‹
’
´2
´1
&˚
‹ ˚
‹.
˚ 0 ‹,˚ 1 ‹
˚
‹ ˚
‹
’
/
’
˝ 1 ‚ ˝ 0 ‚/
/
’
/
’
%
0
1
So dimpNulpAqq “ 2.
Problem 2:
Use the cofactor expansion to compute
ˇ
ˇ 5 ´2 4
ˇ
ˇ 0 3 ´5
ˇ
ˇ 2 ´4 7
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
˛
4 ´6
4 ´1 ‹
‹
0 ´5 ‚
0 0
3
Solution:
ˇ
ˇ
ˇ 5 ´2 4 ˇ
ˇ
ˇ
ˇ 0 3 ´5 ˇ “ 1
ˇ
ˇ
ˇ 2 ´4 7 ˇ
Problem 3:
Use row reduction to echelon form to compute the following determinant
ˇ
ˇ
ˇ 1 a a2 ˇ
ˇ
ˇ
ˇ 1 b b2 ˇ
ˇ
ˇ
ˇ 1 c c2 ˇ
Solution:
ˇ
ˇ ˇ
ˇ 1 a a2 ˇ ˇ 1
a
a2
ˇ
ˇ ˇ
ˇ 1 b b 2 ˇ “ ˇ 0 b ´ a b 2 ´ a2
ˇ
ˇ ˇ
ˇ 1 c c2 ˇ ˇ 0 c ´ a c2 ´ a2
ˇ
ˇ
ˇ
ˇ “ pb ´ aqpc ´ aqpc ´ aq
ˇ
ˇ
Problem 4:
Using the Cramer’s rule, determine the values of the parameter for which
the system has a unique solution, and describe the solution.
"
sx1 ´ 2sx2 “ 1
3x1 ` 6sx2 “ 4
ˆ
˙
s ´2s
Solution : The system is equivalent to Ax “ b, where A “
3 6
ˆ
˙
ˆ
˙ ˆ
˙
´1
´1 ´2s
s ´1
and b “
. We compute A1 “
,
.
4
4
6
3 4
detpA1 pbq
detpA2 pbq
4s´3
7
x1 “ detpAq
“ 3ps`1q
and x2 “ detpAq
“ 6sps`1q
with s ‰ 0, ´1.
Problem 5:
Let R be the triangle with vertices at px1 , y1 q, px2 , y2 q and px3 , y3 q. Show
that
¨
˛
x1 y1 1
tarea o f triangleu “ 1{2det ˝ x2 y2 1 ‚
x3 y3 1
Solution: Translate R to a new triangle of equal area by subtracting
px3 , y3 q from each vertex. The new triangle has vertices p0, 0q, px1 ´
4
x3 , y1 ´ y3 q and px2 ´ x3 y2 ´ y3 q. The area of the triangle will be
ˇ
ˇ
ˇ x2 ´ x3 x2 ´ x3 ˇ
ˇ
1{2 ˇˇ
y1 ´ y2 y2 ´ y3 ˇ
Now consider using row operations and a cofactor expansion to compute
the determinant in the formula:
¨
˛
ˆ
˙
x1 y1 1
x
´
x
y
´
y
1
3
1
3
det ˝ x2 y2 1 ‚ “ det
x2 ´ x3 y2 ´ y3
x3 y3 1
Since detpAT q “ detpAq,
˙ ˇ
ˆ
ˇ x ´ x3 x2 ´ x3
x1 ´ x3 y1 ´ y3
“ ˇˇ 2
det
x2 ´ x3 y2 ´ y3
y1 ´ y2 y2 ´ y3
So the above observation allows us to state that
will be
¨
x1
˝
tarea o f triangleu “ 1{2det x2
x3
ˇ
ˇ
ˇ
ˇ
the area of the triangle
˛
y1 1
y2 1 ‚
y3 1
Problem 6:
Let H and K be subspaces of a vector space V. The intersection of H
and K, written H X K is the set of v in V that belong to both H and K.
Show that H X K is a subspace of V. Give an example in R2 to show
that the union of two subspace is not, in general a subspace.
Solution : Both H and K contain the zero vector of V because they
are subspaces of V. Thus the zero vector of V is in H X K. Let u and
v be in H X K. Then u and v are in H. Since H is a subspace u ` v is
in H. Likewise u and v are in K. Thus u ` v is in H X K. Let u be in
H X K. Then u is in H. Since K is subspace cu is in H. Likewise u is in
K. Since K is a subspace cu is in K. Thus cu is in H X K for any scalar
c, and H X K is a subspace of V.
The union of two subspaces is not in general a subspace. For, an example
in R2 let H be the x-axis and let K be he y-axis. Then both H and K are
5
subspaces of R2 , but H Y K is thus not a space in R2 since p0, 1q is in K
but not in H and p1, 0q is in H but not in K so they are both in H Y K
but p1, 1q “ p1, 0q ` p0, 1q is neither is H nor in K thus not in H Y K but
this is suppose to be true if H Y K was a subspace.
Problem 7: Let M2ˆ2 be the vector space of all 2 ˆˆ2 matrices
˙ and
a b
define T : M2ˆ2 Ñ M2ˆ2 by TpAq “ A ` AT , where A “
.
c d
1. Show that T is a linear transformation.
2. Let B be any element of M2ˆ2 such that BT “ B. Find an A in M2ˆ2
such that TpAq “ B.
3. Show that the range of T is the set of B in M2ˆ2 with the property
that BT “ B.
4. Describe the kernel of T
Solution:
1. For any A and B in M2ˆ2 , and for any scalar c,
TpA ` Bq “ pA ` Bq ` pA ` BqT “ pA ` AT q ` pB ` BT q “ TpAq ` TpBq
and
TpcAq “ pcAq ` pcAqT “ cpA ` AT q “ cTpAq
So T is a linear transformation.
2. Let B be an element of M2ˆ2 with BT “ B, and let A “ 1{2B. Then
TpAq “ A ` AT “ 1{2B ` 1{2BT “ B
3. Note that B in RangepTq, then there is A P M2ˆ2 , TpAq “ B since
then B “ A ` AT then
BT “ pA ` AT qT “ AT ` A “ B
Thus the RangepAq is included on the symmetric matrix M2ˆ2 . The
reverse inclusion is obtained by the previous question. Thus, the
RangepTq is the 2 ˆ 2 symmetric matrices.
4.
ˆ
˙
0 b
KerpTq “ t
, b P Ru
´b 0
6
Problem 7:
Use coordinate vectors to test the linear independence of the sets of
polynomials, t1 ` 2t3 , 2 ` t ´ 3t2 , ´t ` 2t2 ´ t3 u. Explain your work.
Solution: The coordinate mapping produces the coordinate vectors ....
p1, 0, 0, 2q, p2, 1, ´3, 0q, and p0, ´1, 2, ´1q respectively. We test for linear
independence of these vectors by writing them as columns of a matrix
and row reducing:
¨
˛ ¨
˛
1 2 0
1 0 0
˚ 0 1 ´1 ‹ ˚ 0 1 0 ‹
˚
‹ ˚
‹
˝ 0 ´3 2 ‚ „ ˝ 0 0 1 ‚
2 0 ´1
0 0 0
Since the matrix has a pivot in each column, its columns and thus the
given polynomials, since the coordinate map is an isomorphism, are linearly independent.
Problem 8:
Explain why the space P of all the polynomials is an infinite dimensional
space.
Solution: Suppose that dimpPq “ k ă 8. Now, Pn is a subspace of P
for all n, and dimpPk´1 q “ k, so dimpPk´1 q “ dimpPq. This would imply
that Pk´1 “ P, which is clearly untrue: for example, pptq “ tk is in P but
not in Pk´1 . Thus the dimension of P cannot be finite.
Problem 9:
¨
˛
¨ ˛
2
a
T
˝
‚
˝
Verify that rankpuv q ď 1 if u “ ´3 and v “ b ‚.
5
c
Solution : Compute that
¨
˛
2a 2b 2c
uvT “ ˝ ´3a ´3b ´3c ‚
5a 5b 5c
. Each column of uvT is a multiple of u, so dimpColpuvT qq “ 1, unless a “ b “ c “ 0, in which case uvT is the 3 ˆ 3 zero matrix and
dimpColpuvT qq “ 0. In any case, rankpuvT q “ dimpColpuvT qq ď 1.
7
Problem 10:
Let D “ td1 , d2 , d3 u and F “ t f1 , f2 , f3 u be bases for a vector space V,
and suppose that f1 “ 2d1 ´ d2 ` d3 , f2 “ 3d2 ` d3 and f3 “ ´3d1 ` 2d3 .
1. Find the change-of-coordinates matrix from F to D.
2. Find rxsD for x “ f1 ´ 2 f2 ` 2 f3 .
Solution :
1.
¨
PDÐF
˛
2 0 ´3
“ rr f1 sD , r f2 sD , r f3 sD s “ ˝ ´1 3 0 ‚
1 1 2
2.
¨
˛
´4
rxsD “ PDÐF rxsF “ ˝ ´7 ‚
3
Problem 11:
Find the general solution of this difference equation.
yk “ k ´ 2; yk`2 ´ 4yk “ 8 ´ 3k
Solution: The general solution of the difference equation yk`2 ´ 4yk “
8 ´ 3k is yk “ k ´ 2 ` c1 2k ` c2 p´2qk .
Problem 12:
Show that every 2 ˆ 2 matrix has at least oneˆ steady-state vector.
Any
˙
1´σ
β
such matrix can be written in the form P “
, where α
α
1´β
and β are constant 0 and 1. (There are two linearly independent steadystate vectors if α “ β “ 0. Otherwise there is only one.)
Solution: A steady state vector for P is a vector x such that Px “ x,
that is such that pPˆ´ Iqx
˙ “ 0.ˆ ˙
1
0
If α “ β “ 0, then
and
are two linearly independent steady
0
1
vector.
8
If α or β is not 0, then
ˆ
P´I “
´α β
α ´β
˙
Row reducing the augmented matrix give one possible solution
ˆ ˙
β
x“
α
Problem 13:
Consider a matrix A with the property that the rows sum all equal the
same number s. Show that s is an eigenvalue of A.
Solution : Let v be the vector in Rn whose entries are all ones. Then
Av “ sv.
Problem 14: Orthogonally diagonalize if possible:
¨
˛
3 1 1
˝1 3 1‚
1 1 3
Solution : Let
?
?
? ˛
1{ ?3 ´1{? 2 ´1{ ?6
P “ ˝ 1{ ?3 1{ 2 ´1{? 6 ‚
1{ 3
0
2{ 6
¨
and
¨
˛
5 0 0
D“˝0 2 0‚
0 0 2
Then P orthogonally diagonalizable A, and A “ PDP´1 .
Problem 15: Let T : P2 Ñ P4 be the transformation that maps a
polynomial pptq into a polynomial pptq ` 2t2 pptq.
1. Find the image of pptq “ 3 ´ 2t2t .
2. Show that T is a linear transformation.
3. Find the matrix for T relative to the bases t1, t, t2 u and t1, t, t2 , t3 , t4 u.
9
Solution:
1. Tppq “ 3 ´ 2t ` 7t2 ´ 4t3 ` 2t4 .
2. Let p and q be polynomials in P2 and c be any scalar. Then
Tpp ` qq “ pp ` qq ` 2t2 pp ` qq “ pp ` 2t2 pq ` pq ` 2t2 q “ Tppq ` Tpqq
and
Tpcpq “ pcpq ` 2t2 pcpq “ cpp ` 2t2 pq “ cTppq
Thus T is a linear transformation.
3. ... The matrix for T relative to B and C is
¨
˚
˚
rrTpb1 qsC , rTpb2 qsC , rTpb3 qsC s “ ˚
˚
˝
1
0
2
0
0
0
1
0
2
0
0
0
1
0
2
˛
‹
‹
‹
‹
‚
Problem 16: Classify the origin as an attractor, repeller or saddle point
of the dynamical system xk`1 “ Axk . Find the direction of the greatest
attraction and/or repulsion when
˙
ˆ
1.7 0.6
A“
´0.4 0.7
Solution: The eigenvalue for A are λ “ 1.1 and 1.3. The origin is a
repeller because both eigenvalues are greater than 1 in magnitude. The
direction of the greatest repulsion is through the ˆ
origin ˙and the eigenvec´3
tor v1 such that Av1 “ 1.3v1 , you can find v1 “
.
2
Problem 17: Let W “ Spantv1 , ¨ ¨ ¨ , vp u. Show that if x is orthogonal to each v j , for 1 ď j ď p, then x is orthogonal to every vector in W.
Solution: A typical vector in W has the form w “ c1 v1 ` ¨ ` cp vp . If x
is orthogonal to each v j , then
w ¨ x “ pc1 w1 ` ¨ ¨ ¨ ` cp vp q ¨ x “ c1 pv1 ¨ w1 q ` ¨ ¨ ¨ ` cp pvp ¨ wp q “ 0
So x is orthogonal to each w in W.
10
Problem 18:
Show that if the vector of an orthogonal set are normalized the new set
will still be orthogonal.
Solution: Just note that v1 ¨ v2 “ 0 then
pc1 v1 q ¨ pc2 v2 q “ c1 c2 v1 ¨ v2 “ c1 c2 0 “ 0
Problem 19:
Find the orthogonal projection of y onto Spantu1 , u2 u where
˛
¨ ˛
¨
¨ ˛
0
´4
6
y “ ˝ 4 ‚, u1 “ ˝ ´1 ‚, u2 “ ˝ 1 ‚
1
1
1
Solution:
¨
˛
´6
ŷ “ ˝ 4 ‚
1
Problem 20:
Find the QR factorization for A where
˛
¨
5 9
˚ 1 7 ‹
‹
A“˚
˝ ´3 ´5 ‚
1 5
Solution:
¨
˛
5{6 ´1{6
˚ 1{6 5{6 ‹
‹
Q“˚
˝ ´3{6 1{6 ‚
1{6 3{6
and
ˆ
˙
6
12
R “ QT A “
0 6
Problem 21:
Find the least squares solution of Ax “ b where
¨
˛
¨
˛
1 5
4
A “ ˝ 3 1 ‚, b “ ˝ ´2 ‚
´2 1
´3
11
Solution:
ˆ
x̂ “
´3
1{2
˙
˛
1
(b̂ “ ˝ 1 ‚)
0
¨
Problem 22:
Find the least squares line y “ β0 ` β1 x of the least-squares line that best
fits data points:
p2, 3q, p3, 2q, p5, 1q, p6, 0q
Solution:
The least square line is y “ 1.1 ` 1.3x.
Problem 23:
Let P3 have the inner product given by evaluation at ´3, ´1, 1 and 3.
Let p0 ptq “ 1, p1 ptq “ t and p2 ptq “ t2 .
1. Compute the orthogonal projection of p2 onto the subspace spanned
by p0 and p1 .
2. Find a polynomial q that is orthogonal to p0 and p1 , such that
tp0 , p1 , qu is an orthogonal basis for Spantp0 , p1 , p2 u. Scale the polynomial q so that its vector of values at p´3, ´1, 1, 3q is p1, ´1, ´1, 1q.
Solution:
1. pˆ2 “ 5
2. q “ p2 ´pˆ2 “ t2 ´5 will be orthogonal to both p0 and p1 and tp0 , p1 , qu
will be an orthogonal basis for Spantp0 , p1 , p2 u. The vector values
for q at p´3, ´1, 1, 3q is p4, ´4, ´4, 4q, so scaling by 1{4 yields the
new vectors q “ p1{4qpt2 ´ 5q.
Problem 24:
Make a change of variable x “ Py so that transforms the quadratic form
into one with no cross-product term. Write the new quadratic form and
determine if it is positive definite, negative definite or indefinite when
the quadratic form is
Qpxq “ 8x21 ` 6x1 x2
12
Solution: The matrix of the quadratic form is
˙
ˆ
8 0
A“
3 0
Orthogonally diagonalize A and get
? ˙
ˆ ?
3{ ?10 ´1{? 10
P“
1{ 10 3{ 10
and
ˆ
D“
9 0
0 ´1
˙
The desired based change is x “ Py and the new quadratic is
xT Ax “ yT Dy “ 9y21 ´ y22
Problem 25:
Find a SVD for
¨
˛
7 1
A“˝0 0‚
5 5
Solution :
?
?
˛¨ ?
˛
? ˙
?
ˆ
3 10 ?0
1{ 2 ´1{ 2 0
5
1{
2{
?
?5
0?
1 ‚˝ 0
A “ UσV T “ ˝ 0?
10 ‚
´1{ 5 2{ 5
1{ 2 1{ 2 0
0
0
¨
Download