Module_2
Module_2
2
The space R3
4
IMPORTANT
• Rn = R × R × · · · × R ( n times)
• Elements a ∈ Rn are ordered n-tuple of real numbers
a = (a1 , a2 , . . . , an ) : ai ∈ R, ∀i = 1, . . . , n
It is point of coordinates ai
6
Vectors
Vectors
NOTE
If the product of two vectors is zero ⇏ at least one factor is zero
11
Matrices
Matrices
n=m=3⇒ matrix 3 × 3
1 2 1
A=7 9 2
0 1 3
1
Main diagonal 9
3
15
Rectangular matrix (m ̸= n)
Rectangular matrix
n = 2, m = 3 ⇒ matrix 2 × 3
!
1 −1 0
A=
3 −1 2
16
Particular matrices
17
Operations on matrices
AT = B → bij = aji
Example
! 1 4
1 2 3 T
A= →A =2 5
4 5 6
3 6
19
Symmetric matrix
Example
1 2 1 1 2 1
T
A = 2 7 3 , A =2 7 3
1 3 9 1 3 9
20
Matrix Multiplication
where:
C = [cij ] , cij = ai,∗ · b∗,j = ai,1 · b1,j + ai,2 · b2,j + · · · + an,1 · bn,j
Entries cij are given by dot product of the corresponding row i of
A and the corresponding column j of B.
21
Matrix multiplication
Example
! 1 0 1
1 0 0
A= ,B = 0 2 0
2 1 0
1 3 0
A(2 × 3) · B(3 × 3) = C(2 × 3)
! !
1+0+0 0+0+0 1+0+0 1 0 1
C= =
2+0+0 0+2+0 2+0+0 2 2 2
22
Matrix multiplication
NOTE
• Generally, if A and B are conformable, B and A are not
conformable (thus, A · B is possible, but not B · A)
• If A e B are squared with same sizes, then A · B and B · A are
possible but with different result
(matrix multiplication is not commutative)
• A · B = 0 (null matrix) does not imply that A or B are null
! ! !
1 0 0 0 0 0
A= ,B = ,A · B = =0
1 0 0 1 0 0
23
Multiplication of a matrix by a vector
a11 . . . a1n a11 . . . a1n
A = ... . . . .. ⇒ det A = |A| =
.
.. . . .
.
..
.
an1 . . . ann an1 . . . ann
Example 2 × 2
!
1 2
A= ⇒ det A = 1 · 3 − 2 · 9 = −15
9 3
26
Determinant of order 3
=1·0·2+2·1·2+3·1·2−2·0·3−2·1·1−2·1·2=4
28
Minor
29
Minor - example
1 2 3
A=4 5 6
7 8 9
Minors of order 2 :
1 −1 1 0 −1 0
= 2; = 2; = −2
3 −1 3 2 −1 2
Minors of order 1 :
|1| = 1; |0| = 0; | − 1| = −1
| − 1| = −1; |3| = 3; |2| = 2
31
Cofactor
32
Determinant of any order
33
Laplace expansion
Example
1 2 3
0 1 1 1 1 0
1 0 1 = 1· −2· +3· = −2 − 0 + 6 = 4
2 2 2 2 2 2
2 2 2
36
Properties of determinants
Example
1 4 5
2 5 7 =0
3 6 9
37
Rank
1 0 −3
1 0
−3 5 9 = 0 ⇒ rk(A) < 3, = 5 ̸= 0
−3 5
2 22 −6
39
⇒ rk(A) = 2
Rank
Example
!
1 2 3
C=
4 5 6
The maximum possible rank is 2
1 2
= −3 ̸= 0 ⇒ rk(C) = 2
4 5
40
Rank
Example
1 4 3 2
A = −2 1 0 −3
−1 5 3 −1
• The maximum possible rank is 3
• All minors of order three are zero, so rk(A) < 3 (the third row
is the sum of the first two)
1 4
= 9 ̸= 0 ⇒ rk(A) = 2
−2 1 41
Rank
Rule of thumb
• Consider the maximum possible rank rmax (equal to the
smallest of the number of rows and columns)
• If we find a non-zero minor of order rmax , the rank will be rmax
• Otherwise, we consider a smaller order minor (one unit smaller)
and apply the same procedure until we find a non-null minor
• In the special case of the null matrix which has rank zero
Example (cont’d)
• Compute the determinant:
1 3 2
−3 1 5 = 10k − 70 ̸= 0 ⇒ k ̸= 7
−2 4 k
• If k ̸= 7 ⇒ rk(A) = 3
44
Rank dependent on a parameter
Example (cont’d)
• If k = 7
1 3 2
A = −3 1 5 ⇒ det(A) = 0 ⇒ rk(A) < 3
−2 4 7
46
Rank dependent on a parameter
Example (cont’d)
• If k ̸= 6 ⇒ rk(A) = 3
• If k =6
1 3 −2
A = −3 −9 6 ⇒ det(A) = 0 ⇒ rk(A) < 3
2 6 −4
• Observe that all minors of order 2 are null (last two columns
are derived from the first) ⇒ the rank cannot be equal to two
⇒ rk(A) = 1
47
Rank dependent on a parameter
Example
!
4 1 2
A=
k 3 k
48
Rank dependent on a parameter
Example (cont’d)
Minors of order 2:
4 1
= 12 − k ̸= 0 ⇒ k ̸= 12
k 3
4 2
= 2k ̸= 0 ⇒ k ̸= 0
k k
1 2
= k − 6 ̸= 0 ⇒ k ̸= 6
3 k
49
Rank dependent on a parameter
Example (cont’d)
Conclusion:
50
Systems of linear equations
Systems of linear equations
or in matrix form:
Ax = b
52
Systems of linear equations
a11 a12 . . . a1n
a21 a22 . . . a2n
Coefficient matrix A(m × n) =
.. ... . . . ...
.
am1 am2 . . . amn
b1 x1
b2 x
2
Constant vector b = ∈ Rm Unknows x = .. ∈ Rn
..
. .
bm xn
53
Solving a system
• Cramer theorem
det A ̸= 0 is a necessary and sufficient condition for a system
of n linear equations in n unknowns to have a unique solution
Example
x+y+z =1
x − 2y − z = 2
2x + y − 6z = 3
2
55
Square system m = n
Example (cont’d)
1 1 1 1
A = 1 −2 −1 , b= 2
2 1 −6 3/2
1 1 1
det A = 1 −2 −1 =
2 1 −6
= 12 + (−2) + 1 − (−1) − (−4) − (−6) = 22 ̸= 0
⇒ unique solution
56
Solutions
If det A ̸= 0 ⇒
57
Cramer’s rule
• Generally:
det Ai
xi = , i = 1, . . . , n,
det A
where Ai is the matrix obtained from A by replacing the i-th
column with the vector of constant terms (or right-hand sides)
58
Cramer’s rule
Example
( !
x+y =3 1 1
, A= , det A = −2
x−y =1 1 −1
3 1 1 3
1 −1 −4 1 1 1−3
x= = = 2, y= = =1
1 1 −2 1 1 −2
1 −1 1 −1
x = 2, y=1
59
General case (m is not necessarily equal to n)
• Rouché-Capelli theorem
A system of linear equations with m equations and n
unknowns has solutions if the rank of the coefficient matrix is
equal to the rank of the augmented matrix:
If rk(A) = rk(A|b) ⇒ the system is consistent (has solutions)
a11 a12 . . . a1n
• Coefficient matrix: A = ... . . . . . . ...
am1 am2 . . . amn
60
General case
61
Solutions of a system
We can have:
62
Solutions of a system
Unique solution (r = n)
1. Consider the r-order minor used to identify the rank of A
2. The rows of this r-order minor correspond to the main
equations of the system, the other equations must be
eliminated
3. We arrive at a square system of order r that can be solved
with Cramer’s rule
63
Solutions of a system
Example 1
x+y =3
1 1
x + 2y = 3, A = 1 2 , rk(A) = 2
2x + y = 5 2 1
1 1 1 2 1 1
= 1, = −3, = −1
1 2 2 1 2 1
65
Examples
Example 1 (cont’d)
1 1 3
A|b = 1 2 3 , det A|b = −1 ̸= 0
2 1 5
rk(A|b) = 3 > rk(A) = 2
⇒ NO SOLUTIONS
66
Examples
Example 2
x + y = 1 1 1
x + 2y = 2, , A = 1 2 , rk(A) = 2
2x + 3y = 3 2 3
1 1 1
A|b = 1 2 2 , det A|b = 0 ⇒ rk(A|b) = 2
2 3 3
67
Examples
Example 2 (cont’d)
• Because rk(A) = rk(A|b) = 2, the system has a unique
solution
• We can use any two equations to find the solution, as all
minors of order 2 are different from zero
68
Examples
Example 2 (cont’d)
1 1
2 2
x= =0
1 1
x+y =1 1 2
⇒
x + 2y = 2
1 1
1 2
y= =1
1 1
1 2
69
Examples
Example 3
x + 2y + z = 0
2x + 2y + 2z = 4
x−y−z =1
3 5
x = , y = −2, z =
2 2
70
Examples
Example 4 (m = 3 equations, n = 2 unknowns)
3x − 2y = 0
x − y = −1
2x − 3y = −4
3 −2
Coefficient matrix A = 1 −1
2 −3
3 −2 0
Augmented matrix A|b = 1 −1 −1
71
2 −3 −4
Examples
Example 4 (cont’d)
3 −2
A = 1 −1
2 −3
3 −2
= −3 + 2 = −1 ̸= 0 ⇒ rk(A) = 2
1 −1
72
Examples
Example 4 (cont’d)
3 −2 0 3 −2 0
A|b = 1 −1 −1 , 1 −1 −1 = −1 ̸= 0
2 −3 −4 2 −3 −4
⇒ rk(A|b) = 3
rk(A|b) = 3 > rk(A) = 2
⇒ NO SOLUTIONS
73
Examples
Example 5
3x − 2y = 0
x − y = −1
4x − 3y = −1
3 −2
3 −2
A = 1 −1 , = −1 ̸= 0 ⇒ rk(A) = 2
1 −1
4 −3
74
Examples
Example 5 (cont’d)
3 −2 0 3 −2 0
A|b = 1 −1 −1 , 1 −1 −1 = 0
4 −3 −1 4 −3 −1
⇒ rk(A|b) < 3
rk(A|b) = rk(A) = 2
⇒ UNIQUE SOLUTIONS
75
Examples
Example 5 (cont’d). Delete the third equation.
0 −2
−1 −1
x = =2
3 −2
3x − 2y = 0
⇒ 1 −1
x − y = −1
3 0
y = =3
−2
3
1 −1
76
Examples
Example 6
(
x + 2y − 3z = 2
m = 2 equations, n = 3 unknowns
4x − y + 2z = 3
!
1 2 −3
Coefficient matrix A =
4 −1 2
!
1 2 −3 2
Augmented matrix A|b =
4 −1 2 3
77
Examples
Example 6 (cont’d)
• The rank of matrix A is 2 :
1 2
= −9 ̸= 0 ⇒ rk(A) = 2
4 −1
• Rouché-Capelli theorem:
rk(A|b) = rk(A) = 2 < m = 3
⇒ INFINITE SOLUTIONS
Secondary variable: z 78
Examples
Example 6 (cont’d)
• Solution:
(
x + 2y = 3z + 2
4x − y = −2z + 3
3z + 2 2
− −2z + 3 −1 = −3z−2+4z−6 = 8−z
⇒ −9 −9 9
1 3z + 2
4 −2z + 3
x= = −2z+3−12z−8 = 14z+5
−9 −9 9
79
Examples
1 1
• = −2 ̸= 0 ⇒ rk(A) = 2
4 −1
• det A|b = 4k ⇒ The rank of A|b depends on k
80
Examples
Example 7 (cont’d)
• if k ̸= 0 ⇒ 4k ̸= 0 ⇒ rk(A|b) = 3 > rk(A) = 2
⇒ NO SOLUTIONS
• if k = 0 ⇒ 4k = 0 ⇒ rk(A|b) = 2 = rk(A)
⇒ UNIQUE SOLUTION
x=y=2
81
Homogeneous systems
p−1
X
xp = ki xi
i=1
p−1
X Xp
⇒ ki xi − xp = 0 ⇒ ki xi = 0, with kp = −1
i=1 i=1
⇒ k1 · x1 + · · · + kp · xp = 0
with at least one ki ̸= 0 (kp = −1) 83
Linearly dependent vectors
Example
• Is the vector (6, 2, 3) dependent on {(1, 2, 3), (2, −1, 4)} ?
• The following relation should hold:
(6, 2, 3) = α · (1, 2, 3) + β · (2, −1, 4)
2α − β = 2 → α = 2
⇔ α + 2β = 6 → β = 2
3α + 4β = 3 → not possible
p
X
ki xi = 0
i=1
⇒ k1 · x1 + · · · + kp · xp = 0 ⇔ k1 = . . . = kp = 0
This means that the only representation of 0 as a linear
combination of the vectors x1 , . . . , xp is the trivial representation in
which all the scalars ki are zero 85
Unit vectors Rn
Set of vectors, each of whose components are all zero, except one
that equals 1 (vector length = 1 )
e1 = (1, 0, 0, 0, . . . , 0) e2 = (0, 1, 0, 0, . . . , 0)
e3 = (0, 0, 1, 0, . . . , 0) en = (0, . . . , 0, 1)
87
Examples
2 dimesions
3 dimesions
(4, −2, 5) = (4, 0, 0) + (0, −2, 0) + (0, 0, 5) =
4 · (1, 0, 0) − 2 · (0, 1, 0) − 5 · (0, 0, 1)
Basis: {(1, 0, 0), (0, 1, 0), (0, 0, 1)}
88