Lecture03_-_Matrices and Determinants 2
Lecture03_-_Matrices and Determinants 2
in Electrical Engineering
Lecture 𝟎𝟑 – Matrices and Determinants
Part II
Proof:
Matrix 𝐴 is invertible ⇒ 𝐴𝐴−1 = 𝐼𝑛 ⇒ det 𝐴𝐴−1 = det 𝐼𝑛 = 1
= det 𝐴 det(𝐴−1 )
Therefore:
1
det 𝐴 det 𝐴−1 = 1 ⇒ det 𝐴−1 =
det(𝐴)
Adjoint and Inverse (cont.)
EXAMPLE:
α −3
Find α where 𝐴 = is not invertible.
4 1−α
The adjoint of a matrix 𝐴 is the transpose of the matrix of cofactors. It is denoted by 𝑎𝑑𝑗 𝐴 such
that 𝑎𝑑𝑗 𝐴 = 𝐶 𝑡 . An adjoint matrix is also called an adjugate matrix.
Adjoint and Inverse (cont.)
EXAMPLE:
−1 5
Find the adjoint of the matrix 𝐴 = .
3 −2
𝐶11 𝐶12
The matrix of cofactors is 𝐶 = where:
𝐶21 𝐶22
−1 5 −1 5
3 −2 3 −2
−1 5 −1 5
3 −2 3 −2
Adjoint and Inverse (cont.)
Therefore:
𝐶11 𝐶12 −2 −3
𝐶= =
𝐶21 𝐶22 −5 −1
Finally:
−2 −5
𝑎𝑑𝑗 𝐴 = 𝐶𝑡 =
−3 −1
Adjoint and Inverse (cont.)
THEOREM:
𝑎𝑑𝑗(𝐴)
If det(𝐴) ≠ 0, then 𝐴 is invertible and 𝐴−1 = (if det 𝐴 = 0, then 𝐴 is not invertible).
det(𝐴)
EXAMPLE:
3 1 0
Let 𝐴 = −2 −4 3 . Find 𝐴−1 .
5 4 −2
3 1 3 1
det 𝐴 = 𝑎13 𝐶13 + 𝑎23 𝐶23 + 𝑎33 𝐶33 = −3 −2 = −3 12 − 5 − 2 −12 + 2
5 4 −2 −4
= −21 + 20 = −1 ≠ 0 ⇒ 𝐴isinvertible
Adjoint and Inverse (cont.)
𝐶11 𝐶12 𝐶13
The matrix of cofactors is 𝐶 = 𝐶21 𝐶22 𝐶23 where:
𝐶31 𝐶32 𝐶33
𝑡
𝑎22 −𝑎12
𝑎𝑑𝑗 𝐴 = 𝐶 = −𝑎 𝑎11
21
𝑎22 −𝑎12 𝑎22 −𝑎12
−1
𝑎𝑑𝑗(𝐴) −𝑎21 𝑎11 −𝑎21 𝑎11
𝐴 = = 𝑎 𝑎 =
det(𝐴) 11 12 𝑎11 𝑎22 − 𝑎12 𝑎21
𝑎21 𝑎22
To get 𝐴−1 , negate the off-diagonal elements, switch the main diagonal elements, and then
divide by det(𝐴)
Determinant and Linear Independence
THEOREM:
det(𝐴) ≠ 0 if and only if the rows and columns of square matrix 𝐴 are linearly independent.
EXAMPLE 𝟏:
1 4 3
The three vectors 𝒗𝟏 = −2 , 𝒗𝟐 = 0 and 𝒗𝟑 = −1 are linearly dependent.
0 8 5
Proof:
1 4 3
Let 𝐴 = −2 0 −1 . Therefore:
0 8 5
1 4 3
det 𝐴 = −2 0 −1 = 1 0 + 8 − 4 −10 − 0 + 3 −16 − 0 = 0
0 8 5
−2 1 0
det 𝐴 = 1 6 0 = −2 6 − 0 − 1 1 − 0 = −13 ≠ 0
4 2 1
12 3 3 3
0 1 0 2
det 𝐴 = = 𝑎41 𝐶41 + 𝑎42 𝐶42 + 𝑎43 𝐶43 + 𝑎44 𝐶44 = 𝐶42
4 1 2 0
0 1 0 0
Determinant and Linear Independence (cont.)
12 3 3 3
4+2 0 1 0 2
det 𝐴 = 𝐶42 = −1 𝑀42 = = 12 0 − 4 − 3 0 − 8 = −24 ≠ 0
4 1 2 0
0 1 0 0
1 3 4
Let 𝐴 = 4 5 9 . Therefore:
1 2 3
1 3 4
det 𝐴 = 4 5 9 = 1 15 − 18 − 3 12 − 9 + 4 8 − 5 = 0
1 2 3
EXAMPLE:
0 1 2 1 2 1
Consider matrix 𝐴 = 1 2 1 and its row echelon matrix 𝐴𝑟𝑒𝑓 = 0 1 2 . Because the
2 7 8 0 0 0
row echelon form 𝐴𝑟𝑒𝑓 has two non-zero rows, we know that matrix 𝐴 has two independent
rows; and we know that the rank of matrix 𝐴 is 2.
Rank and Nullity of a Matrix (cont.)
DEFINITION:
Let 𝑟1 , 𝑟2 , … , 𝑟𝑚 denote the rows of 𝐴 , then the row space of 𝐴 is given by
𝑅 𝐴 = 𝑠𝑝𝑎𝑛 𝑟1 , 𝑟2 , … , 𝑟𝑚 . The rank of 𝐴 = 𝑟𝑎𝑛𝑘 𝐴 = 𝑑𝑖𝑚 𝑅 𝐴 (dimension of 𝑅 𝐴 ).
REMARKS:
• REMARK 𝟏: Elementary row operations do not change the rank of the matrix
• REMARK 𝟐: If a matrix 𝐴 is in row echelon form, then the rank of 𝐴 is equal to the number of
leading 1’s
Rank and Nullity of a Matrix (cont.)
EXAMPLE 𝟏:
1 2 3 4
Let 𝐴 = 2 6 7 11 . Find the rank of 𝐴.
2 2 5 5
1 2 3 4 1 2 3 4 Row1
2 6 7 11 → 0 2 1 3 −2Row1 + Row2
2 2 5 5 0 −2 −1 −3 −2Row1 + Row3
1 2 3 4 Row1
1 2 3 4 1 3 1
0 2 1 3 → 0 1 2
Row2
0 −2 −1 −3 2 2
0 0 0 0 Row2 + Row3
−1 0 −1 2 1 0 1 −2 −Row1
0 0 0 4 → 0 0 0 0 Row2 − 4Row3
0 0 0 1 0 0 0 1 Row3
2𝑎 + 3𝑏 + 5𝑐 = 0
Therefore: (homogeneous system of linear equations involving 𝑎, 𝑏, and 𝑐)
−4𝑎 + 2𝑏 + 3𝑐 = 0
Rank and Nullity of a Matrix (cont.)
2𝑎 + 3𝑏 + 5𝑐 = 0 2 3 5 0
The system can be written in matrix form as:
−4𝑎 + 2𝑏 + 3𝑐 = 0 −4 2 3 0
2 3 5 0 2 3 5 0 Row1
→
−4 2 3 0 0 8 13 0 2Row1 + Row2
3 5 1
1 0 2
Row1
2 3 5 0 2 2
→
0 8 13 0 13 1
0 1 0 8
Row2
8
3 5 1
𝑎 + 𝑏 + 𝑐 = 0 𝑎=− 𝑐
⇒ 2 2 ⇒ 16
13 13
𝑏 + 𝑐 = 0 𝑏=− 𝑐
8 8
Rank and Nullity of a Matrix (cont.)
Now we can express an element of the kernel:
1 1
𝑎 − 𝑐 −
16 16
𝑥= 𝑏 = 13 =𝑐 13 where 𝑐is a scalar.
𝑐 − 𝑐 −
8 8
𝑐 1
1
−
16
That is, ker 𝐴 = 𝑁 𝐴 = 𝑠𝑝𝑎𝑛 −
13 and 𝑁𝐴 = 𝑑𝑖𝑚 𝑁 𝐴 = 1.
8
1
Rank and Nullity of a Matrix (cont.)
THEOREM:
If 𝐴 is an 𝑚 × 𝑛 matrix, then the sum of the rank of 𝐴 and the nullity of 𝐴 is the number of
columns of 𝐴 i.e. 𝑟𝑎𝑛𝑘 𝐴 + 𝑁𝐴 = 𝑛.
EXAMPLE 𝟏:
−1 2 1
Let 𝐴 = 2 −4 −2 . Find the rank of 𝐴 and the nullity of 𝐴.
−3 6 3
−1 2 1 1 −2 −1 −Row1
2 −4 −2 → 0 0 0 2Row1 + Row2
−3 6 3 0 0 0 −3Row1 + Row3
𝑟𝑎𝑛𝑘 𝐴 = Numberofleading1′ s = 1
Rank and Nullity of a Matrix (cont.)
Remark:
The row space of 𝐴 = 𝑅 𝐴 = 𝑠𝑝𝑎𝑛 1, −2, −1 (row space of 𝐴 = span of the set of the
linearly independent rows)
𝑎
To find the nullity of 𝐴, 𝑁𝐴 , we solve 𝐴𝑥 = 0 such that 𝑥 = 𝑏 . Therefore:
𝑐
1 −2 −1 𝑎 0
0 0 0 𝑏 = 0 ⇒ 𝑎 − 2𝑏 − 𝑐 = 0 ⇒ 𝑎 = 2𝑏 + 𝑐
0 0 0 𝑐 0
Hence:
2𝑏 + 𝑐 2 1
𝑥= 𝑏 =𝑏 1 +𝑐 0
𝑐 0 1
Rank and Nullity of a Matrix (cont.)
Therefore:
2 1
1 and 0 span 𝑥 (we can write 𝑥 as a linear combination of these two vectors)
0 1
2 1
Consequently, 𝑁 𝐴 = 𝑠𝑝𝑎𝑛 1 , 0 and 𝑁𝐴 = 𝑑𝑖𝑚 𝑁 𝐴 = 2.
0 1
Check:
𝑟𝑎𝑛𝑘 𝐴 + 𝑁𝐴 = 1 + 2 = 3 = 𝑛 (number of columns of 𝐴)
Rank and Nullity of a Matrix (cont.)
EXAMPLE 𝟐:
1 1 2 3 2
Let 𝐴 = . Find the nullity of 𝐴.
1 1 3 1 4
1 1 2 3 2 1 1 2 3 2 Row1
→
1 1 3 1 4 0 0 1 −2 2 −Row1 + Row2
1 1 2 3 2 1 1 0 7 −2 Row1 − 2Row2
→
0 0 1 −2 2 0 0 1 −2 2 Row2
Rank and Nullity of a Matrix (cont.)
𝑥1
𝑥2
STEP 𝟐: Find 𝑥 = 𝑥3 such that 𝐴𝑥 = 0.
𝑥4
𝑥5
𝑥1
𝑥2
1 1 0 7 −2 0 𝑥1 + 𝑥2 + 7𝑥4 − 2𝑥5 = 0
𝑥3 = ⇒
0 0 1 −2 2 𝑥4 0 𝑥3 − 2𝑥4 + 2𝑥5 = 0
𝑥5
Solving for the leading variables in terms of the non-leading variables gives:
𝑥1 = −𝑥2 − 7𝑥4 + 2𝑥5
𝑥3 = 2𝑥4 − 2𝑥5
Rank and Nullity of a Matrix (cont.)
Therefore:
−1 −7 2
1 0 0
𝑁 𝐴 = 𝑠𝑝𝑎𝑛 0 , 2 , −2
0 1 0
0 0 1
Also, these three vectors are linearly independent, thus they form a basis for 𝑁 𝐴 .
Finally, 𝑁𝐴 = 𝑑𝑖𝑚 𝑁 𝐴 = 3.
Rank and Nullity of a Matrix (cont.)
EXAMPLE 𝟑:
1 1 1 1
Let 𝐴 = . Find the nullity of 𝐴.
2 3 4 5
1 1 1 1 1 1 1 1 Row1
→
2 3 4 5 0 1 2 3 −2Row1 + Row2
1 1 1 1 1 0 −1 −2 Row1 − Row2
→
0 1 2 3 0 1 2 3 Row2
Rank and Nullity of a Matrix (cont.)
𝑥1
𝑥2
STEP 𝟐: Find 𝑥 = 𝑥3 such that 𝐴𝑥 = 0.
𝑥4
𝑥1
1 0 −1 −2 𝑥2 0 𝑥1 − 𝑥3 − 2𝑥4 = 0
𝑥3 = ⇒
0 1 2 3 0 𝑥2 + 2𝑥3 + 3𝑥4 = 0
𝑥4
Solving for the leading variables in terms of the non-leading variables gives:
𝑥1 = 𝑥3 + 2𝑥4
𝑥2 = −2𝑥3 − 3𝑥4
Rank and Nullity of a Matrix (cont.)
Therefore:
𝑥1 𝑥3 + 2𝑥4 1 2
𝑥2 −2𝑥3 − 3𝑥4 −2 −3
𝑥= 𝑥 = = 𝑥3 + 𝑥4
3 𝑥3 1 0
𝑥4 𝑥4 0 1
STEP 𝟑: Find 𝑁(𝐴) and deduce the nullity 𝑁𝐴 of 𝐴.
1 2
−2 −3
𝑁 𝐴 = 𝑠𝑝𝑎𝑛 ,
1 0
0 1
Also, these two vectors are linearly independent, thus they form a basis for 𝑁 𝐴 .
Finally, 𝑁𝐴 = 𝑑𝑖𝑚 𝑁 𝐴 = 2.
Theorem
THEOREM:
Let 𝐴 be an 𝑛 × 𝑛 matrix, then each of the following eight statements implies the other seven.
• STATEMENT 𝟏: 𝐴 is invertible
• STATEMENT 𝟐: det(𝐴) ≠ 0
• STATEMENT 𝟑: The rows are linearly independent and the columns as well
• STATEMENT 𝟒: 𝑟𝑎𝑛𝑘 𝐴 = 𝑛
• STATEMENT 𝟓: 𝑁𝐴 = 0
• STATEMENT 𝟔: 𝐴 is row equivalent to 𝐼𝑛 (we can change 𝐴 to 𝐼𝑛 by a sequence of elementary
row operations)
• STATEMENT 𝟕: The only solution to the homogeneous system 𝐴𝑥 = 0 is the trivial solution
𝑥=0
• STATEMENT 𝟖: The system 𝐴𝑥 = 𝑏 has a unique solution for every 𝑛 × 1 matrix 𝑏 (𝑏 is a
vector of 𝑛 rows): 𝑥 = 𝐴−1 𝑏
Linear Transformations
DEFINITION:
Let 𝑉 and 𝑊 be two vector spaces. A mapping 𝑓: 𝑉 → 𝑊 is said to be a linear transformation if:
• CONDITION 𝟏: 𝑓 𝑢 + 𝑣 = 𝑓 𝑢 + 𝑓 𝑣 ∀𝑢, 𝑣 ∈ 𝑉
• CONDITION 𝟐: 𝑓 α𝑣 = α𝑓 𝑣 ∀α ∈ Rand𝑣 ∈ 𝑉
EXAMPLE 𝟏:
Proof:
𝑓 𝑢 + 𝑣 = 0 = 0 + 0 = 𝑓 𝑢 + 𝑓 𝑣 (COND. 𝟏 verified)
𝑓 α𝑣 = 0 = α. 0 = α𝑓(𝑣) (COND. 𝟐 verified)
Linear Transformations (cont.)
EXAMPLE 𝟐:
EXAMPLE 𝟑:
Let 𝐴 be an 𝑚 × 𝑛 matrix and let 𝑓:R𝑛 → R𝑚 be the mapping defined by 𝑓 𝑣 = 𝐴𝑣∀𝑣 ∈ R𝑛 .
Therefore, 𝑓 is a linear transformation called the multiplication by 𝐴.
Proof:
𝑓 𝑢 + 𝑣 = 𝐴 𝑢 + 𝑣 = 𝐴𝑢 + 𝐴𝑣 = 𝑓 𝑢 + 𝑓(𝑣) (COND. 𝟏 verified)
𝑓 α𝑣 = 𝐴 α𝑣 = α(𝐴𝑣) = α𝑓(𝑣) (COND. 𝟐 verified)
Linear Transformations (cont.)
INTEGRAL OPERATOR:
Let 𝐶 0,1 be the set of all continuous functions defined on the interval 0,1 .
1
Let 𝐽: 𝐶 0,1 → R be the mapping defined by 𝐽 𝑓(𝑥) = 0 𝑓 𝑥 𝑑𝑥.
Therefore, 𝐽 is a linear transformation.
Proof:
1 1 1
𝐽 𝑓 𝑥 + 𝑔(𝑥) = 𝑓 𝑥 + 𝑔(𝑥) 𝑑𝑥 = 𝑓 𝑥 𝑑𝑥 + 𝑔 𝑥 𝑑𝑥 = 𝐽 𝑓 𝑥 +𝐽 𝑔 𝑥
0 0 0
1 1
𝐽 α𝑓 𝑥 = α𝑓 𝑥 𝑑𝑥 = α 𝑓 𝑥 𝑑𝑥 = α𝐽,𝑓 𝑥 -
0 0
Linear Transformations (cont.)
DIFFERENTIAL OPERATOR:
Let 𝐷:𝐶 +1 ,0,1- → 𝐶,0,1- be the mapping defined by 𝐷 𝑓(𝑥) = 𝑓′(𝑥).
Therefore, 𝐷 is a linear transformation.
Proof:
𝐷 𝑓 𝑥 + 𝑔(𝑥) = 𝑓 𝑥 + 𝑔(𝑥) ′ = 𝑓 ′ 𝑥 + 𝑔′ 𝑥 = 𝐷 𝑓 𝑥 + 𝐷,𝑔 𝑥 -
𝐷 α𝑓 𝑥 = α𝑓(𝑥) ′ = α𝑓 ′ 𝑥 = α𝐷,𝑓 𝑥 -
Linear Transformations (cont.)
ROTATION:
Let 𝒗′ = (𝑥 ′ , 𝑦 ′ ) be the vector obtained by rotating 𝒗 = (𝑥, 𝑦) an angle θ counterclockwise.
cos π − 𝑥 = − cos 𝑥
𝑥 ′ = −𝑟 cos π − α + θ = 𝑟 cos α + θ
𝑣′ = 𝑟 𝑣 =𝑟
𝑦 𝒗 cos 𝑎 + 𝑏 = cos 𝑎 cos 𝑏 − sin 𝑎 sin 𝑏
𝒗′ 𝑦′
θ
α
𝑥 ′ = 𝑟 cos α cos θ − 𝑟 sin α sin θ = 𝑥 cos θ − 𝑦 sin θ
𝑥′ 𝑥
sin π − 𝑥 = sin 𝑥
𝑦 ′ = 𝑟 sin π − α + θ = 𝑟 sin α + θ
In matrix notation:
𝑥′ cos θ − sin θ 𝑥
= 𝑦
𝑦′ sin θ cos θ
𝑣′ 𝐴 𝑣
Consequently, 𝑣 ′ = 𝐴𝑣.
PROPERTY 𝟏: 𝑓 0 = 0
Proof: 𝑓 0 = 𝑓 0 + 0 = 𝑓 0 + 𝑓(0) (since 𝑓 is a linear transformation)
⇒ 𝑓 0 = 2𝑓 0 ⇒ 𝑓 0 = 0
PROPERTY 𝟐: 𝑓 −𝑣 = −𝑓(𝑣)
Proof: 𝑓 α𝑣 = α𝑓(𝑣) where α = −1 (since 𝑓 is a linear transformation)
PROPERTY 𝟑: 𝑓 α𝑢 + β𝑣 = α𝑓 𝑢 + β𝑓(𝑣)
Proof: 𝑓 α𝑢 + β𝑣 = 𝑓 α𝑢 + 𝑓 β𝑣 (since 𝑓 is a linear transformation)
𝑓 α𝑢 + 𝑓 β𝑣 = α𝑓 𝑢 + β𝑓(𝑣) (since 𝑓 is a linear transformation)
Linear Transformations (cont.)
DEFINITION (Matrix 𝑴(𝒇) of 𝒇):
Let 𝑓:R𝑛 → R𝑚 be a linear transformation. Let 𝐵 = 𝑒1 , 𝑒2 , … , 𝑒𝑛 be the standard basis of R𝑛 .
The matrix 𝑀(𝑓) of 𝑓 is the 𝑚 × 𝑛 matrix whose columns are the vectors 𝑓(𝑒1 ), 𝑓(𝑒2 ), …, 𝑓(𝑒𝑛 ).
EXAMPLE:
Let 𝑓:R2 → R2 . 𝐵 = 𝑒1 , 𝑒2 is the standard basis of R2 . The matrix 𝑀(𝑓) of 𝑓 is:
𝑚11 𝑚12
𝑀 𝑓 = 𝑚 𝑚22
21
𝑓(𝑒1 ) 𝑓(𝑒2 )
Linear Transformations (cont.)
THEOREM:
𝑓 𝑣 = 𝑀 𝑓 .𝑣
EXAMPLE 𝟏:
Let 𝑓:R2 → R3 be the linear transformation defined by 𝑓 𝑥, 𝑦 = 𝑥 − 2𝑦, 3𝑥, 2𝑥 + 𝑦 .
Find the matrix 𝑀(𝑓) of 𝑓.
1
1
𝑇 𝑒1 =𝑇 0 =
0
0
0
0 1 0 0
𝑇 𝑒2 =𝑇 1 = 𝑀 𝑇 =
1 0 1 0
0
0
0
𝑇 𝑒3 =𝑇 0 =
0
1
𝑥 𝑥
1 0 0 𝑦 = 𝑦
Check: 𝑇 𝑢 = 𝑀 𝑇 . 𝑢 =
0 1 0 𝑧