Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Mathematics ( – )

Exam

Answers

. ( points) Among all the unit vectors u = (u1 , u2 , u3 , u4 ) ∈ R4 , nd the one for which the
sum 4u1 − 2u2 + 3u4 is minimal.

Answer

Introduce the vector  


4
−2
 
v =  .
0
3
Then we can write 4u1 − 2u2 + 3u4 = v · u. By the Cauchy-Schwarz theorem, it follows that

−∥v∥∥u∥ ≤ v · u ≤ ∥v∥∥u∥,

with equality only if v = λu. The lower equality holds if λ < 0, and the upper if λ > 0.

Hence v · u is minimal if
1
u= v
λ
and λ < 0. We derive a condition for λ by using that u is a unit vector, whence

1
1 √ 2 2 2 2
29
1 = v = 4 + (−2) + 0 + 3 =
λ |λ| |λ|

It follows that √
λ = − 29

and 

4
1 −2

u = −√   .
29  0 
3

© Florian Wagener, UvA,


. ( points) Let ( )
−2 −2 −2 −2
A= .
2 4 6 8

Find an orthonormal basis of the kernel of A.

Answer

First we nd a basis for ker(A) by solving Ax = 0.


( ) ( ) ( ) ( )
−2 −2 −2 −2 1 1 1 1 1 1 1 1 1 0 −1 −2
∼ ∼ ∼
2 4 6 8 0 2 4 6 0 1 2 3 0 1 2 3

We conclude that
   

 1 2 
−2 −3
 
   
ker(A) = span {v1 , v2 } = span   ,   .

 1   0 


 

0 1

Apply Gram–Schmidt to nd an orthonormal basis.



1
1 1 
−2

u1 = v1 = √  
∥v1 ∥ 6 1 
0
v2⊥ = v2 − (u1 · v2 )u1
     
2 1 2/3
−3 1 −2 −1/3
     
=   − (2 + 6)   =  
0 6  1  −4/3
1 0 1
 
2
1 ⊥ 1 −1

u2 = ⊥ v2 = √  
∥v2 ∥ 30 −4
3

The set {u1 , u2 } is an orthonormal basis for ker(A).

© Florian Wagener, UvA,


. ( points) Fit a quadratic polynomial to the data points (−1, 20), (0, 0), (1, 0) and (2, 0) using
least squares. Sketch the data points and the solution.

Answer

The model to be tted is of the form

y = c1 + c2 x + c3 x2 .

From the given data points, we infer the design matrix X and the vector Y of observed outputs
   
1 −1 1 20
1 0 0  0
   
X= , Y =  .
1 1 1  0
1 2 4 0

Note that the columns of X are linearly independent. The least squares solution c of the equation
Y = Xc is the solution to the exact matrix equation

X T Y = X T Xc.

Compute
    

1 1 1 1 4 2 6 20
     
X T = −1 0 1 2 , X T X = 2 6 8  , and X T Y = −20 .
1 0 1 4 6 8 18 20

To solve the equation X T Xc = X T Y , we use the Gauss–Jordan method


       
4 2 6 20 1 3 4 −10 1 3 4 −10 1 0 0 3
       
2 6 8 −20 ∼ 0 −10 −10 60  ∼ 0 1 1 −6  ∼ 0 1 0 −11
6 8 18 20 0 −10 −6 80 0 0 4 20 0 0 1 5

We nd that c1 = 3, c2 = −11 and c3 = 5, and that the best least squares t is

y = 3 − 11x + 5x2 .

Data points and tted function are plotted in Figure .

© Florian Wagener, UvA,


y
25

20

15

10

-1.0 -0.5 0.5 1.0 1.5 2.0 2.5


x

Figure : Data points and tted quadratic polynomial.

© Florian Wagener, UvA,


. ( points) Suppose a real 3 × 3 matrix A has only two distinct eigenvalues. Suppose that
tr(A) = 1 and det(A) = 3. Find all possible pairs of eigenvalues of A with their algebraic
multiplicities.

Answer

Let λ1 and λ2 be the two distinct eigenvalues, and assume that λ1 occurs with algebraic multiplicity
2. Then
tr(A) = 2λ1 + λ2 = 1 and det(A) = λ21 λ2 = 3.

These are two equations for two unknowns. As the determinant is nonzero, no eigenvalue can be
zero. From the second equation, we derive λ2 = 3/λ21 . Substitution into the rst yields

2λ1 + 3/λ21 = 1

whence we derive
2λ31 − λ21 + 3 = 0.

This equation is satis ed by λ1 = −1. Dividing out the corresponding linear factor (λ1 + 1) yields

0 = 2λ31 − λ21 + 3 = (λ1 + 1)(2λ21 − 3λ1 + 3)

The second equation can be factored by completing the square


(( )2 ) ( √ )( √ )
3 15 3 15 3 15
2λ21 − 3λ1 + 3 = 2 λ1 − + = 2 λ1 − + i λ1 − − i
4 16 4 4 4 4

We nd that there are three possibilities.

λ1 (mult. 2) λ2 (mult. 1)
−1 3
√ √
3
4 +i 15
4 − 12 − i 15
2
√ √
3
4 −i 15
4 − 12 + i 15
2

However, as we know that the matrix is real, the complex eigenvalues should appear in complex
conjugate pairs of equal multiplicity. This implies that the latter two possibilities cannot occur,
and we are le with an eigenvalue −1 of multiplicity 2 and an eigenvalue 3 of multiplicity 1.

© Florian Wagener, UvA,


. ( points) On the surface

−x21 + x22 − x23 + 10x1 x3 = 1

nd the two points closest to the origin.

Answer

If    
x1 −1 0 5
   
x = x2  and A =  0 1 0  ,
x3 5 0 −1
then
−x21 + x22 − x23 + 10x1 x3 = x · Ax.

We determine the eigenvalues and a corresponding orthogonal eigenbasis of A. The characteristic


equation reads as
 
−1 − λ 0 5
 
det(A − λI) = det  0 1−λ 0 
5 0 −1 − λ
= {develop along the second column}
( )
= (1 − λ) (−1 − λ)2 − 25 = (1 − λ)(−1 − λ − 5)(−1 − λ + 5)
= −(λ − 1)(λ + 6)(λ − 4)

The eigenvalues are 1, −6 and 4. The corresponding eigenspaces are


   
−2 0 5 
 0  
   
E1 = ker  0 0 0  = span 1 ,

 0  
5 0 −2

   
5 0 5 
 1 
   
E−6 = ker 0 7 0 = span 0 ,

 −1 

5 0 5

   
−5 0 5 
 1 

   
E4 = ker  0 −3 0  = span   .
0

 1 

5 0 −5

© Florian Wagener, UvA,


An orthogonal diagonalising matrix is

√ √ 
1/ 2 0 −1/ 2
 
C= 0 1 0 ,
√ √
1/ 2 0 1/ 2

then
 
4 0 0
 
C T AC = D = 0 1 0  .
0 0 −6

Putting y = C T x, the surface has the equation

1 = x · Ax = x · CDC T x = y · Dy = 4y12 + y22 − 6y32 .

Writing this as
y12 + y22 + y32 = 1 − 3y12 + 7y32 ,

it is clear that the smallest values for ∥y∥2 , and hence for ∥y∥, can be achieved if y32 is as small as
possible and y12 is as large as possible. Setting y3 = 0 and rewriting results in

4y12 = 1 − y22 .

The largest possible value for y12 is then obtained if y2 = 0 and y1 = 1/2 or y1 = −1/2.

We conclude that the nearest points to the origin are the points y = (1/2, 0, 0) and y =
(−1/2, 0, 0).

Going back to the original coordinates x = Cy, we nd that


   √     √ 
1/2 1/(2 2) −1/2 −1/(2 2)
       
C 0 =
√ 
and C  0  = 
√ 
0 0
0 1/(2 2) 0 −1/(2 2)

are the two points on the surface closest to the origin, as C is orthogonal and preserves distances.

© Florian Wagener, UvA,


. ( points) Find an approximation L of log(1.1) such that | log(1.1) − L| < 10−3 . (Recall that
log x is the preferred notation for the ‘natural’ logarithm, which is also sometimes denoted by ln x.)

Answer

To apply Taylor’s theorem to log(1 + x) at a = 0 for x = 0.1, we have to make an initial estimate
the degree of the Taylor polynomial that will furnish us a good approximation. The remainder term
is of the form

f (n+1) (0.1ϑ)
Rn = (0.1)n+1 .
(n + 1)!

To estimate these remainders for increasing values of n, compute the derivatives of f (x) = log(1 +
x).

1
f ′ (x) = ,
1+x
1
f ′′ (x) = − ,
(1 + x)2
2
f (3) (x) = .
(1 + x)3

The corresponding estimates are



1 0.01

|R1 | = 2
(0.1) ≤ = 0.005 > 10−3 ,
2!(1 + 0.1ϑ)2 2

2 0.002

|R2 | = 3 −3
3!(1 + 0.1ϑ)3
(0.1) ≤ 6 ≤ 0.0003334 < 10 .

It follows that a second order Taylor approximation satis es the requirement. The second degree
Taylor polynomial of log(1 + x) at a = 0 reads as

f ′′ (0) 2 x2
T2 (x) = f (0) + f ′ (0)x + x =x− ,
2 2
furnishing the approximation

0.01
L = 0.1 − = 0.095,
2
whose distance to log(1.1) is less than 0.005.

© Florian Wagener, UvA,


. ( points) Let f : R2 → R be given as

x31 x3
f (x) = − − x21 x2 − x1 x22 − 2 − x21 + 2x1 x2 − x22 + x1 + x2
3 3
Find all local maxima of f .

Answer
( )
∂f ∂f
A local maximiser satis es the equation Df (x) = ∂x1 ∂x2 = 0. Compute

∂f
0= = −x21 − 2x1 x2 − x22 − 2x1 + 2x2 + 1,
∂x1
∂f
0= = −x21 − 2x1 x2 − x22 + 2x1 − 2x2 + 1
∂x2

Subtracting the second equation om the rst yields the system

0 = −4x1 + 4x2 ,
0 = −x21 − 2x1 x2 − x22 + 2x1 − 2x2 + 1.

It follows that x2 = x1 and


0 = −4x21 + 1.

Hence the critical points are a = (1/2, 1/2) and b = (−1/2, −1/2), and the critical values are
f (a) = 2/3 and f (b) = −2/3.

To determine whether these are local maxima, compute the Hessian matrix
  ( )
∂2f ∂2f
 ∂x2 1
2 ∂x1 ∂x2  −2x1 − 2x2 − 2 −2x1 − 2x2 + 2
Hf (x) = ∂2f
= .
∂ f −2x1 − 2x2 + 2 −2x1 − 2x2 − 2
∂x1 ∂x2 ∂x22

At the critical points, we obtain


( ) ( )
−4 0 0 4
Hf (a) = , Hf (b) = .
0 −4 4 0

The critical point a is clearly a local maximiser, whereas for the second critical point b, we have
det Hf (b) = −16, hence one eigenvalue is positive and one negative. It follows that b is neither a
maximiser nor a minimiser.

The unique local maximum of f is f (a) = 2/3.

© Florian Wagener, UvA,


. ( points) Prove the following theorem.

A square matrix A is diagonalisable if and only if there exists an eigenbasis for A.

Answer

Assume that A is an n × n matrix.

If A is diagonalisable, then there is a diagonal matrix D and an invertible matrix C, such that
C −1 AC = D. Denote( the diagonal)elements of D by λ1 , . . ., λn and the columns of C by
vi , that is, write C = v1 . . . vn . As C is invertible, the set {v1 , . . . , vn } forms a basis.
Moreover, since we can write AC = CD, and since vi = Cei , we nd that Avi = ACei =
CDei = Cλi ei = λi Cei = λi vi . Hence the vi , which are necessarily nonzero, are eigenvectors,
and {v1 , . . . , vn } is therefore an eigenbasis.
( )
If A has an eigenbasis of eigenvectors vi satising Avi = λi vi , then the matrix C = v1 . . . vn
is invertible. Compute the i’th column of the matrix C −1 AC, using that Cei = vi and C −1 vi =
ei by evaluating

C −1 ACei = C −1 Avi = C −1 λi vi = λi C −1 vi = λi ei .

It follows that
 
λ1 0 . . . 0
 
 0 λ2 
−1 
C AC =  . 
. . . 
. . 
0 λn

is diagonal and that A is diagonalisable.

© Florian Wagener, UvA,

You might also like