math 415 midterm 3 exam check list sp 2018

38
Math 415 Midterm 3 Exam Check List SP 2018 Chapter 3 Section 5: Function spaces, Fourier series and orthogonal polynomials motivate the integral inner product for functions prove orthogonality of the Fourier trig functions, then normalize derive Fourier series and the Fourier coefficients apply Gram-Schmidt to basis 1, t, t 2 in P 2 derive best approximation of a general function with a quadratic function Chapter 4 Section 1: Definition and properties of the determinant describe the three properties defining the determinant describe seven additional properties that derive from the first three (product rule, transpose rule, inverse rule, singularity rule, etc.) Chapter 4 Section 2: Formulas for the determinant, cofactor expansion derive the product of pivots rule derive the permutation form (optional) derive the cofactor expansion form of the determinant (important for next section) Chapter 4 Section 3: Applications of determinants cofactor matrix formula for the inverse of a matrix Cramer’s rule volume of a box in terms of determinants Chapter 5 Section 1: Eigenvalues and eigenvectors and computation examples motivate the eigenvalue problem for A using const coefficient differential systems present in detail a 2 × 2 example and its full solution discuss what the eigenvalue problem looks like for diagonal, triangular and projection matrices discuss the sum and product rules for eigenvalues Chapter 5 Section 2: Diagonalization of a matrix present the diagonalization results for a square matrix and a justification point out that not all matrices are diagonalizable, but those with distinct eigenvalues are 1

Upload: others

Post on 27-Apr-2022

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Math 415 Midterm 3 Exam Check List SP 2018

Math 415 Midterm 3 Exam Check List SP 2018

Chapter 3 Section 5: Function spaces, Fourier series and orthogonal polynomials

• motivate the integral inner product for functions

• prove orthogonality of the Fourier trig functions, then normalize

• derive Fourier series and the Fourier coefficients

• apply Gram-Schmidt to basis 1, t, t2 in P2

• derive best approximation of a general function with a quadratic function

Chapter 4 Section 1: Definition and properties of the determinant

• describe the three properties defining the determinant

• describe seven additional properties that derive from the first three (product rule, transposerule, inverse rule, singularity rule, etc.)

Chapter 4 Section 2: Formulas for the determinant, cofactor expansion

• derive the product of pivots rule

• derive the permutation form (optional)

• derive the cofactor expansion form of the determinant (important for next section)

Chapter 4 Section 3: Applications of determinants

• cofactor matrix formula for the inverse of a matrix

• Cramer’s rule

• volume of a box in terms of determinants

Chapter 5 Section 1: Eigenvalues and eigenvectors and computation examples

• motivate the eigenvalue problem for A using const coefficient differential systems

• present in detail a 2 × 2 example and its full solution

• discuss what the eigenvalue problem looks like for diagonal, triangular and projection matrices

• discuss the sum and product rules for eigenvalues

Chapter 5 Section 2: Diagonalization of a matrix

• present the diagonalization results for a square matrix and a justification

• point out that not all matrices are diagonalizable, but those with distinct eigenvalues are1

Page 2: Math 415 Midterm 3 Exam Check List SP 2018

• discuss the issue of possibly not enough eigenvectors when eigenvalues are repeated

• discuss the fact that complex eigenvalues can arise even with real matrices

• discuss how to find powers of matrices using diagonalization

• discuss how the eigenvalues of a matrix and its transpose are related

Chapter 5 Section 3: Complex numbers and complex eigenvalue problems

• terms: i, complex number, real part, imaginary part, modulus, conjugate

• define addition, multiplication, division of complex numbers

• define conjugate and outline the properties of conjugates

• do an eigenvalue analysis with complex eigenvalues and eigenvectors

• prove theorem that eigenvalues and eigenvectors of a real matrix appear in conjugate pairs

• terms: complex plane, rectangular and polar forms of a complex number

• Euler’s identity

2

Page 3: Math 415 Midterm 3 Exam Check List SP 2018

Math 415 - Midterm 3

Thursday, November 20, 2014

Circle your section:

Philipp Hieronymi 2pm 3pmArmin Straub 9am 11am

Name:

NetID:

UIN:

Problem 0. [1 point] Write down the number of your discussion section (for instance, AD2or ADH) and the first name of your TA (Allen, Anton, Mahmood, Michael, Nathan, Pouyan,Tigran, Travis).

Section: TA:

To be completed by the grader:

0 1 2 3 4 5 6 Shorts∑

/1 /? /? /? /? /? /? /? /?

Good luck!

1

Page 4: Math 415 Midterm 3 Exam Check List SP 2018

Instructions

• No notes, personal aids or calculators are permitted.• This exam consists of ? pages. Take a moment to make sure you have all pages.• You have 75 minutes.• Answer all questions in the space provided. If you require more space to write your

answer, you may continue on the back of the page (make it clear if you do).• Explain your work! Little or no points will be given for a correct answer with no

explanation of how you got it.• In particular, you have to write down all row operations for full credit.

Problem 1. Let A =

1 −11 01 11 2

and b =

50510

. Find a least squares solution of Ax = b.

Problem 2. Let W = span

0101

,

0111

.

(a) Find an orthonormal basis for W .

(b) What is the orthogonal projection of

1210

onto W?

(c) Write

1000

as the sum of a vector in W and a vector in W⊥.

(d) Find the projection matrix corresponding to orthogonal projection onto W .

Problem 3. Find the QR decomposition of A =

4 25 00 0 −23 −25 0

.

Problem 4. Find the least squares line for the data points (1, 1), (2, 1), (3, 4), (4, 4).

Problem 5.

(a) Let A =

a b cd e fg h i

. Write down the cofactor expansion of det(A) along the second

column.(b) Let A = [a1 a2 a3] and B = [b1 b2 b3] be two 3× 3-matrices. Suppose that det(A) = 5

and b2 = a1 + 2a2. What is det(B)?

(c) Find det

1 1 1 11 1 4 41 −1 2 −21 −1 8 −8

.

2

Page 5: Math 415 Midterm 3 Exam Check List SP 2018

(d) Find det

0 0 3 10 0 2 22 −1 1 11 0 −1 0

.

Problem 6. Let A =

−1 0 1−3 4 10 0 2

.

(a) Find the eigenvalues of A, as well as a basis for the corresponding eigenspaces.(b) Diagonalize A. (That is, write A = PDP−1 where D is diagonal.)

Problem 7. Consider the space P2 of polynomials of degree up to 2, together with the innerproduct

〈p(t), q(t)〉 =

∫ 1

0

p(t)q(t)dt.

(a) Is the standard basis 1, t, t2 an orthogonal basis?(b) Apply Gram–Schmidt to 1, t, t2 to obtain an orthonormal basis of P2.(c) What is the orthogonal projection of t2 onto span{1, t}?

3

Page 6: Math 415 Midterm 3 Exam Check List SP 2018

SHORT ANSWERS

Note: On the actual exam all short answer question will be multiple choice. You will be en-tering your answers to the multiple choice questions on a scantron sheet that will be includedwith your exam. So please bring a Number 2 pencil to the exam. Thanks.

Short Problem 1. If A and B are 3× 3 matrices with det(A) = 4 and det(B) = −1. Whatis the determinant of C = 2ATA−1BA?

Short Problem 2. If A is an n × n matrix, and S is an invertible n × n matrix. Are thecharacteristic polynomial of A and SAS−1 equal? The determinant?

Short Problem 3. Let A be a 7 × 7 matrix with dim Nul(A) = 1. What can you say aboutdet(A)?

Short Problem 4. Consider A =

1 1 0 01 −1 0 00 0 1 10 0 1 −1

.

(a) Using that the columns of A are orthogonal, find A−1.(b) Let w1, . . . ,w4 be the columns of A. Without solving equations, find coefficients

c1, . . . , c4 such that

1234

= c1w1 + . . .+ c4w4.

Short Problem 5. Let A be a n×n matrix with AT = A−1. What can you say about det(A)?

Short Problem 6. Let A be an n× n matrix with eigenvalue λ. Determine whether each ofthe following statements is correct.

(a) λ2 is an eigenvalue of A2.(b) λ−1 is an eigenvalue of A−1.(c) λ+ 1 is an eigenvalue of A+ I.(d) λ cannot be zero.

Short Problem 7. Consider a matrix

Q =

1√3

1√14

?1√3

2√14

?1√3

−3√14

?

,in which the third column has not been specified, yet. Which of the following vectors can beadded as a third column of Q such that Q is orthogonal?

(a)

−541

,

(b)

−5√424√421√42

,

(c)

001

,

4

Page 7: Math 415 Midterm 3 Exam Check List SP 2018

(d) none of the above.

Short Problem 8. True or false?

(a) If ATA is diagonal, then A has orthogonal columns.(b) If A is an orthogonal matrix, then AT is an orthogonal matrix.(c) If Ax = 0, then x is orthogonal to the columns of A.(d) For all n× n matrices A and B, det(AB) = det(A) det(B).(e) For all n× n matrices A and B, det(A+B) = det(A) + det(B).(f) Every orthonormal set of vectors is linearly independent.(g) Every subspace of Rn has an orthogonal basis.(h) If every row of A adds up to 0, then det(A) = 0.(i) If every row of A adds up to 1, then det(A) = 1.(j) If A is invertible and B is not invertible, then AB is invertible.(k) The determinant of A is the product of the diagonal entries of A.

Short Problem 9. Suppose that the projection matrix corresponding to orthogonal projection

onto V is P = 130

29 −2 5−2 26 105 10 5

.

(a) Is v =

−210

in V ?

(b) Find the vector in V which is closest to w =

110

.

(c) What is the dimension of V ?

5

Page 8: Math 415 Midterm 3 Exam Check List SP 2018

Math 415 - Midterm 3

Thursday, November 20, 2014

Circle your section:

Philipp Hieronymi 2pm 3pmArmin Straub 9am 11am

Name:

NetID:

UIN:

Problem 0. [1 point] Write down the number of your discussion section (for instance, AD2or ADH) and the first name of your TA (Allen, Anton, Mahmood, Michael, Nathan, Pouyan,Tigran, Travis).

Section: TA:

To be completed by the grader:

0 1 2 3 4 5 6 Shorts∑

/1 /? /? /? /? /? /? /? /?

Good luck!

1

Page 9: Math 415 Midterm 3 Exam Check List SP 2018

Instructions

• No notes, personal aids or calculators are permitted.• This exam consists of ? pages. Take a moment to make sure you have all pages.• You have 75 minutes.• Answer all questions in the space provided. If you require more space to write your

answer, you may continue on the back of the page (make it clear if you do).• Explain your work! Little or no points will be given for a correct answer with no

explanation of how you got it.• In particular, you have to write down all row operations for full credit.

Problem 1. Let A =

1 −11 01 11 2

and b =

50510

. Find a least squares solution of Ax = b.

Solution. We have to solve ATAx̂ = ATb:

ATA =

[1 1 1 1−1 0 1 2

]1 −11 01 11 2

=

[4 22 6

]

and,

ATb =

[1 1 1 1−1 0 1 2

]50510

=

[2020

].

Since [4 2 202 6 20

]R2→R2−1/2R1−−−−−−−−−→

[4 2 200 5 10

],

we obtain

x̂ =

[42

].

Problem 2. Let W = span

0101

,

0111

.

(a) Find an orthonormal basis for W .

(b) What is the orthogonal projection of

1210

onto W?

(c) Write

1000

as the sum of a vector in W and a vector in W⊥.

(d) Find the projection matrix corresponding to orthogonal projection onto W .2

Page 10: Math 415 Midterm 3 Exam Check List SP 2018

Solution.

(a) We apply Gram-Schmidt to {v1,v2} =

0101

,

0111

. We have:

u1 =v1

‖v1‖=

0101

0101

‖=

01√2

01√2

and,

u2 =v2 − (u1 · v2)u1

‖v2 − (u1 · v2)u1‖=

0111

− (

01√2

01√2

·

0111

)

01√2

01√2

0111

− (

01√2

01√2

·

0111

)

01√2

01√2

‖=

0010

0010

‖=

0010

Hence,

01√2

01√2

,

0010

is an orthonormal basis for W .

(b) Using the orthonormal basis {u1,u2} for W , we find that the orthogonal projection of

w =

1210

onto W is

(w · u1)u1 + (w · u2)u2 =

0111

.

(c)

1000

is orthogonal to W , therefore we have:

1000

=

1000

+

0000

,3

Page 11: Math 415 Midterm 3 Exam Check List SP 2018

where

1000

is orthogonal to W and

0000

is in W . (Hence, the projection of

1000

onto

W is

0000

.)

(d) We know that W = Col(

0 01√2

0

0 11√2

0

). Since the columns of Q =

0 01√2

0

0 11√2

0

are orthonormal,

the projection matrix onto W is:

QQT =

0 01√2

0

0 11√2

0

[0 1√2

0 1√2

0 0 1 0

]=

0 0 0 00 1

20 1

20 0 1 00 1

20 1

2

Here, we used Problem 4(a) from discussion problem set 11. However, you do not needto know this formula. An alternative way to compute the projection matrix is to projectthe standard unit vectors onto W . The results are the columns of the projection matrix.Observe how, in particular, the first column matches the observation in the previousproblem that the first standard basis vector gets projected to zero.

[Note: once we have the projection matrix, we can also find the projection in part (b) by

multiplication with the projection matrix, i.e.,

0 0 0 00 1

20 1

20 0 1 00 1

20 1

2

1210

.]

Problem 3. Find the QR decomposition of A =

4 25 00 0 −23 −25 0

.

Solution. We start with the columns of A(= [v1v2v3]) and we use Gram-Schmidt to find thecolumns of Q(= [q1q2q3]):

q1 =v1

‖v1‖=

403

403

‖=

45035

and,

q2 =v2 − (q1 · v2)q1

‖v2 − (q1 · v2)q1‖=

250−25

− (

45035

· 25

0−25

)

45035

250−25

− (

45035

· 25

0−25

)

45035

‖=

210−28

210−28

‖=

21350−28

35

=

350−4

5

4

Page 12: Math 415 Midterm 3 Exam Check List SP 2018

and,

q3 =v3 − (q1 · v3)q1 − (q2 · v3)q2

‖v3 − (q1 · v3)q1 − (q2 · v3)q2‖=

0−20

− (

45035

· 0−20

)

45035

− (

350−4

5

· 0−20

)

350−4

5

0−20

− (

45035

· 0−20

)

45035

− (

350−4

5

· 0−20

)

350−4

5

=

0−20

0−20

‖=

0−10

Hence,

Q =

45

35

00 0 −135−4

50

Finally:

R = QTA =

45

0 35

35

0 −45

0 −1 0

4 25 00 0 −23 −25 0

=

5 5 00 35 00 0 2

Problem 4. Find the least squares line for the data points (1, 1), (2, 1), (3, 4), (4, 4).

Solution. We have to find a and b (where the least squares line is y = ax + b) so that

[ab

]is

the least squares solution of:

Ax =

1 12 13 14 1

x =

1144

= b

We have to solve ATAx̂ = ATb:

ATA =

[1 2 3 41 1 1 1

]1 12 13 14 1

=

[30 1010 4

]ATb =

[1 2 3 41 1 1 1

]1144

=

[3110

]

we have: [30 10 3110 4 10

]R1→R1−3R2,R1↔R2−−−−−−−−−−−−→

[10 4 100 −2 1

]Hence,

x̂ =

[65−1

2

]Therefore, the least squares line for the given data is y = 6

5x− 1

2.

5

Page 13: Math 415 Midterm 3 Exam Check List SP 2018

Problem 5.

(a) Let A =

a b cd e fg h i

. Write down the cofactor expansion of det(A) along the second

column.(b) Let A = [a1 a2 a3] and B = [b1 b2 b3] be two 3× 3-matrices. Suppose that det(A) = 5

and b1 = a1, b2 = a1 + 2a2, b3 = a3. What is det(B)?

(c) Find det

1 1 1 11 1 4 41 −1 2 −21 −1 8 −8

.

(d) Find det

0 0 3 10 0 2 22 −1 1 11 0 −1 0

.

Solution.

(a) We have:

det(A) = −b det(

[d fg i

]) + e det(

[a cg i

])− h det(

[a cd f

])

(b) We have:

AC2→2C2,C2→C2+C1−−−−−−−−−−−−→ B

The first column operation multiplies the determinant by 2, and the second columnoperation does not change the value of the determinant. Hence,

det(B) = 2 det(A) = 10.

Note: Since det(A) = det(AT ), we have the same rules for column operations as we areused to for row operations. (That’s because a column operation on A is equivalent to arow operation on AT .)

(c) We use row operations to transform the matrix into an upper triangular matrix:

A =

1 1 1 11 1 4 41 −1 2 −21 −1 8 −8

R2→R2−R1,R3→R3−R1,R4→R4−R1−−−−−−−−−−−−−−−−−−−−−−→

1 1 1 10 0 3 30 −2 1 −30 −2 7 −9

R4→R4−R3,R3↔R2−−−−−−−−−−−−→

1 1 1 10 −2 1 −30 0 3 30 0 6 −6

R4→R4−2R3−−−−−−−→

1 1 1 10 −2 1 −30 0 3 30 0 0 −12

Since we swap rows once, and the other row operations that we used do not change thevalue of the determinant, we have:

det(A) = −[1.(−2).3.(−12)] = −72

(d) We use row operations to transform the matrix into an upper triangular matrix:

A =

0 0 3 10 0 2 22 −1 1 11 0 −1 0

R3→R3−2R4,R1→R1−3/2R2−−−−−−−−−−−−−−−−−→

0 0 0 −20 0 2 20 −1 3 11 0 −1 0

R1↔R4,R2↔R3−−−−−−−−−→

1 0 −1 00 −1 3 10 0 2 20 0 0 −2

6

Page 14: Math 415 Midterm 3 Exam Check List SP 2018

Since we swap rows twice, and the other row operations that we used do not change thevalue of the determinant, we have:

det(A) = −(−[1.(−1).2.(−2)]) = 4

[Note that this determinant is also pleasant to compute by expanding along the secondcolumn. Do it!]

Problem 6. Let A =

−1 0 1−3 4 10 0 2

.

(a) Find the eigenvalues of A, as well as a basis for the corresponding eigenspaces.(b) Diagonalize A. (That is, write A = PDP−1 where D is diagonal.)

Solution.

(a) We have:

det

−1− λ 0 1−3 4− λ 10 0 2− λ

= (2− λ)(4− λ)(−1− λ)

Hence, the eigenvalues of A are 2,4, and −1. For λ = 2:−3 0 1−3 2 10 0 0

R2→R2−R1,R2→1/2R2,R1→−1/3R1−−−−−−−−−−−−−−−−−−−−−→

1 0 −13

0 1 00 0 0

Hence, the corresponding eigenspace is span

1

03

.

For λ = 4:−5 0 1−3 0 10 0 −2

R3→−1/2R3,R2→R2−R3,R1→R1−R3,R2→R2−3/5R1,R3→−1/5R3−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−→

1 0 00 0 00 0 1

Hence, the corresponding eigenspace is span

0

10

.

For λ = −1: 0 0 1−3 5 10 0 3

R2→R2−R1,R3→R3−3R1,R2→−1/3R2−−−−−−−−−−−−−−−−−−−−−−−→

0 0 11 −5

30

0 0 0

Hence, the corresponding eigenspace is span

5

30

.

(b) The columns of P are (linearly independent) eigenvectors of A and D is the diagonal ma-trix with eigenvalues of A on the main diagonal in the appropriate order (correspondingto columns of P ). Therefore:

P =

1 0 50 1 33 0 0

D =

2 0 00 4 00 0 −1

7

Page 15: Math 415 Midterm 3 Exam Check List SP 2018

Problem 7. Consider the vector space

V = {f : R→ R : f is 7-periodic and f is “nice”}.Here, f “nice” means, for instance, that f should be piecewise continuous or (more generally)

that∫ 7

0f(t)2dt should be finite.

(a) What is a natural inner product on V ?

(b) Consider the 7-periodic function f(t) with f(t) =

{1, for 0 ≤ t < 3,2, for 3 ≤ t < 7.

Compute the orthogonal projection of f(t) onto the span of cos(32πt

7

).

Solution.

(a) A natural inner product on V is:

(f, g) =

∫ 7

0

f(t)g(t)dt

(b) The orthogonal projection of f(t) onto the span of cos(32πt

7

)is: (let g(t) = cos

(32πt

7

))

(f, g)

(g, g)g =

∫ 7

0f(t)g(t)dt∫ 7

0g(t)g(t)dt

g =

∫ 3

0cos(32πt

7

)dt+ 2

∫ 7

3cos(32πt

7

)dt∫ 7

0cos2

(32πt

7

)dt

g =76π

sin(6πt7

)|30 + 14

6πsin(6πt7

)|73∫ 7

0

1+cos(62πt7

)2

dt

g

=− 7

6πsin(18π7

)72

g = − 1

3πsin(4π7

)cos(32πt

7

)Problem 8. Consider the space P2 of polynomials of degree up to 2, together with the innerproduct

〈p(t), q(t)〉 =

∫ 1

0

p(t)q(t)dt.

(a) Is the standard basis 1, t, t2 an orthogonal basis?(b) Apply Gram–Schmidt to 1, t, t2 to obtain an orthonormal basis of P2.(c) What is the orthogonal projection of t2 onto span{1, t}?

Solution.

(a) Let us compute the inner products to find out:

〈1, t〉 =

∫ 1

0

sds =1

2

〈1, t2〉 =

∫ 1

0

s2ds =1

3

〈t, t2〉 =

∫ 1

0

s3ds =1

4

So, no, this is not an orthogonal basis.[Note: we are using s in the integral just so we don’t get confused when we write

down things like 〈t2, t〉t =∫ 1

0s3ds · t = 1

4t during Gram–Schmidt.]

(b) In the first step, we only normalize to get

q1(t) =1

〈1, 1〉=

1∫ 1

01ds

= 1.

In the second step of Gram–Schmidt, we calculate

b2(t) = t− 〈t, q1(t)〉q1(t) = t− 1

2,

8

Page 16: Math 415 Midterm 3 Exam Check List SP 2018

which we normalize to get

q2(t) =b2(t)√

〈b2(t), b2(t)〉=

t− 12√∫ 1

0

(s− 1

2

)2ds

=t− 1

2√13− 1

2+ 1

4

=√

12

(t− 1

2

).

In the third step of Gram–Schmidt, we calculate

b3(t) = t2 − 〈t2, q1(t)〉q1(t)− 〈t2, q2(t)〉q2(t)

= t2 −∫ 1

0

s2ds · 1−∫ 1

0

s2√

12

(s− 1

2

)ds ·√

12

(t− 1

2

)= t2 − 1

3− 12

∫ 1

0

(s3 − s2

2

)ds ·

(t− 1

2

)= t2 − 1

3− 12

(1

4− 1

6

)(t− 1

2

)= t2 − t+

1

6,

which we normalize to get

q3(t) =b3(t)√

〈b3(t), b3(t)〉

=t2 − t+ 1

6√∫ 1

0

(s2 − s+ 1

6

)2ds

=t2 − t+ 1

6√1/180

=√

180

(t2 − t+

1

6

).

We have found the orthonormal basis q1(t), q2(t), q3(t).(c) From our previous calculation, we know that

span{1, t} = span{q1(t), q2(t)}.Since q1(t) and q2(t) are orthonormal, the projection of t2 onto this span is

〈t2, q1(t)〉q1(t) + 〈t2, q2(t)〉q2(t)

=

∫ 1

0

s2ds · 1 +

∫ 1

0

s2√

12

(s− 1

2

)ds ·√

12

(t− 1

2

)= t− 1

6,

where we did the same calculation that we did for b3(t) during Gram–Schmidt.

9

Page 17: Math 415 Midterm 3 Exam Check List SP 2018

SHORT ANSWERS

Note: On the actual exam all short answer question will be multiple choice. You will be en-tering your answers to the multiple choice questions on a scantron sheet that will be includedwith your exam. So please bring a Number 2 pencil to the exam. Thanks.

Short Problem 1. If A and B are 3× 3 matrices with det(A) = 4 and det(B) = −1. Whatis the determinant of C = 2ATA−1BA?

Solution. We have:

det(C) = 23 det(AT ) det(A−1) det(B) det(A) = 23 det(A)1

det(A)det(B) det(A)

= 8 det(A) det(B) = −32

Short Problem 2. If A is an n × n matrix, and S is an invertible n × n matrix. Are thecharacteristic polynomial of A and SAS−1 equal? The determinant?

Solution. Yes, both the characteristic polynomial and the determinant are equal:

det(SAS−1) = det(S) det(A)1

det(S)= det(A),

anddet(SAS−1 − λI) = det(S(A− λI)S−1) = det(A− λI).

Short Problem 3. Let A be a 7 × 7 matrix with dim Nul(A) = 1. What can you say aboutdet(A)?

Solution. The null space of A contains a nonzero vector. Hence, Ax = 0 has a nonzerosolution, i.e., A is not invertible. Therefore, det(A) = 0.

Short Problem 4. Consider A =

1 1 0 01 −1 0 00 0 1 10 0 1 −1

.

(a) Using that the columns of A are orthogonal, find A−1.(b) Let w1, . . . ,w4 be the columns of A. Without solving equations, find coefficients

c1, . . . , c4 such that

1234

= c1w1 + . . .+ c4w4.

Solution.

(a) Since the columns of A are orthogonal, we have: (ATA is diagonal and entries on themain diagonal are lengths of the columns of A)

ATA =

2 0 0 00 2 0 00 0 2 00 0 0 2

= 2I

Hence, A−1 = 12AT =

12

12

0 012−1

20 0

0 0 12

12

0 0 12−1

2

.

10

Page 18: Math 415 Midterm 3 Exam Check List SP 2018

(b) We have to find c1, . . . , c4 so that

1234

= A

c1c2c3c4

. Hence, we have:

c1c2c3c4

= A−1

1234

=

12

12

0 012−1

20 0

0 0 12

12

0 0 12−1

2

1234

=

32−1

272−1

2

Short Problem 5. Let A be a n×n matrix with AT = A−1. What can you say about det(A)?

Solution. We have:

1 = det(I) = det(A−1A) = det(ATA) = det(AT ) det(A) = det(A)2

Hence, det(A) = 1 or, −1.

Short Problem 6. Let A be an n× n matrix with eigenvalue λ. Determine whether each ofthe following statements is correct.

(a) λ2 is an eigenvalue of A2.(b) λ−1 is an eigenvalue of A−1.(c) λ+ 1 is an eigenvalue of A+ I.(d) λ cannot be zero.

Solution.

(a) True, let v be an eigenvector of A corresponding to λ. We have:

A2v = A(Av) = A(λv) = λ(Av) = λ2v

Hence, λ2 is an eigenvalue of A2.(b) True (if A is invertible), let v be an eigenvector of A corresponding to λ. We have:

Av = λv ⇒ v = λA−1v ⇒ A−1v = λ−1v

Hence, λ−1 is an eigenvalue of A−1.(c) True, let v be an eigenvector of A corresponding to λ. We have:

(A+ I)v = Av + v = λv + v = (λ+ 1)v

Hence, λ+ 1 is an eigenvalue of A+ I.

(d) False, consider A =

[0 00 1

]Short Problem 7. Consider a matrix

Q =

1√3

1√14

?1√3

2√14

?1√3

−3√14

?

,in which the third column has not been specified, yet. Which of the following vectors can beadded as a third column of Q such that Q is orthogonal?

(a)

−541

,

(b)

−5√424√421√42

,

11

Page 19: Math 415 Midterm 3 Exam Check List SP 2018

(c)

001

,

(d) none of the above.

Solution. The vector should have length 1 and it should be orthogonal to the first two columns.Hence, (b) is the right answer.

Short Problem 8. True or false?

(a) If ATA is diagonal, then A has orthogonal columns.(b) If A is an orthogonal matrix, then AT is an orthogonal matrix.(c) If Ax = 0, then x is orthogonal to the columns of A.(d) For all n× n matrices A and B, det(AB) = det(A) det(B).(e) For all n× n matrices A and B, det(A+B) = det(A) + det(B).(f) Every orthonormal set of vectors is linearly independent.(g) Every subspace of Rn has an orthogonal basis.(h) If every row of A adds up to 0, then det(A) = 0.(i) If every row of A adds up to 1, then det(A) = 1.(j) If A is invertible and B is not invertible, then AB is invertible.(k) The determinant of A is the product of the diagonal entries of A.

Solution.

(a) True, note that the element in the ith row and jth column of ATA is the dot productof the ith column and the jth column of A.

(b) True, since ATA = AAT = I so AT is also orthogonal. (Note: (AT )TAT = AAT = I)

(c) False, consider A =

[0 10 0

]and x =

[10

]. In fact, we have that x is orthogonal to the

rows of A.(d) True.

(e) False, consider A =

[1 00 0

]and A =

[0 00 1

].

(f) True, since if v = c1v1 + . . .+ cnvn = 0 then 0 = v · vi = ci. Hence, all coefficients areequal to zero, i.e., they are linearly independent.

(g) True, every subspace of Rn has a basis and we can use Gram-Schmidt to find an or-thonormal basis.

(h) True, the condition gives us that A

11...1

= 0, thus Ax = 0 has a nonzero solution, i.e.,

A is not invertible. Hence, det(A) = 0.

(i) False, consider A =

[0 11 0

].

(j) False, AB is invertible if and only if both A and B are invertible.

(k) False, consider A =

[0 11 0

].

Short Problem 9. Suppose that the projection matrix corresponding to orthogonal projection

onto V is P = 130

29 −2 5−2 26 105 10 5

.

12

Page 20: Math 415 Midterm 3 Exam Check List SP 2018

(a) Is v =

−210

in V ?

(b) Find the vector in V which is closest to w =

110

.

(c) What is the dimension of V ?

Solution.

(a) We note that v is in V if and only if Pv = v. Since

Pv =1

30

29 −2 5−2 26 105 10 5

−210

=

−210

= v,

we conclude that v is in V .

(b) The vector in V which is closest to w =

110

is the orthogonal projection of w onto V .

Since we have the projection matrix, this projection is

Pw =1

30

29 −2 5−2 26 105 10 5

110

=1

10

985

.(c) First, note that V = Col(P ) (because the columns of P are the projections of the

standard basis vectors onto V ). Clearly, dim Col(P ) ≥ 2 (because the columns arenot just multiples of each other). Hence, dimV ≥ 2. On the other hand, V cannot bethree-dimensional, because we just saw that w is not in V . We conclude that dimV = 2.

13

Page 21: Math 415 Midterm 3 Exam Check List SP 2018

Math 415 -Summer- Midterm 3

Friday, July 28th, 2017

Name:

NetID:

UIN:

Problem 0. [1 point] Write down the letter of your discussion group (A or B) and in the second box writedown: “I am not stressed!”.

Discussion group:

To be completed by the grader:

0 1 2 3 4 5 True-False∑

/1 /15 /15 /15 /15 /15 /24 /100

Good luck!

1

Page 22: Math 415 Midterm 3 Exam Check List SP 2018

Instructions

• No notes, personal aids or calculators are permitted.• This exam consists of 7 pages. Take a moment to make sure you have all pages. There is plenty ofspace for calculations, that is why 7 pages, do not panic!

• You have enough time (50 minutes).• Answer all questions in the space provided. If you require more space to write your answer, youmay continue on the back of the page (make it clear if you do).

• Explain your work! Little or no points will be given for a correct answer with no explanation ofhow you got it.

• In particular, you have to write down all row operations for full credit.

Problem 1. [15 points] Let W = span

020

,

03−1

.

(a) [5 points]Find an orthonormal basis for W .

(b) [5 points] Write

123

as the sum of a vector in W and a vector in W⊥.

(c) [5 points] Find the projection matrix corresponding to orthogonal projection onto W .

2

Page 23: Math 415 Midterm 3 Exam Check List SP 2018

Problem 2. [15 points] Find the QR decomposition of A =

0 02 30 −1

. (Note the the column space of A is

the same as the space W in Problem 1, that might help to ease your calculations!)

3

Page 24: Math 415 Midterm 3 Exam Check List SP 2018

Problem 3. [15 points] Find the least squares line for the data points (1, 1), (2, 1), (3, 4), (4, 4).

4

Page 25: Math 415 Midterm 3 Exam Check List SP 2018

Problem 4. [15 points]

(a) [7 points] Let A =

a b cd e fg h i

. Write down the cofactor expansion of det(A) along the second column.

(b) [8 points] Let A =

...

......

a1 a2 a3

......

...

and A =

...

......

a1 a2 + 2a1 −a3

......

...

be two 3× 3-matrices (here a1,a2

and a3 are column vectors in R3). Suppose that det(A) = 5. What is det(B)?

5

Page 26: Math 415 Midterm 3 Exam Check List SP 2018

Problem 5. [15 points] Let A =

1 1 01 1 01 1 0

.(a) [5 points] Find the eigenvalues of A.

(b) [10 points] Find a basis of eigenvectors for A.

6

Page 27: Math 415 Midterm 3 Exam Check List SP 2018

TRUE-FALSE[24 points overall, 3 points each]

Circle True or False:

(a) If two matrices A and B are row equivalent, then det(A) = det(B). [TRUE/FALSE]

(b) If the null space of A is one dimensional, then 0 is an eigenvalue of A. [TRUE/FALSE]

(c) If an oriented network (with at least one node) has no cycles and its edge-node incidence matrix is A,thendim(Nul(A)) = 0.[TRUE/FALSE]

(d) The inverse of an orthogonal matrix is also an orthogonal matrix.[TRUE/FALSE]

(e) The edge-node incidence matrix of a network (with at least one node) is always non invertible.[TRUE/FALSE]

(f) If P is a projection matrix, then P 2 = 0.[TRUE/FALSE]

(g) If {v1, v2} is an orthonormal basis of R2, then {v1, v1 + v2} is always an orthonormal basis of R2.[TRUE/FALSE]

(h) If A is a square matrix, det(A5) = (det(A))5. [TRUE/FALSE]

7

Page 28: Math 415 Midterm 3 Exam Check List SP 2018

Math 415 -Summer- Midterm 3: Solutions

Friday, July 28th, 2017

Name:

NetID:

UIN:

Problem 0. [1 point] Write down the letter of your discussion group (A or B) and in the second box writedown: “I am not stressed!”.

Discussion group:

To be completed by the grader:

0 1 2 3 4 5 True-False∑

/1 /15 /15 /15 /15 /15 /24 /100

Good luck!

1

Page 29: Math 415 Midterm 3 Exam Check List SP 2018

Instructions

• No notes, personal aids or calculators are permitted.• This exam consists of 7 pages. Take a moment to make sure you have all pages. There is plenty of

space for calculations, that is why 7 pages, do not panic!• You have enough time (50 minutes).• Answer all questions in the space provided. If you require more space to write your answer, you

may continue on the back of the page (make it clear if you do).• Explain your work! Little or no points will be given for a correct answer with no explanation of

how you got it.• In particular, you have to write down all row operations for full credit.

Problem 1. [15 points] Let W = span

0

20

, 0

3−1

.

(a) [5 points]Find an orthonormal basis for W .By Gram-Schmidt, we get that

q1 =

010

, b2 =

03−1

− 〈 0

3−1

,0

10

〉0

10

=

00−1

.Therefore

q2 =

001

,so an orthonormal basis for W is

010

,0

01

.

(b) [5 points] Write

123

as the sum of a vector in W and a vector in W⊥.

It follows from item (a) that

W⊥ =

1

00

.

That means that 123

=

023

+

100

,where the first vector belongs to W and the second belongs to W⊥.

(c) [5 points] Find the projection matrix corresponding to orthogonal projection onto W . We have that

PW = [PW (e1), P (e2), PW (e3)] =

0 0 00 1 00 0 1

2

Page 30: Math 415 Midterm 3 Exam Check List SP 2018

Problem 2. [15 points] Find the QR decomposition of A =

0 02 30 −1

.

By Problem 1, we have that 0

10

,0

01

is an orthonormal basis for the column space of A. Therefore

Q =

0 01 00 1

and

R = QTA =

[2 30 −1

]Problem 3. [15 points] Find the least squares line for the data points (1, 1), (2, 1), (3, 4), (4, 4).

The best fitting line has the form y = β1 + β2x, with matrix form1 11 21 31 4

β =

1144

.The normal equation is

XTXβ̂ = Xty]

therefore [4 1010 30

] [β1β2

]=

[1031

],

so

β1 = −11

2, β2 =

6

5and

y = −1

2+

6

5x

Problem 4. [15 points]

(a) [7 points] Let A =

a b cd e fg h i

. Write down the cofactor expansion of det(A) along the second column.

det(A) = −bdet(

[d fg i

]) + e det(

[a cg i

])− hdet(

[a cd f

])

= −b(di− fg) + e(ai− cg)− h(af − cd).

(b) [8 points] Let A = [a1 a2 a3] and B = [b1 b2 b3] be two 3× 3-matrices. Suppose that det(A) = 5 and

b1 = a1, b2 = a2 + 2a1, b3 = −a3.

What is det(B)?The matrix B can be obtained from the matrix A by a replacement for the second column (which leavesthe determinant the same) and a scaling (by -1) for the third column. Therefore det(B) = −det(A) =−5.

3

Page 31: Math 415 Midterm 3 Exam Check List SP 2018

Problem 5. [15 points] Let A =

1 1 01 1 01 1 0

.

(a) [5 points] Find the eigenvalues of A.The characteristic polynomial of A is

p(λ) = det(A− λI) = det

1− λ 1 01 1− λ 01 1 −λ

= λ2(2− λ).

Therefore the eignevalues of A are 0 (with multiplicity 2) and 2.(b) [10 points] Find a basis of eigenvectors for A.

For λ = 0, we find a basis for Nul(A). Since A is row equivalent to

1 1 00 0 00 0 0

, the null space has basis

−1

10

,0

01

.

For λ = 2, we find a basis for the null space of

B =

−1 1 01 −1 01 1 −2

.The RREF of B is 1 0 −1

0 1 −10 0 0

.Thus, the null space is 1 dimensional and spanned by1

11

.Therefore a basis of eigenvectors for A is

−110

,0

01

,1

11

.

4

Page 32: Math 415 Midterm 3 Exam Check List SP 2018

TRUE-FALSE[24 points overall, 3 points each]

Circle True or False:

(a) If two matrices A and B are row equivalent, then det(A) = det(B). [TRUE/FALSE] FALSE. Scalinga matrix scales the determinant.

(b) If the null space of A is one dimensional, then 0 is an eigenvalue of A. [TRUE/FALSE] TRUE. If thenull space is non trivial, and that implies that Ax = 0 has non trivial solutions, thus 0 is an eigenvalue.

(c) If an oriented network has no cycles and its edge-node incidence matrix is A, thendim(Nul(A)) = 0.[TRUE/FALSE]. FALSE. It implies that dim(Nul(AT )) = 0.

(d) The inverse of an orthogonal matrix is also an orthogonal matrix.[TRUE/FALSE] TRUE. IF U isorthogonal, then UT is also orthogonal.

(e) The edge-node incidence matrix of a network is always singular.[TRUE/FALSE] TRUE. The nullspace of the edge-node incidence matrix is always non trivial, since its dimension is the number ofconnected components.

(f) If P is a projection matrix, then P 2 = 0.[TRUE/FALSE] FALSE. P 2 = P .(g) If {v1, v2} is an orthonormal basis of R2, then {v1, v1 + v2} is always an orthonormal basis of R2.

[TRUE/FALSE] FALSE. Consider the standar basis of R2, the basis {e1, e1 + e2} is not orhonormal.(h) If A is a square matrix, det(A5) = (det(A))5. [TRUE/FALSE].

TRUE. It follows from the property that det(AB) = det(A) det(B).

5

Page 33: Math 415 Midterm 3 Exam Check List SP 2018

Math 415 Exam # 3 - July 2016

1. (10 pts) P1 is the vector space of linear functions of t, with standard basis {1, t}.Use the Gram-Schmidt procedure to find a new basis that is orthonormal onthe interval [0, 1]. This means you start with a(t) = 1 and b(t) = t and use theinner-product

(p, q) =

∫ 1

0

p(t)q(t)dt

2. (10 pts)

(a) (3 pts) Under what conditions on a and k is the following matrix invertible?

A =

a 3 22 0 −k1 3 1

(b) (4 pts) Find the unique value of x2 that satisfies the following system

(assuming the condition from part (a) is satisfied):

ax1 + 3x2 + 2x3 = 0

2x1 − kx3 = 0

x1 + 3x2 + x3 = 1

(c) (3 pts) Find a formula that gives the area of a triangle in the plane whosethree vertices are at (a, b), (c, d) and (e, f).

3. (10 pts)

(a) (3 pts) If x = a + ib and y = c + id, demonstrate explicitly that xy = x y.

(b) (7 pts) Find all eigenvalues and eigenvectors of

A =

[2 −42 −2

]4. (15 pts) Here is a matrix and its eigenvalue and eigenvector information:

A =

[56−1

6

−13

23

], A

[12

]=

1

2

[12

], A

[−11

]=

[−11

](a) (6 pts) Compute explicitly the matrix A10.

(b) (3 pts) Find the solution of

du

dt= Au, u(0) =

[10

](c) (6 pts) Compute limn→∞An as an explicit 2× 2 matrix.

1

Page 34: Math 415 Midterm 3 Exam Check List SP 2018

5. (15 pts)

(a) (3 pts)√

2eπ4i is the complex number

A√

2i

B −√

2iC 1 + iD 1− i

(b) (3 pts) If a matrix B is 4× 4 and has eigenvalues 0, 2, 2, 5, then BA definitely isB may not beC definitely is not

diagonalizable.

(c) (2 pts) If A is a 3× 3 invertible matrix, then det(2A−1) isA 2

detA

B 18 detA

C 8detA

D 12 detA

(d) (1 pt) True or false? The value of the determinant of a matrix is unaffectedby adding a multiple of one column to another.A TrueB False

(e) (3 pts) A matrix has eigenvalues 1, 2, 3, 5, none repeated. ThenA The eigenvectors are linearly independentB The matrix is invertibleC The matrix is diagonalizableD All of the above

(f) (3 pts) Consider the matrix

A =

x x x x0 0 0 xx x x xx x x x

where the x’s are in general (different) non-zero numbers. Then the numberof non-zero terms in the permutation sum formula for detA isA 2B atleast 8C at most 6D 24

2

Page 35: Math 415 Midterm 3 Exam Check List SP 2018

Math 415 Exam # 3 - July 2016 - Solutions

1. (10 pts) P1 is the vector space of linear functions of t, with standard basis {1, t}.Use the Gram-Schmidt procedure to find a new basis that is orthonormal onthe interval [0, 1]. This means you start with a(t) = 1 and b(t) = t and use theinner-product

(p, q) =

∫ 1

0

p(t)q(t)dt

Solution:

‖a‖2 =

∫ 1

0

12dt = t|10 = 1⇒ q1(t) = 1

B = t−(∫ 1

0

t× 1dt

)1 = t−

(t2

2

∣∣∣∣10

)= t− 1

2

‖B‖2 =

∫ 1

0

(t− 1

2

)2

dt =t3

3− t2

2+t

4

∣∣∣∣10

=1

3− 1

2+

1

4=

1

12⇒ q2(t) =

√12(t− 1

2) =√

3(2t− 1)

2. (10 pts)

(a) (3 pts) Under what conditions on a and k is the following matrix invertible?

A =

a 3 22 0 −k1 3 1

Solution:

detA =

∣∣∣∣∣∣a 3 22 0 −k1 3 1

∣∣∣∣∣∣ = 3ak − 3k + 6 6= 0

(b) (4 pts) Find the unique value of x2 that satisfies the following system(assuming the condition from part (a) is satisfied):

ax1 + 3x2 + 2x3 = 0

2x1 − kx3 = 0

x1 + 3x2 + x3 = 1

Solution: By Cramer’s rule we have

x2 =

∣∣∣∣∣∣a 0 22 0 −k1 1 1

∣∣∣∣∣∣detA

=

−∣∣∣∣ a 2

2 −k

∣∣∣∣detA

=ak + 4

3ak − 3k + 61

Page 36: Math 415 Midterm 3 Exam Check List SP 2018

(c) (3 pts) Find a formula that gives the area of a triangle in the plane whosethree vertices are at (a, b), (c, d) and (e, f).Solution: Two sides of the triangle are (c, d)− (a, b) = (c− a, d− b) and(e, f)− (a, b) = (e− a, f − b), so

Area =1

2Abs

(∣∣∣∣ c− a e− ad− b f − b

∣∣∣∣) =1

2|(c− a)(f − b)− (d− b)(e− a)|

3. (10 pts)

(a) (3 pts) If x = a+ ib and y = c+ id, demonstrate explicitly that xy = x y.Solution:

x y = (a− ib)(c− id) = (ac+ i2bd)− i(ad+ bc) = (ac− bd)− i(ad+ bc)

x y = (a+ ib)(c+ id) = (ac+ i2bd) + i(ad+ bc) = (ac− bd) + i(ad+ bc)

xy = (ac− bd)− i(ad+ bc) = x y

(b) (7 pts) Find all eigenvalues and eigenvectors of

A =

[2 −42 −2

]Solution:

0 =

∣∣∣∣ 2− λ −42 −2− λ

∣∣∣∣ = λ2 − 4 + 8 = λ2 + 4⇒ λ1 = 2i, λ2 = −2i

For an eigenvector for λ1, we have[2− 2i −4

2 −2− 2i

] [ab

]=

[00

]and so 2a = 2(1 + i)b. Thus we can use

x1 =

[1 + i

1

]and x2 = x1 =

[1− i

1

]4. (15 pts) Here is a matrix and its eigenvalue and eigenvector information:

A =

[56−1

6

−13

23

], A

[12

]=

1

2

[12

], A

[−11

]=

[−11

](a) (6 pts) Compute explicitly the matrix A10.

Solution:

A =

[1 −12 1

] [12

00 1

] [1 −12 1

]−1so

A10 =

[1 −12 1

] [(12)10 00 110

] [1 −12 1

]−1=

1

3

[1210

+ 2 1210− 1

129− 2 1

29+ 1

]2

Page 37: Math 415 Midterm 3 Exam Check List SP 2018

(b) (3 pts) Find the solution of

du

dt= Au, u(0) =

[10

]

Solution: The solution is etAu(0), i.e.

u(t) =

[23et + 1

3e

12t 1

3e

12t − 1

3et

23e

12t − 2

3et 1

3et + 2

3e

12t

] [10

]=

[23et + 1

3e

12t

23e

12t − 2

3et

](c) (6 pts) Compute limn→∞A

n as an explicit 2× 2 matrix.Solution:

An =

[1 −12 1

] [ (12

)n0

0 1n

] [1 −12 1

]−1and therefore

limn→∞

An =

[1 −12 1

] [0 00 1

] [1 −12 1

]−1=

[23−1

3

−23

13

]5. (15 pts)

(a) (3 pts)√

2eπ4i is the complex number

A√

2i

B −√

2i

C 1 + iD 1− i

(b) (3 pts) If a matrix B is 4× 4 and has eigenvalues 0, 2, 2, 5, then BA definitely is

B may not beC definitely is not

diagonalizable.

(c) (2 pts) If A is a 3× 3 invertible matrix, then det(2A−1) isA 2

detA

B 18 detA

C 8detA

D 12 detA

(d) (1 pt) True or false? The value of the determinant of a matrix is unaffectedby adding a multiple of one column to another.

A TrueB False

3

Page 38: Math 415 Midterm 3 Exam Check List SP 2018

(e) (3 pts) A matrix has eigenvalues 1, 2, 3, 5, none repeated. ThenA The eigenvectors are linearly independentB The matrix is invertibleC The matrix is diagonalizable

D All of the above

(f) (3 pts) Consider the matrix

A =

x x x x0 0 0 xx x x xx x x x

where the x’s are in general (different) non-zero numbers. Then the numberof non-zero terms in the permutation sum formula for detA isA 2B atleast 8

C at most 6D 24

4