Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
QBUS1040
Linear independence
Question 5
Consider the following diagram:
q1
q˜2
a
−βq1
It is known that ∥q1∥ = 1.
(a) Write q˜2 in terms of β, a and q1.
q˜2 = a− βq1
(b) Given that q1 ⊥ q˜2 i.e. qT1 q˜2 = 0, derive an expression for β in terms of a and q1.
0 = qT1 q˜2 = q
T
1 (a− βq1) = qT1 a− β qT1 q1︸︷︷︸
1
= qT1 a− β → β = qT1 a
Question 6
In the Gram-Schmidt algorithm we make the calculation:
q˜i = ai − (qT1 ai)q1 − · · · − (qTi−1ai)qi−1
What does this equation look like for:
(a) q˜1? q˜1 = a1
(b) q˜2? q˜1 = a2 − (qT1 a2)q1
(c) q˜3? q˜3 = a3 − (qT1 a3)q1 − (qT2 a3)q2
Question 7
Given that qi =
q˜i
∥q˜i∥ → qi∥q˜i∥ = q˜i, we can rewrite the equation from the previous question like so:
qi∥q˜i∥ = ai − (qT1 ai)q1 − · · · − (qTi−1ai)qi−1
(a) Rearrange the equation to make ai the subject.
ai = qi∥q˜i∥+ (qT1 ai)q1 + · · ·+ (qTi−1ai)qi−1
(b) Looking at the equation from part (a), circle the terms which are scalars.
ai = qi∥q˜i∥+ (qT1 ai)q1 + · · ·+ (qTi−1ai)qi−1
(c) Re-write the equation from part (a) replacing every scalar with a βi term.
ai = βiqi + β1q1 + · · ·+ βi−1qi−1
(d) Is ai a linear combination of q1, . . . qi? Yes.
Question 8
Similar to the re-arranging in the previous question, we can also get the formula:
qi = (1/∥q˜i∥)(ai − (qT1 ai)q1 − · · · − (qTi−1ai)qi−1)
Using this formula:
(a) What is q1? q1 = (1/∥q˜1∥)︸ ︷︷ ︸
scalar
a1
(b) What is q2 as a linear combination of a1 and a2? (Hint: substitute in your answer from part a)
q2 = (1/∥q˜2∥)
(
a2 − (qT1 a2)q1
)
= (1/∥q˜2∥)︸ ︷︷ ︸
scalar
a2 − (qT1 a2)(1/∥q˜1∥)(1/∥q˜2∥)︸ ︷︷ ︸
scalar
a1
Page 1 of 2.
QBUS1040 Lecture 5: Question Sheet Solutions Semester 2, 2023
Matrices and matrix examples
Question 1
Consider the matrix A =
[
2 6 8
3 −1 0
]
:
(a) What is the size of the matrix A? 2× 3
(b) What is A1,2? 6
(c) Is A a tall, wide or square matrix? wide
(d) What is the matrix given by A1:2,2:3?
[
6 8
−1 0
]
Question 2
Spot the difference! Below we have written the vector x as both a row vector and a column vector.
Circle all of the differences in the notation that you can see.
x = (2,− 4,3,8) x = [2 − 4 3 8]
Question 3
(a) Given the vectors a1 = (2, 3), a2 = (1, 0) and a2 = (4, 4), what does the matrix A = [a1 a2 a3]
look like?
a1, a2 and a3 are column vectors. This means that A =
[
2 1 4
3 0 4
]
.
(b) Given the vectors a1 = [2 3], a2 = [1 0] and a2 = [4 4], what does the matrix A = [a1 a2 a3]
look like?
a1, a2 and a3 are row vectors. This means that A =
[
2 3 1 0 4 4
]
.
Question 4
(a) What does the matrix 03×2 look like?
0 00 0
0 0
(b) What does the matrix I2 look like?
[
1 0
0 1
]
(c) What does the matrix diag(3,−2) look like?
[
3 0
0 −2
]
Page 2 of 2.