Es202 1
Es202 1
Matrices: A matrix is an array of quantities (usually numbers real or complex) that are called the
elements of the matrix. A matrix may be expressed in capital letters
m: number of rows
n: number of columns
We often use square brackets [] for matrix representation; however, {} and () can also be used in some
cases in the literature.
(columns are counted from left to right and rows are counted from top to bottom)
i: shows the row index (element in the ith row) i=1, 2,…,m
j: shows the column index (element in the jth column) j=1, 2,…,n
m and n may or may not be equal, we use double subscript for representing large matrices
conveniently.
Ex:
0
2 4
𝑒 2𝑥 𝑒 −4𝑥 𝑒 3𝑥 −4
𝐴3𝑥2 = [−1 0] , 𝐵2𝑥3 = [ 2 ] , 𝐶4𝑥1 = [ 3 ] , 𝐷1𝑥3 = [3 0 1]1𝑥3
𝑥 cos(𝑥) 𝑥 4 2𝑥3 𝑥
2 1 3𝑥2
2 4𝑥1
1/ 11
𝑎11 𝑎12 𝑎13
𝐴3𝑥3 𝑎
= [ 21 𝑎22 𝑎23 ]
𝑎31 𝑎32 𝑎33 3𝑥3
Two matrices are said to be equal if they are at the same (size) and if their corresponding elements
are equal:
Ex:
2 4
If, 𝐸3𝑥2 = [−1 0] →A=E
2 1 3𝑥2
If, all the elements of a matrix are equal to zero, it is called a zero ‘0’ matrix.
Ex:
0 0 0
𝐹2𝑥3 = [ ]
0 0 0 2𝑥3
Matrix Algebra
1- Matrix Addition: If, 𝐴 = {𝑎𝑖𝑗 } and 𝐵 = {𝑏𝑖𝑗 } are any two matrices of the same form (mxn)
, then their sum is:
𝐴 + 𝐵 = {𝑎𝑖𝑗 + 𝑏𝑖𝑗 }
If, A and B are of the same form (size), then are said to be conformable for addition operation.
Ex:
1 2 −3 −1 6 3 0 8 0
A+B=C=[ ] +[ ] =[ ]
4 0 2 2𝑥3 8 12 14 2𝑥3 12 12 16 2𝑥3
Similarly,
2 −4 −6
A-B=D=[ ]
−4 −12 −12 2𝑥3
2- Matrix Multiplication
a) Multiplication of a matrix by a scalar:
2/ 11
𝑎11 𝑎12 … 𝑎1𝑛 𝑐𝑎11 𝑐𝑎12 … 𝑐𝑎1𝑛
𝑐𝐴 = {𝑐𝑎𝑖𝑗 }=c[ ⋮ ⋮ ⋮ ⋮ ] =[ ⋮ ⋮ ⋮ ⋮ ]
𝑎𝑚1 𝑎𝑚2 ⋯𝑎𝑚𝑛 𝑚𝑥𝑛 𝑐𝑎𝑚1 𝑐𝑎𝑚2 ⋯𝑐𝑎𝑚𝑛 𝑚𝑥𝑛
NOTES:
A(-1)A
cAAc
Ex:
2 0 6 0
0 0 0 0
İf, c=3 , 𝐴 = [ ] →𝑐𝐴 = [ ]
1 4 3 12
2 6 4𝑥2 6 18 4𝑥2
Let, 𝐴 = [𝑎𝑖𝑗 ]𝑚𝑥𝑛 be a matrix and 𝐵 = [𝑎𝑖𝑗 ]𝑛𝑥𝑝 be another matrix. Then, their product C=A.B is mxp
with elements :
c11=a11b11+a12b21+a13b31+…+a1nbn1
should be equal
Ex:
1 3 1 1 3
𝐴=[ ] , 𝐵=[ ]
2 5 2𝑥2 2 1 4 2𝑥3
(1.1 + 3.2) (1.1 + 3.1) (1.3 + 3.4) 7 4 15
𝐴𝐵 = [ ] =[ ]
(2.1 + 5.2) (2.1 + 5.1) (2.3 + 5.4) 2𝑥3 12 7 26 2𝑥3
Is not equal
Note: Matrix multiplication is noncommutative , usually, A.B≠B.A, even if A.B and B.A are defined:
3/ 11
−1 8
1 1 2 1 2 1
𝐴=[ ] ,𝐵 =[ ]
4 1 6 2 2𝑥4 1 1
12 6 4𝑥2
31 7 46 15
15 17 6 3 10 4
𝐴. 𝐵 = [ ] , 𝐵. 𝐴 = [ ]
28 51 2𝑥2 5 2 8 3
36 18 60 24 4𝑥4
Note: If, A is a square matrix, then A.A is defined and also a square matrix:
A.A=A2
A.A.A=A3
Note: There is no concellation between products. If, A.B=A.C, we cannot infer B=C.
1 1 4 2 2 7
Let, 𝐴 = [ ] ,𝐵 =[ ] ,𝐶 =[ ]
3 3 3 16 5 11
7 18
𝐴. 𝐵 = 𝐴. 𝐶 = [ ] --> B≠ 𝐶
21 54
Note: The product of two nonzero matrices may be zero: A≠0, B≠0, AB=0.
1 2 6 4
Let, 𝐴 = [ ] ,𝐵 =[ ]
0 0 −3 −2
0 0
𝐴𝐵 = [ ]
0 0
Some rules for manupulating matrices (that are conformable):
Transpose of a matrix: AT
If, matrix A is any mxn Matrix, then the transpose of A, denoted by AT , is definedto be the nxm matrix
that results from interchanging the rows and columns of matrix A.
Amxn= [𝑎′𝑓 ] → 𝐴𝑇𝑛𝑥𝑚 [𝑎𝑓𝑖 ]
or;
𝑎11 𝑎12 𝑎13 𝑎14
𝐴 = [𝑎21 𝑎22 𝑎23 𝑎24 ]
𝑎31 𝑎32 𝑎33 𝑎34 3𝑥4
leads to:
4/ 11
𝑎11 𝑎21 𝑎31
𝑎12 𝑎22 𝑎32
𝐴𝑇 = [𝑎 𝑎23 𝑎33 ]
13
𝑎14 𝑎24 𝑎34 4𝑥3
Similarly,
𝑎 𝑏 𝑐 𝑎 𝑑 𝑔
𝑇
𝐴 = [𝑑 𝑒 𝑓 ], 𝐴 = [𝑏 𝑒 ℎ]
𝑔 ℎ 𝑖 𝑐 𝑓 𝑖
Ex:
1 0
−1 6 3 3 6 𝜋
If, 𝐴 = [ ]→ 𝐴𝑇 = [ ]
0 𝜋 12 −5 3 12
3 −5
Notes:
1- (AT)T =A
2- k AT=(kA)T
3- (AB)T=BTAT
4- (A+B)T=AT+BT
𝐴 = [1 2 3]1𝑥3
Column Matrix: If, matrix has only 1 column, it is a column matrix.
1
𝐴 = [2]
3 3𝑥1
Vectors:
y z
𝑎⃗ = (𝑥, 𝑦) 𝑏⃗ = (𝑥, 𝑦, 𝑧)
x y
3D
2D x
𝐴⃗ = (𝑥, 𝑦, 𝑧) can be expressed as column matrices
or
1
[ 2] = [1 2 3]𝑇 = (1,2,3) :Duality representation (matric representation of vectors).
3 3𝑥1
5/ 11
Identity Matrix: In is an nxn (square) matrix having each element aij=0, if i≠j and aij=1 for i=j.
1 0
𝐼2 = [ ] : i=1, j=1 -> aij=1 : i=1, j=2 -> aij=0
0 1 2𝑥2
1 0 0
𝐼3 = [0 1 0]
0 0 1 3𝑥3
For identity matrices: 𝐼𝑛𝑇 = 𝐼𝑛 (Transpose of identity matrix is the matrix itself)
Submatrix of A: if, A is an mxn matrix , we can obtain a submatrix, kxl, where 1≤k ≤m and 1≤l≤n, all k,
l, m, n are integers.
1 2 3
4 5 6
Let, 𝐴 = [ ] :we can define the following submatrices (subsets):
7 8 9
10 11 12 4𝑥3
i -> -i
𝑍̅ = ̅̅̅̅̅̅̅̅
𝑎 + 𝑖𝑏 = 𝑎 − 𝑖𝑏
Matrix A is real if and only if 𝐴 = 𝐴̅
Note: A number 0 − 0𝑖 is considered to be both real and pure imaginary (0 can be considered to be
both real and complex number here)
6/ 11
Conjugate Transpose Matrix: A* (A star)
A*=(𝐴̅)𝑇 = ̅̅̅̅̅̅
(𝐴𝑇 )
1-(𝐴∗ )∗ = 𝐴
2-(𝑘𝐴)∗ = 𝑘̅ 𝐴∗
3-(𝐴 + 𝐵)∗ = 𝐴∗ + 𝐵∗
4-(𝐴𝐵)∗ = 𝐵∗ 𝐴∗
0 0 4𝑖 3
Ex: if, 𝐴 = [6 − 5𝑖 −1 −𝑖 7] , find 𝐴𝑇 , 𝐴̅ , 𝐴∗
5 + 6𝑖 8𝑖 2𝑖 0 3𝑥4
0 6 − 5𝑖 5 + 6𝑖
0 0 −4𝑖 3
0 −1 8𝑖
𝐴𝑇 = [ ] , 𝐴̅ = [6 + 5𝑖 −1 𝑖 7] ,
4𝑖 −𝑖 2𝑖
5 − 6𝑖 −8𝑖 −2𝑖 0 3𝑥4
2 7 0 4𝑥3
0 6 + 5𝑖 5 − 6𝑖
0 −1 −8𝑖
𝐴∗ = [ ]
−4𝑖 𝑖 −2𝑖
2 7 0 4𝑥3
Diagonal Matrix: D
A square matrix is diagonal if and only if there are only diagonal terms or elements different than “0”
and all off diagonal elements are “0”.
7/ 11
𝑑11 0 0 𝑑1 0 0
𝐷=[ 0 𝑑22 0 ] → [ 0 𝑑2 0]
0 0 𝑑33 3𝑥3 0 0 𝑑𝑛 𝑛𝑥𝑛
Dg=(d1, d2, …dn) diagonal matrices can be written in this form to occupy less space.
Scalar Matrix: if, all the elements in a diagonal matrix are equal, it is called a scalar matrix.
𝑐 0 0 1 0 0
𝑆 = [0 𝑐 0] = 𝑐 [0 1 0] = 𝑐𝐼𝑛
0 0 𝑐 𝑛𝑥𝑛 0 0 1 𝑛𝑥𝑛
Symmetric Matrices: a square nxn matrix is symmetric if, 𝐴 = 𝐴𝑇 ; (aij=aji).
6 8 3 6 8 3
Example: if, 𝐴 = [8 4 −1], 𝐴𝑇 = [8 4 −1]
3 −1 2 3 −1 2
Skew-Symmeric (Antisymmetric Matrix): a square nxn matrix is antisymmetric if, 𝐴 = −𝐴𝑇 ;(aij=-aji).
0 −3 4
Ex: if, 𝐴 = [ 3 0 −5], off diagonal terms are symmetric and all diagonal elements are “0”.
−4 5 0
Trace of a square matrix: Sum of diagonal elements in a square matrix.
𝑛
Ex:
3 2
𝑖𝑓, 𝐴 = [ ]; 𝑓𝑖𝑛𝑑trA -> trA=3+1=4.
4 1
Ex:
If, two matrices are not commutative , even if both of them are symmetric , the resulting matrics will
not be symmetric.
Every square matrix Anxn can be written as a sum of symmetric and antisymmetric matrix:
Anxn=B+C
1 1
𝐵𝑛𝑥𝑛 = 2 (𝐴 + 𝐴𝑇 ) , 𝐶𝑛𝑥𝑛 = 2 (𝐴 − 𝐴𝑇 )
8/ 11
Ex: Represent H as sum of symmetric and untisymmetric matrices.
1 3 5
𝐻 = [0 2 4]
0 0 6 3𝑥3
1 1 1 3 5 1 0 0 1 2 3 5
𝐵 = (𝐻 + 𝐻 𝑇 ) = ([0 2 4] + [3 2 0] ) = [ 3 4 4]
2 2 2
0 0 6 3𝑥3 5 4 6 3𝑥3 5 4 12 3𝑥3
1 3/2 5/2
= [3/2 2 2 ]
5/2 2 6 3𝑥3
1
𝐶 = (𝐻 − 𝐻 𝑇 )
2
1 1 3 5 1 0 0 1 0 3 5
= ([0 2 4] − [3 2 0] = [−3 0 4]
2 2
0 0 6 3𝑥3 5 4 6 3𝑥3 −5 −4 0 3𝑥3
0 3/2 5/2
= [−3/2 0 2 ] )
−5/2 −2 0 3𝑥3
Such decompositions can be used to decompose matrices into a symmetric and skewsymmetric parts.
We may see examples of these decompositions at fourier series when seperating two fields.
Let, A be an mxn matrix, the three elementary row operations that can be performed on A are:
𝑅𝑖 → 𝑅𝑗 , 𝑖 ≠ 𝑗
0 0 5 1 2 −1 1 2 −1
𝑅 → 𝑅2 𝑅 → 𝑅3
Ex: 𝐴 = [1 2 −1] 1 ~ [0 0 5] 2 ~ [0 1 4]
0 1 4 0 1 4 0 0 5
2-Multiply a row of a matrix by a nonzero constant “k” (a scalar).
𝑘𝑅𝑖 → 𝑅𝑖
1 0 −9 1 0 −9
Ex: 𝐴 = [0 1 4 ] 1/5𝑅3 → 𝑅3 ~ [0 1 4]
0 5 −5 0 1 −1
3-Add a scalar multiple of one row to another row.
𝑘𝑅𝑖 + 𝑅𝑗 → 𝑅𝑗 , 𝑖 ≠ 𝑗, 𝑘 ≠ 0
1 2 7 1 0 −1
Ex: 𝐴 = [0 1 4] −2𝑅2 + 𝑅1 → 𝑅1 ~ [0 1 4]
0 0 5 0 0 5
9/ 11
Row equivalence: Two matrices are row equivalent if and only if one can be obtained from the other
by a sequence of elementary row operations.
2 1 0 0 1 2
Let, 𝐴 = [ 0 1 2] , 𝐵 = [ 2 1 0]
−1 3 2 −1 3 2
𝐴~𝐵𝑖𝑓𝑅1 → 𝑅2 , 𝑅2 → 𝑅1 𝑓𝑜𝑟𝐴
Non-Zero row: At least one element is different than zero in the row.
Pivot: Leading enty: First non-zero element in a row from left to right.
2-All elements that are in the same column with pivot are zero.
3-If, any row (i) has a non-zero element it is above the zero rows defined by indises (k) , i<k.
0 1 0 0
Ex: 𝐴 = [0 0 0 2] (i=2)
0 0 0 0 (k=3)
4-If, pivot of row (i) is in the column (j) and the pivot of row (i`) is in the column (j`), (i<i`) and (j<j`).
1 0 0 0 1 0 0 0
𝑅 → 𝑅3
Ex: 𝐴 = [0 0 1 2] 2 ~ [0 1 0 3]
0 1 0 3 0 0 1 2
Ex:
0 1 3 0
𝐴 = [0 0 0 1] :RREF
0 0 0 0
1 0 0 3 1
0 1 0 −2 4
𝐵=[ ]: RREF
0 0 1 0 1
0 0 0 0 0
10/ 11
0 1 5 0 0 0 1 0 0 0
0 0 1 0 0 0 0 1 0 0
𝐶=[ ]: NOT RREF but REF -> −5𝑅2 + 𝑅1 → 𝑅1 ~ [ ]: becomes RREF
0 0 0 1 0 0 0 0 1 0
0 0 0 0 1 0 0 0 0 1
2 0 0 1 0 0 1 0 0
𝐷 = [0 1 0] NOTRREFNOTREF ->1/2𝑅1 → 𝑅1 ~ [0 1 0] − 1𝑅1 + 𝑅3 → 𝑅3 ~ [0 1 0]:
1 0 1 1 0 1 0 0 1
becomes RREF
There is exactly one (unique) RREF of a matrix (cannonical form) and it is denoted as AR.
11/ 11