Exercises MEF - 2 - 2018 - Solution
Exercises MEF - 2 - 2018 - Solution
Exercise 1
(a) Compute
3 1 −1 2
−5 1 3 −4
D= .
2 0 1 −1
1 −5 3 −3
Solution 1
(a) We first simplify the matrix in order to make the computation of the determinant faster.
Reminder: If we add or subtract, from one row, a multiple of another row, then the determinant does not
change.
We first subtract 3 times the third row to the fourth row (row4 − 3 × row3 ).
3 1 −1 2 3 1 −1 2
−5 1 3 −4 −5 1 3 −4
D= −→ D1 =
2 0 1 −1 2 0 1 −1
1 −5 3 −3 −5 −5 0 0
Since that det(D) = det(D1 ) we compute the det(D1 ) applying the Laplace formula to the last line.
1 −1 2 3 −1 2
det(D1 ) = (−1)4+1 (−5) −1 3 −4 + (−1)4+2 (−5) −5 3 −4
0 1 −1 2 1 −1
3 1 2 3 1 −1
+(−1)4+3 (0) −5 1 −4 + (−1)4+4 (0) −5 1 3 =
2 0 −1 2 0 1
= 5 [−3 + 0 + 2 + 0 + 4 − 1] − 5 [−9 + 8 − 10 − 12 + 12 + 5] + 0 + 0
= 5 × 2 + (−5) × (−6) = 10 + 30 = 40 = det(D)
6 −18 6
(b) |A| = −18, rank(A) = 3, tr(A) = 11 and A−1 = − 18
1
1 −27 16 .
−4 18 −10
1
Exercise 2
A and B are squared matrixes of order n > 2, det A and det B are their determinants. Which of the following
statements are true:
Solution 2
(a) Consider n =2
a11 a12 b11 b12
A= B= .
a21 a22 b21 b22
det A = det B V a11 a22 − a21 a12 = b11 b22 − b21 b12 .
a11 − b11 a12 − b12
det(A − B) =
a21 − b21 a22 − b22
= a11 a22 − b11 a22 − a11 b22 + b11 b22 − a12 a21 + b21 a12 + a21 b12 − b12 b21 .
as you see only under special conditions on coefficients of matrices A and B det(A − B) = 0, otherwise
det(A − B) 6= 0.
Hence if det A = det B, it does not mean det(A − B) = 0.
(b) It is not true. In fact
det A = − det B.
(c)
Exercise 3
Consider a matrix Am×n . Which of the following statements are true and which are false? Explain why.
Solution 3
(a) False. If the rows of matrix A are linearly independent, then m can not exceed n.
2
(b) False. If the rows of matrix A are linearly dependent, then m and n can be in whatever relation.
If the rows of matrix A are linearly dependent, then rank(A) = row rank(A) = k, k < m. At the same
time, we do not know anything about the linear independence of the columns, k ≤ n. Thus, k < m, k ≤ n
which does not allow us to conclude anything about the relation between m and n.
(c) False. We can have at most n linearly independent rows, so if m > n, then the rows of matrix A are linearly
dependent.
(d) True. We can have at most n linearly independent rows, so if m > n, then the rows of matrix A are linearly
dependent.
Exercise 4
For what values of the constant p and q does the following system have a unique solution, several solutions, or
no solution?
For what values of the constant p and q does the following system have a unique solution, several solutions,
or no solution?
x1 + x2 + x3 = 2q
2x1 − 3x2 + 2x3 = 4q
3x1 − 2x2 + px3 = q.
Solution 4
Let
1 1 1 2q
A = 2 −3 2 and b = 4q , then we rewrite the problem as Ax = b.
3 −2 p q
Exercise 5
Consider the following system of equations:
w − x + y − z = b1
w − x + y + z = b2
4w − 4x + 4y = b3
−2w + 2x − 2y + z = b4 .
3
(b) Give the solution set of the inhomogenous system with b = [2, 0, 4, −3].
Solution 5
Let
1 −1 1 −1 2
1 −1 1 1 0
A= 4 −4
and b = , then we rewrite the problem as Ax = b.
4 0 4
−2 2 −2 1 −3
(a) To solve the homogenous system, let us first perform several operations on the rows of the following
augmented matrix as if solving the inhomogenous case:
1 −1 1 −1 2
1 −1 1 1 0
(A|b) =
4 −4 4
,
0 4
−2 2 −2 1 −3
which results in the following modified system:
1 −1 1 0 1
] =
0 0 0 1 −1
(A|b) 0 0
.
0 0 0
0 0 0 0 0
(b) To solve the inhomogenous system, let us first remember that the solution to the homogenous system is the
] and the solution of the homogenous system U. It is easy to
sum of a particular solution of the system (A|b)
notice that the particular solution to the system (pick again x and y as free variables, set s = 0 and t = 0)
has the form of λ = (1, 0, 0, −1)0 . Thus we get:
1 1 −1
0 1 0
λ + U = s, t ∈ R + s
+ t
.
0 0 1
−1 0 0
4
Exercise 6
Let A be a matrix
1 2 3
2 4 6
A=
−1
4 1
2 −8 −2
.
(a) Find a basis for the null space of A, N ull(A).
(b) Find a basis for the column space of A, Col(A).
(c) Verify the Rank-Nullity Theorem (Theorem A.7, p.248 of Lecture Notes).
Solution 6
(a) The null space of A is the set of all vectors x such that Ax = 0.
1 2 3
2 x 0
4 6· y = 0
−1 4 1
z 0
2 −8 −2
1 2 3 1 2 3 3 0 5
2 4 6 0 0 0 0 0 0
⇔ ⇔
−1 4 1 0 6 4 0 3 2
2 −8 −2 0 −12 −8 0 0 0
The solution to the system is (x, y, z) = (5a, 2a, −3a)0 , a ∈ R and N ull(A) = (5, 2, −3)0 .
(b) The column space is the subspace that is spanned by the columns of a matrix. In other words it is the
subspace built taking all the possible (linear) combinations of the columns of a matrix.
Using the simplified matrix from the previous point
3 0 5
0 0 0
,
0 3 2
0 0 0
one can say that the first and the second columns of a matrix are linearly independent, while the third
column is a linear combination of them. The corresponding columns in the initial matrix A will present the
basis of its column space
1 2
2 4
Col(A) = , .
−1 4
2 −8
5
Let us find x1 , x2 , x,3 ∈ Rs.t. xi 6= 0 for at least one i and
1 2 3 0
2 4 6 0
x1 −1 + x2 4 + x3 1 = 0
2 −8 −2 0
Let us now find a basis for the null space of A, which is the set of all vectors x such that Ax = 0.
From the first part, we have
5 5 2
x1 = x2 , x1 = − x3 , x2 = − x3 .
2 3 3
Therefore, N ull(A) = (5x, 2x, −3x), x ∈ R. A basis for this space is
5
N ull(A) = 2 .
−3
Note that in practise, it is common to normalize the vectors of a basis, which can be done by dividing each
element by the norm of the corresponding vector.
Exercise 7
Discuss the solutions of following system for all values of a and b.
x + 2y + 3z = 1
−x + ay − 21z = 2 .
3x + 7y + az = b
Solution 7
x + 2y + 3z = 1 1 2 3 x 1
−x + ay − 21z = 2 ⇔ .
−1 a −21
y = 2 .
3x + 7y + az = b 3 7 a z b
| {z }
A
6
(a) Check under which conditions det A = 0.
1 2 3 1 2 3
a+2 −18
−1 a −21 1 ∗ row 1 = 0 a+2 −18 =1∗
1 a−9
3 7 a −3 ∗ row 1 0 1 a−9
= (a + 2)(a − 9) + 18 = 2a + a2 − 18 − 9a + 18 = a2 − 7a = a(a − 7)
=⇒ det A = 0 ⇐⇒ a = 0, a = 7.
a = 0 =⇒ det A = 0.
1 0 21
1 0 21
rank(A)a=0 : 0 0 0 −→ =⇒ rank(A) = 2.
0 1 −9
0 1 −9
a = 7 =⇒ det A = 0.
1 0 7
1 0 7
rank(A)a=7 : 0 0 0 −→ =⇒ rank(A) = 2.
0 1 −2
0 1 −2
1 0 7 −2b + 7
rank(Â)a=0 : 0 0 0 −7b + 21 − 2b + 9
0 1 − 23 b−3
Answer:
If a 6= 0 or a 6= 7 =⇒ det A 6= 0 =⇒ system has a unique solution.
7
If a = 0 and b = 29 =⇒ det A = 0 =⇒ rank(A) = rank(Â) = 2 =⇒ system has infinite number of
solutions.
If a = 7 and b = 10 3 =⇒ det A = 0 =⇒ rank(A) = rank(Â) = 2 =⇒ system has infinite number of
solutions.
If a = 0 and b 6= 92 =⇒ det A = 0 =⇒ rank(A) 6= rank(Â) =⇒ system has no solution.
If a = 0 and b 6= 10
3 =⇒ det A = 0 =⇒ rank(A) 6= rank(Â) =⇒ system has no solution.
Exercise 8
(a) Let us consider the quadratic form Q given by
Q(x, y) = ax2 + bxy + cy 2 .
Show that Q is positive definite if and only if a > 0 and b2 < 4ac.
(b) Determine the definiteness of
Q = 3x21 + x22 + 6x23 − 2x1 x2 + 2x1 x3 + 4x2 x3
Solution 8
(a) Recall that a quadratic form Q is PD ⇔ Dk > 0 for all leading principal minors of order k = 1, 2, . . . , n
(proposition 2.9).
b
2 2 T T a 2
Here we have Q(x, y) = ax + bxy + cy = x Ax, where x = (x, y) and A = b .
2 c
[1.] D1 > 0 ⇔ a > 0.
b2
[2.] D2 > 0 ⇔ det(A) > 0 ⇔ ac − > 0 ⇔ b2 − 4ac < 0.
4
Therefore, Q is PD if and only if a > 0 and b2 − 4ac < 0.
Additionally, observe that b2 − 4ac < 0 ⇔ 4ac > b2 ≥ 0 ⇒ 4ac > 0. Therefore, the two necessary and
sufficient conditions for Q to be PD also imply c > 0.
(b) In matrix notation
3 −1 1
Q = x0 Ax, where A = −1 1 2 .
1 2 6
Leading principle minors are:
D1 = 3 > 0.
3 −1
D2 = = 3 ∗ 1 − (−1) ∗ (−1) = 2 > 0.
−1 1
3 −1 1
1 2 −1 1 −1 1
D3 = −1 1 2 = (−1)1+1 ∗ 3 ∗ + (−1)2+1 (−1) + (−1)3+1 ∗ 1
2 6 2 6 1 2
1 2 6
= 3 ∗ (6 − 4) + 1 ∗ (−6 − 2) + 1 ∗ (−2 − 1) = 6 − 8 − 3 = −5 < 0.
D1 > 0, D2 > 0, D3 < 0 ⇒ not positive definite, not negative definite.
8
The arbitrary minors are:
order 3 : ∆k=3 = D3 = −5 < 0 ⇒ not positive semidefinite.
order 1 : ∆11 = 3, ∆12 = 1, ∆13 = 6 ⇒ (−1)1 ∆1 < 0 ⇒ not negative semidefinite.
So, quadratic form is indefinite.
(c)
−1 3 0 x1
Q = x0 Ax =
x1 x2 x3 3 −9 0 x2 .
0 0 −2 x3
Principal minors:
D1 = −1 < 0.
−1 3
D2 = = 9 − 9 = 0.
3 −9
−1 3 0
−1 3
D3 = 3 −9 0 = (−1)3+3 · (−2) · = 0.
3 −9
0 0 −2
−1 3
m=2: fix a11 , a11 =⇒ ∆2 = =0 <0
3 −9
−1 0
fix a22 , a22 =⇒ ∆2 = =2 ≥0
0 −2
−9 0
fix a33 , a33 =⇒ ∆2 = = 18 ≥ 0
0 −2
−1 3 0
m=3: fix a11 , a22 , a33 =⇒ ∆3 = 3 −9 0 =0
0 0 −2
Comment: Asymmetric matrices correspond to quadratic forms in very rare and specific cases which we do
not consider in this course. Moreover, the Rules for Checking Definiteness (Lecture Notes, p.49) are valid
only for symmetric matrices. So the general rule is to reconstruct a symmetric matrix from a quadratic
form.