Sei sulla pagina 1di 3

Week 10 Version 1 Class

Time allowed: 20 minutes.


1. (3 marks)
It is known that the vector
_
_
_
_
2
0
1
k
_
_
_
_
is in span
_

_
_
_
_
_
1
2
3
4
_
_
_
_
,
_
_
_
_
3
6
9
12
_
_
_
_
,
_
_
_
_
3
3
3
0
_
_
_
_
,
_
_
_
_
1
1
4
8
_
_
_
_
_

_
.
(a) Determine the value of k.
(b) Hence or otherwise, for the value of k determined in part (a) above, nd values of
1
,
2
,
3
,
4
such that:
_
_
_
_
6
0
3
3k
_
_
_
_
=
1
_
_
_
_
1
2
3
4
_
_
_
_
+
2
_
_
_
_
3
6
9
12
_
_
_
_
+
3
_
_
_
_
3
3
3
0
_
_
_
_
+
4
_
_
_
_
1
1
4
8
_
_
_
_
.
2. (3 marks)
We would like to t the quadratic curve y =
1
+
2
x +
3
x
2
to a set of points (x
1
, y
1
), (x
2
, y
2
), . . . , (x
n
, y
n
)
by the method of least squares.
(a) Write down the normal equations in matrix form.
(b) For this dataset, n = 12,

x
i
= 22,

x
2
i
= 11,

x
3
i
= 6,

x
4
i
= 1,

x
5
i
= 0.5,

y
i
= 45,

x
i
y
i
= 38,

x
2
i
y
i
= 22,

x
i
y
2
i
= 35,

x
2
i
y
2
i
= 58.
Show that
1
= 1,
2
= 2 and
3
= 1.
3. (4 marks)
Suppose that

v
1
=
_
_
_
_
1
0
0
1
_
_
_
_
,

v
2
=
_
_
_
_
1
0
1
0
_
_
_
_
,

v
3
=
_
_
_
_
1
1
1
1
_
_
_
_
and = span(

v
1
,

v
2
).
(a) Find an orthogonal basis for .
(b) Hence, or otherwise, nd proj

v
3
.
Week 10 Version 1 Class
1. (a) In general,

a is in span{

b
1
, . . . ,

b
n
} if there exist scalars
1
, . . . ,
n
such that

a =
1

b
1
+ . . . +
n

b
n
.
So we require (for some values of
1
,
2
,
3
,
4
):

1
_
_
_
_
1
2
3
4
_
_
_
_
+
2
_
_
_
_
3
6
9
12
_
_
_
_
+
3
_
_
_
_
3
3
3
0
_
_
_
_
+
4
_
_
_
_
1
1
4
8
_
_
_
_
=
_
_
_
_
2
0
1
k
_
_
_
_
.
This gives the augmented matrix:
_
_
_
_
1 3 3 1 2
2 6 3 1 0
3 9 3 4 1
4 12 0 8 k
_
_
_
_
R
2
R
2
2R
1
R
3
R
3
3R
1
R
4
R
4
4R
1

_
_
_
_
1 3 3 1 2
0 0 3 3 4
0 0 6 7 5
0 0 12 12 k 8
_
_
_
_
R
3
R
3
2R
2
R
4
R
4
4R
2

_
_
_
_
1 3 3 1 2
0 0 3 3 4
0 0 0 1 3
0 0 0 0 k + 8
_
_
_
_
This matrix is in row-echelon form, and the system of linear equations has a solution if and only if the
right-hand-side corresponding to any zero row of the row-echelon form is zero.
Thus, the system has a solution (and the vector is in the span) if and only if k = 8.
(b) Using backsubstitution to nd the general solution to the system of equations:
Assuming k = 8, then the last row is all zeroes.
From the third row,
4
= 3
4
= 3.
From the second row, 3
3
3
4
= 4
3
=
13
3
.
From the rst row,
1
+ 3
2
+ 3
3
+
4
= 2
1
= 8 3 where
2
= .
So the general solution to the system of equations is:

x =
_
_
_
_
8 3

13
3
3
_
_
_
_
.
Now to nd values of
1
,
2
,
3
,
4
such that:
_
_
_
_
6
0
3
24
_
_
_
_
=
1
_
_
_
_
1
2
3
4
_
_
_
_
+
2
_
_
_
_
3
6
9
12
_
_
_
_
+
3
_
_
_
_
3
3
3
0
_
_
_
_
+
4
_
_
_
_
1
1
4
8
_
_
_
_
,
consider 3

x and pick an arbitrary value of , say = 0 for simplicity.


Then we have: 3

x =
_
_
_
_
24
0
13
9
_
_
_
_
.
So
1
= 24,
2
= 0,
3
= 13,
4
= 9 satises the equation.
(Dierent values of give dierent values of
1
and
2
. There are innitely many solutions.)
Week 10 Version 1 Class
2. (a) The normal equations in this case are:
_
_
_
_
_
_
_
_
_
_
n
n

i=1
x
i
n

i=1
x
2
i
n

i=1
x
i
n

i=1
x
2
i
n

i=1
x
2
i
n

i=1
x
2
i
n

i=1
x
3
i
n

i=1
x
4
i
_
_
_
_
_
_
_
_
_
_
_
_

3
_
_
=
_
_
_
_
_
_
_
_
_
_
n

i=1
y
i
n

i=1
x
i
y
i
n

i=1
x
2
i
y
i
_
_
_
_
_
_
_
_
_
_
.
(b) Substituting the information into the matrix from (a) gives: A =
_
_
12 22 11
22 11 6
11 6 1
_
_
and

y =
_
_
45
38
22
_
_
.
Consider the vector

x =
_
_
1
2
1
_
_
.
A

x =
_
_
12 22 11
22 11 6
11 6 1
_
_
_
_
1
2
1
_
_
=
_
_
12 1 + 22 2 + 11 (1)
22 1 + 11 2 + 6 (1)
11 1 + 6 2 + 1 (1)
_
_
=
_
_
12 + 44 11
22 + 22 6
11 + 12 1
_
_
=
_
_
45
38
22
_
_
=

y.
The vector

x =
_
_
1
2
1
_
_
=
_
_

3
_
_
satises the normal equations, so
1
= 1,
2
= 2,
3
= 1 as required.
3. (a) We want to determine an orthogonal basis {

w
1
,

w
2
} for .
Let

v
1
=

w
1
.
The second vector needs to be in span(

v
1
,

v
2
) and orthogonal to

v
1
, so choose:

w
2
=

v
2
proj

v1

v
2
=
_
_
_
_
1
0
1
0
_
_
_
_

1 1 + 0 0 + 0 1 + 1 0
1 1 + 0 0 + 0 0 + 1 1
_
_
_
_
1
0
0
1
_
_
_
_
=
1
2
_
_
_
_
2
0
2
0
_
_
_
_

1
2
_
_
_
_
1
0
0
1
_
_
_
_
=
1
2
_
_
_
_
1
0
2
1
_
_
_
_
Then
_

_
_
_
_
_
1
0
0
1
_
_
_
_
,
1
2
_
_
_
_
1
0
2
1
_
_
_
_
_

_
is an orthogonal basis for .
(b) In R
4
, if = span(

z
1
,

z
2
), where {

z
1
,

z
2
} is an orthonormal set, then proj

a = (

z
1
)

z
1
+ (

z
2
)

z
2
.
To obtain an orthonormal set from the orthogonal basis from part (a), divide

w
1
and

w
2
by their lengths:

z
1
=
w
1
|

w
1
|
=
1

2
_
_
_
_
1
0
0
1
_
_
_
_

z
2
=
w
2
|

w
2
|
=
1

6
_
_
_
_
1
0
2
1
_
_
_
_
Then
proj

v
3
= (

v
3

z
1
)

z
1
+ (

v
3

z
2
)

z
2
=
(1 + 0 + 0 + 1)
(

2)
2
_
_
_
_
1
0
0
1
_
_
_
_
+
(1 + 0 + 2 1)
(

6)
2
_
_
_
_
1
0
2
1
_
_
_
_
=
3
3
_
_
_
_
1
0
0
1
_
_
_
_
+
1
3
_
_
_
_
1
0
2
1
_
_
_
_
=
1
3
_
_
_
_
4
0
2
2
_
_
_
_

Potrebbero piacerti anche