S = {v : hv, si = 0 s S}.
To prove that N (At ) = R(A) for any real m n matrix A, we use a double inclusion proof, that is,
Suppose that z R(A) , i.e. hz, yi = 0 y R(A), or using our convention [which allows
us to express inner products in terms of matrix products], zt y = 0 y R(A). Now, since
Ax R(A) x Rn , we have
But, this is true x Rn , and so we have At z = 0. Thus, z N (At ) and R(At ) N (At ).
Suppose that z N (At ), i.e. At z = 0. Now, for any y R(A), x Rn such that y = Ax,
thus
At z = 0 = xt At z = 0 = (Ax)t z = 0 = hy, zi = 0,
where, once again, we have used our convention. So, z is orthogonal to any y R(A), i.e.
z R(A) . Thus, N (At ) R(A) .
Consequently, N (At ) = R(A) (as required).
(b) We are asked to find an orthonormal basis for the subspace S of R4 spanned by the vectors
v1 = [1, 0, 2, 0]t , v2 = [0, 2, 1, 0]t and v3 = [0, 1, 1, 0]t . To do this, we use the Gram-Schmidt procedure:
Taking v1 = [1, 0, 2, 0]t , we note that kv1 k2 = 1 + 0 + 4 + 0 = 5 and set e1 = 1 [1, 0, 2, 0]t .
5
u2 = v2 hv2 , e1 ie1 ,
which as
0+0+2+0 2
hv2 , e1 i = = ,
5 5
gives us
0 1 2
2 2 0 1 10
u2 =
1 5 2 = 5 1 .
0 0 0
But, we are only interested in the direction of u2 , and so we set u2 = [2, 10, 1, 0]t . Thus,
1
noting that ku2 k2 = 4 + 100 + 1 + 0 = 105 we set e2 = 105 [2, 10, 1, 0]t .
which as
0+0+2+0 2
hv3 , e1 i = = ,
5 5
and
0 + 10 + 1 + 0 11
hv3 , e2 i = = ,
105 105
1
gives us
0 1 2 4
1 2 0
u3 = 11 10 = 1 1 .
1 5 2 105 1 21 2
0 0 0 0
But, we are only interested in the direction of u3 , and so we set u3 = [4, 1, 2, 0]t . Thus,
noting that ku3 k2 = 16 + 1 + 4 + 0 = 21 we set e3 = 121 [4, 1, 2, 0]t .
We are then asked to find the orthogonal complement of S. It should be obvious that the vector
[0, 0, 0, 1]t is orthogonal to each of the vectors in the set {e1 , e2 , e3 } (or indeed, {v1 , v2 , v3 }), and so
this vector lies in S . Thus, as there can be no more than four orthogonal vectors in any subset of
R4 , we have
0
0
S = Lin 0 .
1
(c) The direct sum of two subspaces X and Y of a vector space, denoted by X Y , is the sum of X
and Y , i.e.
X + Y = {x + y : x X and y Y },
where z X + Y , z can be written in the form x + y (where x X and y Y ) in just one way.
To show that: If S is a subspace of Rn , then S S = Rn , we take {e1 , . . . , ek } to be an orthonormal
basis of S, and extend this to an orthonormal basis of Rn , i.e. Rn = Lin{e1 , . . . , ek , ek+1 , . . . , en }.
Now, we know that for any set S Rn , S is a subspace of Rn and it should be clear that
S = Lin{ek+1 , . . . , en }
Thus, Rn = SS since Rn = S+S and any x Rn can be written in the form x = y+z (where y
S = Lin{e1 , . . . , ek } and z S = Lin{ek+1 , . . . , en }) in just one way as {e1 , . . . , ek , ek+1 , . . . , en } is
a basis of Rn .
In (b), we had
1 2 4
0
1 1 10 1 1
0 0 ,
S = Lin 2
, , and S
= Lin
5
105 1 21 2
0
0 0 0 1
and as the orthonormal basis for S and the basis for S form an orthonormal basis for R4 , it is clear
that S S = R4 .
(d) To prove that the null-space of a real m n matrix A is a subspace of Rn , we note that the
null-space is defined to be the set of vectors
N (A) = {x Rn : Ax = 0},
and so it is clearly a subset of Rn . To show that it is a subspace, we need to establish that it is also
closed under vector addition and scalar multiplication:
2
For any two vectors x, y N (A), i.e. x and y are such that Ax = 0 and Ay = 0, we ask: Is
x + y N (A)? The answer is yes since:
A(x + y) = Ax + Ay = 0 + 0 = 0,
For any vector x N (A), i.e. x is such that Ax = 0, and any scalar R, we ask: Is
x N (A)? The answer is yes since:
A(x) = (Ax) = 0 = 0,
3
Question 2.
(a) An eigenvalue 1 is called dominant if for any other eigenvalue , || < 1 .
(b) The Leslie matrix for this species is:
0 7 6
L = 21 0 0 .
1
0 3 0
To find the eigenvalues of this matrix, we have to solve the determinant equation:
7 6
1
|L I| = 0 = 2 0 = 0 = 3 27 1 = 0.
0 1
3
Using trial-and-error we find that 1 = 2 is a solution, and hence an eigenvalue of L. To find the
others, we divide the polynomial 3 72 1 by 2 to get the quadratic
1
2 + 2 + = 0,
2
and solving this, we find that the remaining two eigenvalues are 2,3 = 1 12 . (Notice that both
of these are negative!) To establish that the unique positive real eigenvalue, i.e. = 2, is dominant
we note that
|2 | = | 1 + 12 | = | 0.29| = 0.29 < 2 = 1 ,
and,
|3 | = | 1 1 | = | 1.71| = 1.71 < 2 = 1 ,
2
(as required).
To find an eigenvector, v1 , corresponding to = 2, you can either recall that
1 1
v1 = b1 /1 = 1/4 ,
b1 b2 /21 1/24
from the lectures, or you can find an eigenvector in the normal way by solving the matrix equation
(L 2I)v1 = 0.
As the unique real positive eigenvalue is dominant, the long-term behaviour of this population is
described by two relations:
x(k) ' c2k v1 and so the proportion of the population in each age class is, in the long run,
constant and given by the ratio 1 : 14 : 24
1
.
x(k) ' 2x(k1) and so the population in each age class grows by a factor of 2 (i.e. increases by
100%) every time period, which in this case is every 10 years.
To find the eigenvalues of this matrix, we have to solve the determinant equation:
0 2
1
|L I| = 0 = 6 0 = 0 = 3 27 1
= 0,
0 1
9
and so we find that the solutions are = 13 e2ni/3 where we only need to consider the cases where
n = 1, 2, 3. Thus, the eigenvalues are:
4
1
1 = if n = 0 (this is the unique positive real eigenvalue),
3
1
2 = 13 cos 2 2
3 + i sin 3 = 6 (1 + i 3) if n = 1, and
1
3 = 13 cos 4
3 + i sin 4
3 = 6 (1 i 3) if n = 2.
To establish that the unique dominant eigenvalue (i.e. 1 ) is not dominant, we note that |2,3 | <
6 1
as
|2,3 | = 16 (1 i 3) = 16 1 i 3 = 61 1 + 3 = 13 = 1 ,
(as required).
To calculate L3 , we note that
2
0 0 2 0 0 2 0 9 0
L2 = 16 0 0 1
6
0 0 = 0 0 1
3 ,
1 1 1
0 9 0 0 9 0 54 0 0
and so,
2
0 0 0 0 2 1 0 0
9 1
L3 = 0 0 1 1
3 6 0 0 = 0 1 0 ,
1 1 27
54 0 0 0 9 0 0 0 1
1
i.e. L3 = 27 I. Now, noting that the population of this species is described by the equation
x(k) = Lx(k1) ,
where x(k) is the population distribution vector for the species in the kth time period and that a
time interval of sixty years is the same as three time periods (as each individual time period lasts for
twenty years), the relevant population distribution vectors for this question are:
Thus, at the end of the jth sixty year interval (i.e. the 3jth time period), the population distribution
vector will be given by
x(0)
x(3j) = ,
27j
and so we can see that:
1
The population in each age class decreases by a factor of 27 every sixty years.
Every sixty years the proportion of the population in each age class is the same as it was at
the beginning (i.e. as it was when k = 0).
5
Question 3
(a) To show that the m n matrix
P = A(At A)1 At ,
is an orthogonal projection of Rm onto R(A) we have to show three things:
P is symmetric as Pt = [A(At A)1 At ]t = Att [(At A)1 ]t At = A(At A)1 At = P (as required).
A least squares solution to the matrix equation Ax = b is an x, say x , such that kAx bk is
minimised over all x. Thus, Ax must be the orthogonal projection of b onto R(A), i.e.
Ax = A(At A)1 At b,
and so, x = (At A)1 At b is a least squares solution to the matrix equation Ax = b.
(b) The quantities x and y are related by a rule of the form y = mx + c for some constants m and
c. Using this relationship and the given data, we construct a matrix equation Ax = b, say
2 1 13
4 1 m 17
5 1 c = 22 .
6 1 25
To estimate m and c using the least squares method, we have to find x = (At A)1 At b. Firstly, we
find
2 1
2 4 5 6 4 1 = 81 17 ,
At A =
1 1 1 1 5 1 17 4
6 1
and so, we can see that
t 1 1 4 17
(A A) = .
35 17 81
Secondly, we find
2 1
t 2 4 5 6
4 1
= 354 .
Ab=
1 1 1 1 5 1 77
6 1
And so, thirdly, we get
m 1 4 17 354 1 107
x = = = ,
c 35 17 81 77 35 219
6
2 9
which means that our least squares estimates are m = 3 35 and c = 6 35 .
(c) The Fourier series of order n of a function f (x) defined on the interval [, ] is a projection
onto the subspace of the vector space F[,] spanned by the orthonormal set of vectors
1 cos x cos nx sin x sin nx
Gn = , , . . . , , , . . . , ,
2
which minimises the quantity Z
[f (x) g(x)]2 dx,
where g(x) LinGn . So, if we define the inner product
Z
hf, gi = f (x)g(x)dx,
on F[,] , the Fourier series of such a function is the orthogonal projection of f (x) onto LinGn , and
this can be written as:
1
2 hf (x), 1i 1 + 1 hf (x), cos xi cos x + + 1 hf (x), cos nxi cos nx
+ 1 hf (x), sin xi sin x + + 1 hf (x), sin nxi sin nx.
we can see that the expression for the orthogonal projection given above reduces to:
n
X
bk sin kx,
k=1
(as required).
(d) To find the Fourier series of the function f (x) = x defined on the interval [, ], we note
that this function is odd and so we can use the result from the previous part. So, for k such that
1 k n, we use integration by parts to evaluate:
Z Z
1 1 cos kx cos kx
bk = x sin kx dx = x + dx ,
k k
7
Question 4
A complex matrix A is:
unitary iff AA = I.
normal iff AA = A A.
unitarily diagonalisable iff there is a unitary matrix P such that the matrix P AP is diagonal.
We are then asked to prove that: If P is a unitary matrix, then all of the eigenvalues of P have
modulus one. To do this, we let be any eigenvalue of the matrix P and we let x be an eigenvector
corresponding to , i.e. Px = x. Now, we note that
x P Px = x Ix = x x = kxk2 .
(as required).
Further, to show that the column vectors of P form an orthonormal set, we denote these vectors by
vi (for 1 i n say) and then note that
v1 hv1 , v1 i hv1 , v2 i hv1 , vn i
v hv2 , v1 i hv2 , v2 i hv2 , vn i
2
P P= .. v1 v2 vn = .. .. .. .. ,
. . . . .
hvn , v1 i hvn , v2 i hvn , vn i
vn
where we have used the Complex Euclidean inner product and our convention [which allows us
to express inner products in terms of matrix products (i.e. we have used the fact that x y =
x1 y1 + xn yn = (x1 y1 + xn yn ) = hx, yi ). Consequently, as P is unitary, P P = I and so
equating these two expressions and matching up corresponding entries we can see that
(
1 if i = j
hvi , vj i = ,
0 if i 6= j
that is, the set {v1 , v2 , . . . , vn } of column vectors of P is orthonormal (as required).
Let us suppose that A is a normal matrix, and as such, it is unitarily diagonalisable, i.e. there is
a unitary matrix P such that P AP is diagonal. Further, the column vectors of P are given by the
orthonormal set of vectors {x1 , x2 , . . . , xn } and xi is an eigenvector corresponding to the eigenvalue
i of A (for i = 1, 2, . . . , n). Now, as P is unitary, we can write PP = I, and so
x1
x
2
I = x1 x2 xn .. ,
.
xn
I = x1 x1 + x2 x2 + + xn xn .
A = 1 x1 x1 + 2 x2 x2 + + n xn xn ,
8
which means that setting Ei = xi xi (for i = 1, 2, . . . , n) as suggested in the question will yield the
spectral decomposition of A, i.e.
A = 1 E1 + 2 E2 + + n En ,
(as required).
We are given the matrix
1 i 0
A = i 1 0 ,
0 0 1
and we are asked to find its spectral decomposition. To do this, we need to find its eigenvalues, which
we do by solving the determinant equation |A I| = 0, i.e.
1 i 0
A= i 1 0 = (1 )[(1 )2 + 1] = 0,
0 0 1
where we have evaluated the determinant by performing a co-factor expansion along its third column.
Simplifying the resulting polynomial equation we get
(1 )(2 2 + 2) = 0 = = 1, 1 i,
are the eigenvalues. To find the eigenvectors, we solve the matrix equation (A I)x = 0 for each
eigenvalue:
For = 1, we have
0 i 0 x 0
i 0 0 y = 0 = x = 0 and y = 0 = x = s 0 for s R.
0 0 0 z 1
So, setting s = 1 (as we want the eigenvectors to form an orthonormal set), we take [0, 0, 1]t to
be the eigenvector corresponding to = 1.
For = 1 i, we have
i i 0 x 1
i i 0 y = 0 = x + y = 0 and z = 0 = x = s 1 for s R.
0 0 i z 0
So, setting s = 1/ 2 (as we want the eigenvectors to form an orthonormal set), we take
1 [1, 1, 0]t to be the eigenvectors corresponding to = 1 i.
2
9
or, using the representation given in the question,
0 0 0 1 1 0 1 1 0
1 + i 1 i
A = 1 0 0 0 + 1 1 0 + 1 1 0 .
2 2
0 0 1 0 0 0 0 0 0
(Notice that this result can easily be checked by adding up the three matrices on the right-hand-side
and verifying that their sum does indeed give A.)
10
Question 5
(a) We write the system of coupled differential equations given in the question in the form y0 = Ay
where
2 1 1 y1
A = 1 2 1 and y = y2 .
1 1 2 y3
To solve this system, we need to diagonalise the matrix A, and we do this by first finding the
eigenvalues of A, i.e. we solve the determinant equation |A I| = 0:
2 1 1
1 2 1 = 0 = (2 )[(2 )2 1] [(2 ) 1] + [1 (2 )] = 0,
1 1 2
and the easiest way to solve this equation is to perform the following simplification:
(2 )(2 4 + 3) 2 + 2 = 0
= (2 )( 1)( 3) + 2( 1) = 0
= ( 1)[(2 )( 3) + 2] = 0
= ( 1)[2 + 5 4] = 0
= ( 1)( 1)( 4) = 0
i.e. the eigenvalues are = 1, 1, 4. Secondly, we need to find the eigenvectors corresponding to these
eigenvalues, i.e. we need to solve the matrix equation (A I)x = 0 for each eigenvalue:
For = 1, we have
1 1 1 x s t 1 1
1 1 1
y = 0 = x + y + z = 0 = x = s
= s 1 + t 0 for s, t R.
1 1 1 z t 0 1
So, setting [s, t]t = [1, 0]t and [s, t]t = [0, 1]t (as we want two linearly independent eigenvectors
corresponding to this multiplicitous eigenvalue), we take [1, 1, 0]t and [1, 0, 1]t to be the
eigenvectors corresponding to = 1.
For = 4, we have
2 1 1 x 2x + y + z = 0
1
1 2 1 y = 0 = x 2y + z = 0 = x = y = z = x = s 1 ,
1 1 2 z x + y 2z = 0 1
11
where A, B and C are constants. Consequently, using y = Pz, yields
t
1 1 1 Ae Aet Bet + Ce4t
y(t) = 1 0 1 Bet = Aet + Ce4t ,
0 1 1 Ce 4t t
Be + Ce 4t
which is the general solution to the system of coupled differential equations in the question. To find
the particular solution corresponding to the initial conditions y1 (0) = 1, y2 (0) = 1 and y3 (0) = 0,
we note that
1 A B + C
y(0) = 1 = A + C ,
0 B+C
which gives us three simultaneous equations for A, B and C. Adding these three equations together
yields C = 0, and this in turn gives B = 0 and A = 1. Thus, substituting these values into our
expression for y(t), we get the sought after solution, i.e.
t
e
y(t) = et .
0
(b) To find the steady states of the system of non-linear differential equations given in the question
we set the right-hand-sides equal to zero and solve the resulting simultaneous equations, i.e.
)
y1 (3 2y1 y2 ) = 0 y1 = 0 (i) or 3 2y1 y2 = 0 (ii)
=
y2 (2 y1 y2 ) = 0 y2 = 0 (iii) or 2 y1 y2 = 0 (iv)
So taking these in turn we can find the steady states y = [y1 , y2 ]t , namely:
Now, the steady state where neither y1 nor y2 equals zero is clearly [1, 1]t . So, to show that this is
asymptotically stable, we calculate the Jacobian of the right-hand-sides, i.e.
3 4y1 y2 y1
DF (y) = ,
y2 2 y1 2y2
We now calculate the eigenvalues of this matrix by solving the determinant equation given by
2 1
= 0 = (2 + )(1 + ) 1 = 0 = 2 + 3 + 1 = 0,
1 1
which gives us = 21 (3 5) = 0.38, 2.62. As these eigenvalues are real and negative, the
steady state y = [1, 1]t is asymptotically stable (as required).
12
Question 6
(a) We are asked to prove that kx + yk kxk + kyk for all x, y Rn . (Notice that this is just the
Triangle Inequality!) To do this we note that:
kx + yk2 = hx + y, x + yi
= hx, xi + hx, yi + hy, xi + hy, yi
= kx + yk2 = kxk2 + 2hx, yi + kyk2
where we have used the symmetry and linearity properties of real inner products. However, the
Cauchy-Schwarz inequality tells us that |hx, yi| kxkkyk, and so
and hence,
kx + yk kxk + kyk,
(as required)
(b) A subset C of Rn is convex iff for any x, y C, x + (1 )y C too for all such that
0 1.
To prove that: If C1 and C2 are convex sets, then C1 C2 is a convex set too, we use the following
argument:
Suppose that C1 and C2 are convex sets, that is for such that 0 1:
Now, to show that the set C1 C2 is convex, we need to establish that for any x, y C1 C2
and such that 0 1, the vector x + (1 )y C1 C2 too. To do this we note
that as x, y C1 C2 , it must be the case that x, y C1 and x, y C2 . But, as C1 and
C2 are convex sets, this means that x + (1 )y C1 and x + (1 )y C2 , i.e.
x + (1 )y C1 C2 too (as required).
To show that the set C1 = {x R2 | kxk 3} is convex we need to establish that for any x, y C1
and such that 0 1, the vector x + (1 )y C1 . To do this, we note that:
As x C1 , kxk 3.
As y C1 , kyk 3.
13
As x = [x1 , x2 ]t C2 , x1 + x2 0.
As y = [y1 , y2 ]t C2 , y1 + y2 0.
and to show that x + (1 )y = [x1 + (1 )y1 , x2 + (1 )y2 ]t C2 we need to show that
x1 + (1 )y1 + x2 + (1 )y2 0. To do this, we note that:
x1 + (1 )y1 + x2 + (1 )y2 = (x1 + x2 ) + (1 )(y1 + y2 ) 0
since , 1 0 and x, y C2 (as required).
An extreme point of a convex set C is a point x C which can not be expressed in the form
x = y + (1 )z where 0 1 and y, z C unless = 0 or = 1.
To find the extreme points of the set C1 C2 , we start by visualising what this set looks like see
Figure 1. It should then be clear that the extreme points of C1 C2 are all points on the arc ACB
y
-3 0 3 x
C3
C A
-3
C2
Figure 1: In this diagram, the set C1 is the disc of radius 3 centred on the origin and the set C2 is
the half-plane. The set C3 = C1 C2 is the region where they intersect. The extreme points of this
set are given by all points on the arc ACB.
14
y
2
7
4
A
3
B
2
C
1
D y
1
0 1 2 3 4 5 6
Figure 2: The feasible region for the dual problem is the cross-hatched region bounded by the y1 and
y2 -axes and the lines y1 + 2y2 = 6 (i.e. ), y1 + y2 = 4 (i.e. ) and 2y1 + y2 = 7 (i.e. ). The
extreme points are the five corners labelled 0, A, B, C and D.
and so, clearly, the objective function of the dual problem is maximised at C where it takes the value
22. Consequently, by the Duality Theorem, the solution to the original linear programming problem
(i.e. the minimum value of 12x + 8y + 14z subject to the given constraints) is also 22.
15