02 Solution to Systems of Linear Equations I
02 Solution to Systems of Linear Equations I
Linear Equations I
Outline
• Matrices
• Special Types of Matrices
• Matrix Operations
• Determinant
• Adjoint
• Inverse
• Systems of Linear Equations
Matrices
• Matrix – a rectangular array of numbers of functions arranged in rows
• An 𝑚 × 𝑛
(m) and columns (n)
⋯ 𝑎
�1
𝑎11
�2𝑛
𝑛
𝐴
matrix:
𝑎21
𝑎12 ⋮ ⋱ ⋮
= 𝑎 ⋯
𝑎𝑚1
22
𝑎𝑚
𝑛
𝑎𝑚2
Special Types of Matrices
1. Row Matrix or Row Vector 7. Scalar Matrix
2. Column Matrix or 8. Identity Matrix
Column Vector 9. Null Matrix
3. Square Matrix 10. Symmetric Matrix
4. Upper Triangular Matrix 11. Skew Symmetric Matrix
5. Lower Triangular Matrix
6. Diagonal Matrix
Special Types of Matrices
𝐴 … 𝑎𝑛
𝑎1 𝑎2
= 𝑏
1. Row Matrix or Row Vector –
matrix consisting of only one
row
1
𝐵 = 𝑏
2. Column Matrix or Column Vector –
matrix consisting of only one column
𝑐1 𝑏
𝑐1𝑛
2
𝑐1
⋮
𝐶
3. Square Matrix – matrix in which the
1 2 3
number of rows is equal to the
= 𝑐2 𝑐2 𝑐2
number of columns
1 2 3
Special Types of Matrices
𝑐1 𝑐1 𝑐1
𝐶
3. Square Matrix – matrix in which the
1 2 3
number of rows is equal to the
= 𝑐2 𝑐2 𝑐2
number of columns
• Principal Diagonal or Main Diagonal –
1 2 3
elements of the square whose row index
𝑐𝑖𝑗 where 𝑖 = 𝑗 𝑐3 𝑐3 𝑐3
is the same as their column index.
1 2 3
• Trace – sum of the elements of
the
𝑙11 0 0
𝐿 𝑙22 0
5. Lower Triangular Matrix – a square
𝑙21
= 𝑙33
matrix whose elements above the
𝑙31 𝑙32
principal diagonal are zero
= 0 0 𝑠
whose diagonal elements are equal
0 00 ⋯ 0
elements along the main diagonal are
0 00 0⋯
equal to 1.
9. Null Matrix – represented by 𝑂, is 0
𝑂
⋮ 1⋮ ⋱ ⋮
=
0 0 ⋯ 0
a matrix in which all the elements
are zero.
Special Types of Matrices
1 2 4
whose element 𝒂𝒊𝒋 = 𝒂𝒋𝒊. 𝑌 2 2
10. Symmetric Matrix – a square matrix
= −5
4 −5 3
10. Skew Symmetric Matrix – 𝐾 0 2
= −4
element 𝒂𝒊𝒋 = −𝒂𝒋𝒊.
a square matrix whose
−2 0
−5
4 5
Matrix Operations
1. Matrix Addition
2. Scalar Multiplication
3. Matrix Subtraction
4. Matrix Transposition
5. Matrix Multiplication
6. Matrix Exponentiation
Matrix Operations
1. Matrix Addition – must be the same
size
Matrix Operations
2. Scalar Multiplication
Matrix Operations
3. Matrix Subtraction – must be the same
size
Matrix Operations
4. Matrix Transposition – swap row and column index
Matrix Operations
5. Matrix Multiplication – let 𝐶 =
𝐴𝐵
• Matrix 𝑨 is an 𝒎 × 𝒏 matrix
• Matrix 𝑩 is an 𝒏 × 𝒑 matrix
• Matrix 𝑪 is an 𝒎 × 𝒑 matrix
• for 𝑖 = 1: 𝑚
• for• 𝑗𝐶= 1:=𝑝𝑠𝑢𝑚(𝐴 𝑖, : .∗ 𝐵
:,𝑗 ′)
𝑖, 𝑗
• end
• end
Matrix Operations
6. Matrix Exponentiation – repeated (square) matrix multiplication
Determinant
• Determinant – a scalar value that tells us some properties of a square
matrix
• It can tell us if a matrix is invertible and can be used in solving the inverse of
a matrix
1 2 = 𝑎11𝑎22 − 𝑎21
𝑎2 𝑎2
𝑎1 𝑎1 𝑎1 𝑎1 𝑎12 𝑎12
1 𝑎 2 𝑎11 22𝑎33 + 𝑎12𝑎23𝑎31 + 𝑎13𝑎21
𝑎32 𝑎
1 2 3 1 22
𝑎2 𝑎2 𝑎2 𝑎2 = −𝑎31𝑎22𝑎13 − 𝑎32𝑎23𝑎11 −
1 2 3 1 𝑎32
𝑎3 𝑎3 𝑎3 𝑎3 𝑎33𝑎21𝑎12
1 2 3 1
Determinant
• Methods in Solving for the Determinant
2. Cofactor Method
det = 𝑜𝑟 =
is:
𝐴 𝑘=1 det 𝐴 𝑘=1
Determinant
• Methods in Solving for the Determinant
• Complementary Minor, 𝒅𝒆𝒕(𝑴𝒊𝒋) or |𝑴𝒊𝒋| – also known as minor of an element 𝒂𝒊𝒋 of
2. Cofactor Method
the matrix 𝐴 is the determinant of the sub-matrix 𝑀𝑖𝑗 obtained after eliminating the 𝑖𝑡ℎ
and of matrix 𝐴
𝑗𝑡ℎ
row column
𝑎11 𝑎12 𝑎13
𝐴 = 𝑎21 𝑎22 𝑎23
𝑎31 𝑎32 𝑎33
det = 𝑜𝑟 det 𝐴 =
is:
𝐴 𝑘=1 𝑘=1
• We can choose any row or column in getting the determinant of a
given matrix.
• Expanding in a row or column with many zeros is a good choice because
it will cancel out many minors, so we do not need to calculate them.
Determinant
• Methods in Solving for the Determinant
1)
• Let matrix 𝐴 = [𝑎𝑖𝑗 ] with 𝑎𝑖𝑖 ≠ 0
of determinants.
determinants.
𝑎11 𝑎12 𝑎11 𝑎13 𝑎11 𝑎1𝑛
⋯ 𝑎21 𝑛
• Explicitly,
𝑎21 𝑎22 𝑎21 𝑎23
8𝑦 𝑦 𝑦
𝑦
5. 6𝑥 18 (or columns) 18 2𝑥𝑦
3 a square 𝐴 = [𝑎 3] were
18 interchanged
2𝑥 𝑥 𝑖𝑗
to 𝑦 2𝑥𝑦 2𝑥𝑦
If two rows of matrix
𝐴=0
𝐵 = |𝐴|
row (or column), then
Determinant
• Theorems on Determinants
9. If the elements of one row (or column) of a square matrix 𝐴 = [𝑎𝑖𝑗 ] of
[𝑏𝑖𝑗] and 𝐶 = [𝑐𝑖𝑗] both of order 𝑛, are formed after splitting the
𝐴 = 𝐵 + |𝐶|
binomial elements, then
10. The determinant of the product of two square matrices 𝐴 = [𝑎𝑖𝑗 ] and
B = [𝑏𝑖𝑗] of the same order 𝑛 is equal to the product of the
determinant of 𝐴 and the determinant of 𝐵
𝐴𝐵 = 𝐴 |𝐵|
Determinant
• Theorems on Determinants
11. The determinant of a triangular matrix is equal to the product of
the
elements in its principal diagonal.
12. The determinant of an Identity Matrix is equal to 1.
Adjoint
• Adjoint – a square matrix with the same order as the matrix we are
getting the adjoint of, that is the transpose of the matrix composed
𝑎𝑑𝑗 𝐴 = [𝐴𝑖𝑗]′
of its cofactors.
Inverse
• Inverse – a square matrix with the same order as the matrix we are
getting the inverse of, such that the product of the original matrix
=
and its inverse is the Identity Matrix.
𝐴
𝐴− 𝐴𝐼𝑛
𝐴1−1 = 𝐼𝑛
• Not all matrices has an inverse.
• If a matrix has an inverse, we say that the matrix is invertible or non-singular.
• If a matrix does not have an inverse, we say that it is non-invertible or
• The inverse of a matrix 𝐴 can be calculated from its adjoint and determinant:
singular. The determinant of a singular matrix is zero.
𝑎𝑑𝑗 𝐴
𝐴 −1 =
𝐴
Systems of Linear Equations
𝐴𝑋 = 𝐵
• We can write this in matrix form:
𝑋
𝑎3 𝑎3 �1 �1
𝑎 𝑎
�22 𝑎�32 𝑥
� = 𝑏
1
2𝑥 �12
= 3 �
2 1 2 3 2
𝑏 𝑥
2
𝑥1 𝑎3 𝑎3 𝑎3
𝐵=
3
𝑏
1 2 3 3
𝑏2 3
𝑏3
Systems of Linear Equations
• Let the number of equations be 𝑚
and the number of unknowns be 𝑛
𝐴𝑋 =
• There are 3 cases for a system of linear
• 𝒎 < 𝒏: not enough equations, system 𝐵
equations:
𝑎1 𝑎1 𝑎1 𝑥 𝑏
has
•𝒎that= 𝒏:
no unique solution
=
there aremaynobe solvable,
contradicting
1 2 3
system
1
𝑥
1
• 𝒎 > 𝒏 : may be solvable, provided 𝑎2 𝑎2 𝑎2 𝑏
dependent equations.
or
provided
1 2 3 2
there are no contradicting equations and
that
removed to make the system 𝑚 = 𝑛.
𝑥
2
𝑎3 𝑎3 𝑎3
there are dependent equations that can be
𝑏
1 2 3 3
3
Systems of Linear Equations
2𝑥 + 3𝑦 =
• Contradicting equation examples:
3
2𝑥 + 3𝑦 =
7
4𝑥 + 6𝑦 =
10
2𝑥 + 3𝑦 = 3
• Dependent equation examples:
2𝑥 + 3𝑦 = 3
4𝑥 + 6𝑦 = 6
Systems of Linear Equations
• The following methods are only applicable when 𝑚 = 𝑛 (number
of equations is the same as number of unknowns):
1. Inverse Method
2. Cramer’s Rule
3. L-U Decomposition
Seatwork
• Let your Student ID be 20𝑥𝑦 − 𝑎𝑏𝑐𝑑𝑒𝑓.
𝑐 𝑑 𝑒 𝑓
• Given the following matrix:
1 0 0 3
𝐴=
6 −9 3 −2
3 0 1 0
• Solve for the following (show your complete
𝑎𝑑𝑗
solution):
• |𝐴|
𝐴
•
• 𝐴
−1