Matrices: B, Etc. The Entries of Matrix A May Be Denoted As A
Matrices: B, Etc. The Entries of Matrix A May Be Denoted As A
Concept:
𝐴 = [𝑎𝑖𝑗 ]
1
The determinant of matrix:
The determinant of a matrix is a scalar value that is used in many matrix
operations. The matrix must be square (equal number of columns and rows) to
have a determinant. The notation for absolute value is used to indicate "the
𝑎 𝑏
determinant of", e.g. |𝑨| means "the determinant of matrix A" and | | means
𝑐 𝑑
to take the determinant of the enclosed matrix. Methods for finding the determinant
vary depending on the size of the matrix.
𝑎 𝑏 a b
where 𝐴 = [ ], det(A) = |A| = | | = ad - bc
𝑐 𝑑 c d
A=
2
The determinant of a 3×3 matrix can be calculated by the following
process:
𝐚𝟏𝟏 𝐚𝟏𝟐 𝐚𝟏𝟑
𝐀 = [𝐚𝟐𝟏 𝐚𝟐𝟐 𝐚𝟐𝟑 ]
𝐚𝟑𝟏 𝐚𝟑𝟐 𝐚𝟑𝟑
Solution:
First method:
𝟐 𝟏 𝟔 𝟐 𝟏
|𝐀| = | 𝟎 𝟐 𝟑| 𝟎 𝟐
−𝟏 𝟎 𝟓 −𝟏 𝟎
- - - + + +
3
Matrices addition and subtraction:
𝑎 𝑏 𝑒 𝑓
For example purposes, let A = [ ] and B = [ ]
𝑐 𝑑 𝑔 ℎ
𝑎±𝑒 𝑏±𝑓
then A ± B = [ ]
𝑐±𝑔 𝑑±ℎ
Ex.: Find addition and subtraction between A and B of the following matrices:
𝟓 −𝟐 𝟐 −𝟐
𝐀 = [−𝟏 𝟑 ] and 𝐁 = [𝟎 𝟏]
𝟏 𝟎 𝟒 −𝟏
Solution:
𝟓 −𝟐 𝟐 −𝟐 𝟕 −𝟒
A + B = [−𝟏 𝟑 ] + [𝟎 𝟏 ] = [−𝟏 𝟒 ]
𝟏 𝟎 𝟒 −𝟏 𝟓 −𝟏
𝟓 −𝟐 𝟐 −𝟐 𝟑 𝟎
A - B = [−𝟏 𝟑 ] − [𝟎 𝟏 ] = [−𝟏 𝟐]
𝟏 𝟎 𝟒 −𝟏 −𝟑 𝟏
H.W.:
Q) Find addition and subtraction between A and B of the following matrices:
𝟏 𝟏. 𝟓 𝟐 𝟏 𝟏 −𝟏
𝐀 = [𝟎 −𝟎. 𝟓 𝟏 ] and 𝐁 = [−𝟐 𝟐 𝟐]
𝟏 𝟐. 𝟓 −𝟑 −𝟏 𝟐 𝟏
4
Matrix by Matrix Product:
We now pass to the most general matrix-by-matrix product, and consider the
operations involved in computing the product C of two matrices A and B:
C = AB
AB = [𝒂𝒄 + 𝒃𝒅]
𝟔
For example: 1. 𝐀 = [𝟐 −𝟑] and B = [ ]
𝟓
AB = [𝟏𝟐 − 𝟏𝟓] = [−𝟑]
𝟑
2. 𝐀 = [𝟐 −𝟒 𝟑]
𝟑 𝟐] and B = [−𝟐
𝟓
AB = [𝟔 − 𝟏𝟐 − 𝟔 + 𝟏𝟎] = [−𝟐]
5
Multiplying two 2×2 matrices:
If A and B are two matrices then the product AB is obtained by multiplying
the rows of A with the columns of B in the manner described above.
Solution:
𝟏 𝟐 𝟏 −𝟏 −𝟑 𝟏
𝑪=𝑨×𝑩 = [ ]× [ ]= [ ]
𝟑 𝟒 −𝟐 𝟏 −𝟓 𝟏
H.W.:
Q) 1. Find the product AB where:
𝟏 𝟏 𝟏 −𝟏
𝐀= [ ] and 𝐁 = [ ]
𝟏 𝟏 −𝟏 𝟏
𝐚 𝐛 𝟏 𝟎
2. 𝐀 = [ ] and 𝐁 = [ ]
𝐜 𝐝 𝟎 𝟏
6
Multiplying two 3×3 matrices:
The definition of the product C = AB where A and B are two 3 × 3 matrices
is as follows:
Solution:
𝟏 𝟐 −𝟏 𝟐 −𝟏 𝟑 𝟒 −𝟖 𝟕
𝑪 = 𝑨 × 𝑩 = [𝟑 𝟒 𝟎 ] × [𝟏 −𝟐 𝟏 ] = [𝟏𝟎 −𝟏𝟏 𝟏𝟑]
𝟏 𝟓 −𝟐 𝟎 𝟑 −𝟐 𝟕 −𝟏𝟕 𝟏𝟐
H.W.:
7
Inverse of Matrix:
We must be follow the following steps to calculate inverse matrix:
1. Calculate determinant of matrix.
2. Minors of matrix.
3. Cofactor of matrix (-1)i+jaaij
4. Adjoint matrix (adj) (Transpose of cofactor)
𝑎𝑑𝑗𝐴
5. A-1 = |𝐴|
Solution:
|𝑨| = −𝟏(−𝟒 − 𝟑) − (𝟏𝟐 + 𝟏) + 𝟐(𝟗 − 𝟏) = 𝟕 − 𝟏𝟑 + 𝟏𝟔 = 𝟏𝟎
−𝟕 𝟏𝟑 𝟖
Minors of Matrix A = [−𝟐 −𝟐 −𝟐]
𝟑 −𝟕 −𝟐
−𝟕 −𝟏𝟑 𝟖
Cofactor matrix = [ 𝟐 −𝟐 𝟐]
𝟑 𝟕 −𝟐
−𝟕 𝟐 𝟑
Adjoint matrix = [−𝟏𝟑 −𝟐 𝟕]
𝟖 𝟐 −𝟐
−𝟕 𝟐 𝟑
[−𝟏𝟑 −𝟐 𝟕] −𝟎. 𝟕 𝟎. 𝟐 𝟎. 𝟑
-1 𝑨𝒅𝒋𝒐𝒊𝒏𝒕 𝒎𝒂𝒕𝒓𝒊𝒙 𝟖 𝟐 −𝟐
A = |𝑨|
= = [−𝟏. 𝟑 −𝟎. 𝟐 𝟎. 𝟕 ]
𝟏𝟎
𝟎. 𝟖 𝟎. 𝟐 −𝟎. 𝟐
8
H.w.:
Q) Calculate inverse matrix of the following matrix:
𝟏 𝟑 𝟑
A = [𝟏 𝟒 𝟑]
𝟐 𝟕 𝟕
Matrix algebra allows us to write the solution of the system using the inverse
matrix of the coefficients. In practice the method is suitable only for small systems.
Its main use is the theoretical insight into such problems which it provides.
AX= B
X = A-1B
X = variables
A = matrix of coefficient variables
B = matrix of constant
9
Ex.: Solve the following equations using matrix methods:
x1 - 2x2 + x3 = 3
2x1 + x2 - x3 = 5
3x1 - x2 + 2x3 = 12
Solution:
AX = B
X = A-1B
𝟏 −𝟐 𝟏 𝐱𝟏 𝟑
[𝟐 𝟏 𝐱
−𝟏] [ 𝟐 ] = [ 𝟓 ]
𝟑 −𝟏 𝟐 𝐱𝟑 𝟏𝟐
𝐱𝟏 𝟏 −𝟐 𝟏 −𝟏 𝟑
𝐱
[ 𝟐 ] = [𝟐 𝟏 −𝟏] [ 𝟓 ]
𝐱𝟑 𝟑 −𝟏 𝟐 𝟏𝟐
𝟏 −𝟐 𝟏 −𝟏 𝟎. 𝟏 𝟎. 𝟑 𝟎. 𝟏
-1
A = [𝟐 𝟏 −𝟏] = [−𝟎. 𝟕 −𝟎. 𝟏 𝟎. 𝟑]
𝟑 −𝟏 𝟐 −𝟎. 𝟓 −𝟎. 𝟓 𝟎. 𝟓
𝐱𝟏 𝟎. 𝟏 𝟎. 𝟑 𝟎. 𝟏 𝟑
[𝐱 𝟐 ] = [−𝟎. 𝟕 −𝟎. 𝟏 𝟎. 𝟑] [ 𝟓 ]
𝐱𝟑 −𝟎. 𝟓 −𝟎. 𝟓 𝟎. 𝟓 𝟏𝟐
x1 = 3
x2 = 1
x3 = 2
10
H.W.:
Q) Solve the following equations using matrix methods:
2 x1 + x2 - x3 = 0
x1 + x3 = 4
x1 + x2 + x3 = 0
11