Linear Algebra 2023 1
Linear Algebra 2023 1
Linear Algebra 2023 1
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 1
MATRIX ALGEBRA
LINEAR ALGEBRA FOR ECE
BATANGAS STATE UNIVERSITY
AY 2022-2023
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 2
Introduction to Matrices
• A matrix is a rectangular array of scalars (numbers or functions) enclosed in a
bracket.
• The numbers (or functions) in a matrix are called entries or elements.
• Let
• Find kA if k = 3 and k = 2 + 4i
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 6
Matrix Multiplication
• Two matrices A and B can be multiplied iff the number of columns of A equals
the number of rows of B
• The product of two matrices A (m × r) and B (r × n) are is an m × n matrix
whose entries are obtained by multiplying each entry in the rows of matrix A
by the corresponding entry in the columns of matrix B.
r n== 33 np ==2 2
𝐌 = 𝐀 × 𝐁 !""#""$ np== 22 !"#" $
𝒎×𝒏 𝒎×𝒓 𝒓×𝒏
ì
ï é a11 a12 a13 ù !"#"$ é c11 c12 ù ü
ï
ï êa ú é b11 b12 ù ê ú ï
ïï a a
ê 21 22 23 ú êb c c
ú = ê 21 22 ú ïï
m=4 í
m = 4 b ý mm
= 4= 4
• Matrix multiplication is ï ê a31 a32 a33 ú ê 21 22 ú êc31 c32 ú ï
not commutative ï
ê ú êëb31 b32 úû ê ú ï
ë a41 a42 a43 û ëc41 c42 û
ï ï
ïî ïþ
é 3 5 -1ù é 2 -2 3 1 ù é 22 -2 43 42 ù
AB = êê 4 0 2 úú êê 5 0 7 8 úú = êê 26 -16 14 6 úú
êë -6 -3 2 úû êë 9 -4 1 1 úû êë -9 4 -37 -28 úû
é 2 -2 3 1 ù é 22 -2 43 42 ù
ê 5 0 7 8 ú = ê 26 -16 14 6 ú
ê ú ê ú
êë 9 -4 1 1 úû êë -9 4 -37 -28 úû
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 8
Example 3:
• Get the product AB
8 7 −4
𝐴𝐵 =
13 3 −5
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 9
Properties of Matrix Multiplication
EXAMPLE 4:
4 2 3 3 4 2
1 8 5 5 1 8
1 1
3 6 1 2 2 3 6 1
4 4
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 10
Commutator
• The commutator of two matrices A and B denoted by [A, B] and is computed
[A, B] = AB – BA
• Example 5:
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 11
Transposition
• Obtained by writing the rows as columns and vice versa
• The transpose of matrix A is AT
• Can be used to convert row vectors to column vectors and conversely
(a) ( A T )T = A
(b) (A + B)T = A T + BT
(c) cA)T = cA T
(d) ( AB)T = BT A T .
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 12
Special Matrices
• Symmetric matrices – square matrices whose transpose is equal to the
original matrix
• Skew-symmetric – square matrices whose transpose quals the negative of the
original matrix
é 20 120 200 ù
A = êê120 10 150 úú is symmetric, and
êë 200 150 30 úû
é 0 1 -3 ù
B = êê -1 0 -2 úú is skew-symmetric.
êë 3 2 0 úû
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 13
Special Matrices
• Upper triangular Matrix – square matrix whose elements below the main
diagonal are zeros
• Lower triangular matrix – square matrix whose entries below the main
diagonal are nonzeros
• The entries on the main diagonal of a triangular matrix may be zero or not
é3 0 0 0ù
é1 4 2ù é2 0 0ù ê9 -3
é1 3ù ê0 3 2 ú , ê 8 -1 0 ú , ê 0 0 úú
ê0 2 ú , ê ú ê ú ê1 0 2 0ú
ë û êë0 0 6 úû êë7 6 8 úû ê ú
ë1 9 3 6û
Upper triangular Lower triangular
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 14
Special Matrices
• Diagonal matrix – square matrix all of whose entries are zero except the main
diagonal
• Scalar matrix – a diagonal matrix whose main diagonal entries are all the same
𝐀𝐒 = 𝐒𝐀 = 𝑐𝐀
• Identity matrix – scalar matrix whose main diagonal entries are all 1.
𝐀𝐈 = 𝐈𝐀 = 𝐀
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 15
Hermitian Conjugate
• The Hermitian conjugate of matrix A is denoted as A† and can be obtained by
• Taking the transpose of the matrix and
• Taking the complex conjugate of the elements
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 16
Trace of a Matrix
• The trace of a square matrix is the sum of all the elements in the main
diagonal
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 17
Inverse Matrix
• The inverse of a square matrix denoted by A-1 satisfies the relation AA-1 = I
• Not all square matrices have an inverse.
• A matrix that has an inverse is called nonsingular.
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 18
SYSTEMS OF LINEAR EQUATIONS
ADVANCED ENGINEERING MATHEMATICS
BATANGAS STATE UNIVERSITY
Department of Electronics Engineering
AY 2022-2023
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 19
Introduction
• A linear system of m equations in n unknowns x1, … , xn is a set of equations
of the form
a11 x1 + ! + a1n xn = b1
a21 x1 + ! + a2 n xn = b2
!!!!!!!!
am1 x1 + ! + amn xn = bm .
• The system is called linear because each variable xj appears in the first power
only
• If all bj are zero, the system is said to be homogeneous.
• If at least one bj is not zero, then (1) is called a nonhomogeneous system.
• A solution of (1) is a set of numbers x1, … , xn that satisfies all the m equations.
• A solution vector of (1) is a vector x whose components form a solution of (1).
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 20
Matrix Form of the Linear System
• The linear system of m equations may also be written in vector form Ax = b
é x1 ù
a11 x1 + ! + a1n xn = b1 é a11 a12 ! a1n ù ê×ú
êa é b1 ù
a21 x1 + ! + a2 n xn = b2 a22 ! a2 n úú ê ú
A = ê 21 , and x=ê × ú and b = êê " úú
!!!!!!!! ê × × ! × ú ê ú
ê ú ê×ú êëbm úû
am1 x1 + ! + amn xn = bm . ë am 1 am 2 ! amn û
êë xn úû
coefficient matrix
é a11 ! a1n b1 ù The augmented matrix à determines the system completely.
ê × ! × × úú
" =ê
A
ê × ! × × ú
ê ú
ë am 1 ! amn bm û
augmented matrix
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 21
Solution of Linear Systems
• The solution of a linear system can be obtained by performing elementary row
operations in a process known as Gauss elimination.
• Elementary row operation for matrices include:
1. Interchange of two rows
2. Addition of a constant multiple of one row to another row
3. Multiplication of a row by a nonzero constant c
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 22
Terminologies
A linear system is called overdetermined if it has more equations than
unknowns, determined if m = n, and underdetermined if it has fewer
equations than unknowns.
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 23
Example 8: Gauss Elimination
• Solve the linear system
x1 - x2 + x3 = 0
- x1 + x2 - x3 = 0
10 x2 + 25 x3 = 90
20 x1 + 10 x2 = 80.
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 24
Example 8:
• Result:
é 1 -1 1 0ù x1 - x2 + x3 = 0
ê0 0 0 0 ú Row 2 - Row 1 0= 0
ê ú
ê0 10 25 90 ú 10 x2 + 25 x3 = 90
ê ú
ë0 30 -20 80 û Row 4 - 20 Row 1 30 x2 - 20 x3 = 80.
• Eliminate x2
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 25
Example 8:
• Result
é 1 -1 1 0ù x1 - x2 + x3 = 0
ê0 10 25 90 ú 10 x2 + 25 x3 = 90
ê ú
ê0 0 -95 -190 ú Row 3 - 3 Row 2 -95 x3 = -190
ê ú 0= 0.
ë 0 0 0 0 û
Back Substitution. Determination of x3, x2, x1 (in this order)
Working backward from the last to the first equation of this “triangular”
system, we can now readily find x3, then x2, and then x1:
190
𝑥1 = = 2, 10𝑥2 + 25 2 = 90, 𝑥2 = 4, 𝑥. = 𝑥2 − 𝑥1 = 2
95
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 26
The Row Echelon Form
• At the end of the Gauss elimination the form of the coefficient matrix, the
augmented matrix, and the system itself are called the row echelon form.
• The original system of m equations in n unknowns has augmented matrix
[A | b]. This is to be row reduced to matrix [R | f].
• The two systems Ax = b and Rx = f are equivalent, and the solutions are
identical.
ér11 r12 ! ! ! r1n f1 ù
ê r ! ! ! r f ú
ê 22 2n 2 ú
ê " ! ! # # ú
ê ú
ê rrr
! rrn
f r ú
ê fr +1 ú
ê ú
ê # ú Here, and all entries in the blue
triangle and blue rectangle are zero.
êë fm úû
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 27
Example 9:
• Find the solution of the linear system
• Solution:
• Elimination of x1
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 28
Continuation
• Elimination of x2
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 29
Example 10:
• Solve the following linear system of three equations in four unknowns whose
augmented matrix is
• Solution:
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 30
Continuation
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 31
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 32
Information from the Row-Echelon Form
The number of nonzero rows, r, in the row-reduced coefficient matrix R is
called the rank of R and also the
rank of A. Here is the method for determining whether
Ax = b has solutions and what they are:
• (a) No solution. If r is less than m (meaning that R actually has at least one
row of all 0s) and at least one of the numbers fr+1, fr+2, … , fm is not zero, then
the system Rx = f is inconsistent: No solution is possible. Therefore, the system
Ax = b is inconsistent as well.
• See Example 9, where r = 2 < m = 3 and fr+1 = f3 = 12.
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 33
Information from the Row-Echelon Form
If the system is consistent (either r = m, or r < m and all the numbers fr+1, fr+2, … ,
fm are zero), then there are solutions.
(b) Unique solution. If the system is consistent and r = n, there is exactly one
solution, which can be found by back substitution. See Example 8, where r = n
= 3 and m = 4, and Example 11
(c) Infinitely many solutions. To obtain any of these solutions, choose values of
xr+1, … , xn arbitrarily. Then solve the rth equation for xr (in terms of those
arbitrary values), then the (r − 1)st equation for xr−1, and so on up the line. See
Example 10.
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 34
Determinants by Reduction to Triangular Form
2 0 -4 6
4 5 1 0
D=
0 2 6 -1
-3 8 9 1
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 35
2 0 -4 6
4 5 1 0
D=
0 2 6 -1
-3 8 9 1
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 36
Solution of Linear Systems Using Cramer’s Rule
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 37
Inverse of a Matrix
• The inverse of an n × n matrix A = [ajk] is denoted by A−1 and is an n × n matrix
such that
(1) AA−1 = A−1A = I
where I is the n × n unit matrix.
The inverse A−1 of an n × n matrix A exists if and only if rank A = n, thus if and only
if det A ≠ 0. Hence A is nonsingular if rank A = n and is singular if rank A < n.
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 38
Inverse of a Matrix: Gauss-Jordan Elimination
• Determine the inverse A−1 of
é -1 1 2 ù
A = êê 3 -1 1 úú .
êë -1 3 4 úû
é -1 1 2 1 0 0ù
ê 1 0 1 0 úú
éë A I ùû = ê 3 -1
êë -1 3 4 0 0 1 úû
é -1 1 2 1 0 0ù
= êê 0 2 7 3 1 0 úú Row 2 + 3 Row 1
êë 0 2 2 -1 0 1 úû Row 3 - Row 1
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 39
Inverse of a Matrix: Gauss-Jordan Elimination
• Continuation:
é -1 1 2 1 0 0 ù
= êê 0 2 7 3 1 0 úú
êë 0 0 -5 -4 -1 1 úû Row 3 - Row 2
é 1 -1 -2 -1 0 0 ù - Row 1
= êê0 1 3.5 1.5 0.5 0 úú 0.5 Row 2
êë0 0 1 0.8 0.2 -0.2 úû -0.2 Row 3
éC11 C 21 ! C n1 ù
êC ! Cn 2 úú
1 T 1 ê 21 C 22
-1
A = éC jk ù = ,
det A ë û det A ê × × ! × ú
ê ú
ëC1n C 2 n ! Cnn û
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 42
Example: Inverse of a Matrix by Determinants
• Find the inverse of the 2 × 2 matrix
é3 1ù
A=ê ú ,
ë2 4û
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 43
Example: Inverse of a Matrix by Determinants
• Using determinants, find the inverse of the given matrix
é -1 1 2 ù
A = êê 3 -1 1 úú . det A = −1(−7) − 1 · 13 + 2 · 8 = 10
êë -1 3 4 úû
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 45
Example:
• Find the inverse of the matrix
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 46
Matrix Eigenvalue Problems
• A matrix eigenvalue problem considers the vector equation
Ax = λx.
• Where A is a square matrix.
• The λ’s that satisfy the equation are called eigenvalues of A and the
corresponding nonzero x’s that also satisfy are called eigenvectors of A.
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 47
Example:
• Find the eigenvalues of the matrix
é -5 2 ù
A=ê ú .
ë 2 -2 û
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 48
Eigenvalues
• In matrix notation,
( A - l I ) x = 0.
• This homogeneous linear system of equations has a nontrivial solution if and
only if the corresponding determinant of the coefficients is zero:
é -2 2 -3 ù
A = êê 2 1 -6 úú .
êë -1 -2 0 úû
Advanced Engineering Mathematics BatStateU Alangilan, EIM Department Engr. Jefril M. Amboy, MSECE 50