Matrices Lecture 1
Matrices Lecture 1
MATHEMATICS-III
E O F
L
UNIT 1: MATRICES
L E G
C O
LECTURE 1
A I N G
G O E E R
N G I N
DEVELOPED BY MATHEMATICS FACULTY
E
DEPARTMENT OF SCIENCE & HUMANITIES
GOA COLLEGE OF ENGINEERING
MATRICES LECTURE 1
TOPICS TO BE COVERED:
E O F
L L EG
➢ INTRODUCTION TO MATRICES
A C O
➢ TYPES OF MATRICES
I N G
G O E E R
G I N
➢ MATRIX OPERATIONS
EN
➢ PROPERTIES OF MATRIX OPERATIONS
Introduction To Matrices:
Definition: A matrix is a rectangular array of objects (real or complex numbers, variables, mathematical
expressions or functions).
E O F
i.e typically a system of mn numbers which are arranged in m-rows and n-columns.
L L EG
A C O
Matrices are denoted by capital letters like A, B, C etc.
I N G
G O E E R
If matrix has ‘m’-rows and ‘n’-columns then the order of the matrix is “m x n”.
N
𝑎11 𝑎12 … 𝑎1𝑛
EN
A general m x n matrix is represented as A= . . . ... ... ...
𝑎𝑚1 𝑎𝑚2 … 𝑎𝑚𝑛
In mathematical notation A=[𝑎𝑖𝑗 ]𝑚 x 𝑛 , 𝑤ℎ𝑒𝑟𝑒 𝑎𝑖𝑗 denotes the element in the 𝑖 𝑡ℎ 𝑟𝑜𝑤 𝑎𝑛𝑑 𝑗 𝑡ℎ column.
𝑎11 , 𝑎22 , 𝑎33 , 𝑒𝑡𝑐 𝑎𝑟𝑒 called the diagonal elements of the matrix
Examples of Matrices:
1 2 5
1. 𝐴 = 0 3 2 is a matrix of order 3 x 3.
1 5 3
E O F
L L EG
In this matrix, 𝑎11 = 1, 𝑎12 = 2, 𝑎13 = 5 𝑒𝑡𝑐. The rows are [1 2 5] the first row 𝑅1 , [0 3 2] the second row
1 2
𝑅2 and 1 5 3 the third row 𝑅3 . The columns are 0 the first column 𝐶1 , 3 the second column 𝐶2 and 2
5
2. 𝐵 =
1 2
G O E E R
is a matrix of order 2 x 2
4 3
2 3
G I N
4. D =
5 3 2
6 0 1
EN
3. C = 3 2 is a matrix of order 3 x 2
1 5
is a matrix of order 2 x 3
Some Applications of Matrices:
1. Solving system of Equations: Matrices are used to solve system of linear equations. Cramer’s rule is used for this purpose.
2. Graph theory: A matrix is a convenient and useful way of representing a graph in a computer.
3.
O F
Computer Graphics & Image processing : Graphic software such as Adobe Photoshop on your personal computer uses matrices to process
E
G
linear transformations to render images. A square matrix can represent a linear transformation of a geometric object. Matrices are used to
L L E
project three dimensional images into two dimensional planes
O
C G
4. Information Technology: Many IT companies also use matrices as data structures to track user information, perform search queries, and
A R I N
manage databases. Matrices are used in the compression of electronic information
G O E
5.
6.
G I E
Cryptography: Matrices are used to write, encode, decode and send secret messages.
N
Economics: Matrix Cramer’s Rule and determinants are simple and important tools for solving many problems in business and economics
EN
related to maximize profit and minimize loss
7. Physics: Matrices are used in science of optics to account for reflection and for refraction. Matrices are also useful in electrical circuits and
quantum mechanics and resistor conversion of electrical energy. Matrices are used to solve AC network equations in electric circuits.
L L EG
• Engineering Material Sciences - Miller indices. Used for defining crystal
C O
lattice geometries.
A I N G
exist.
G O E E R
• Computer Aided Designing (CAD) - Without matrices, this subject cannot
G I N
Matrices are used for noting down all the joint variables for forward/inverse
EN
kinematics and dynamics problems of the subject. Finite Element Analysis
(FEA) and Finite Element Methods (FEM) - This subject uses many concepts of
matrices for solving problems, just like CAD does.
Types of Matrices:
1. Row matrix : A matrix which has one row and n-numbers of columns.
E O F
The general form of a row matrix of order “1 x n” is a11 a12 a13 a1n .
Ex. A = 1 3 5
L EG
8 is a row matrix having order “1 x 4”.
L
2.
C O N G
Column matrix: A matrix having one column and m-number of rows.
A I
G O E E R a11
The general form of a column matrix of order “m x 1” is a21 .
G I N
5 EN
Ex. B= 6 is a column matrix of order “3 x 1”.
am1
2
Types of matrix:
3. Rectangular matrix: A matrix 𝐴 = [𝑎𝑖𝑗 ]𝑚 x 𝑛 is called a rectangular matrix if “m ≠ n” .
−1 2 5 4
Ex 𝐴 = 3 0 6 8
−5 −4 1 0 3x4
E O F
L L EG
4. Square Matrix: A matrix 𝐴 = [𝑎𝑖𝑗 ]𝑚 x 𝑛 is called a square matrix if “m = n” .
C O G
i.e A matrix which has same number of rows and columns.
A I N
1 5 7
Ex A= 0 2 3
G O E
𝑎𝑛𝑑 𝐵 =
E R1 5
5 3 3 3x3
G I N 2 3 2x2
EN
𝑎11 = 1, 𝑎22 =2 and 𝑎33 = 3 are called the principal or leading diagonal elements.
The sum of diagonal elements is called the trace of a matrix and denoted by trace(A).
O F
aij = 0 , i, j
E
0 0 0
0 0 0
L L EG 0 0 0
Examples:
C O
0 0 0 3 x 3
A I N G
0 0 0
2x3
G O E E R
6. Diagonal matrix: A square matrix where all the elements are zero except
I N
those on the leading diagonal.
G
Examples:
EN
A square matrix A=[𝑎𝑖𝑗 ]𝑛 x 𝑛 is called a diagonal matrix if aij =0 for all i ≠ j
− 2 0 0
2
0
0 0 0
5 0 0
0 3 0
0 0 0 0
0 0 1 3 x 3
0 0 0 − 9 4 x 4
Types of matrix:
7. Scalar matrix: A square matrix A=[𝑎𝑖𝑗 ]𝑛 x 𝑛 is called a scalar matrix if
aij = 0 , i j
=c , i = j
E O F
i.e. a diagonal matrix whose diagonal elements are equal to a constant c.
Examples: − 2 0 0
L L E
4
0G 0 0 0
4 0 0
O
0 −2 0
0
C
0 − 2
OA
0
0
R I G
0 4 0
N
0 0 4
G I N E E
G
8. Identity or Unit matrix: : A square matrix A=[𝑎𝑖𝑗 ]𝑛 x 𝑛 is called an identity matrix if
EN
aij = 0 , i j
= 1, i = j
i.e. a scalar matrix whose leading diagonal elements are equal to 1. It is denoted by In.
1 0 0
1 0
Examples: I2 = I 3 = 0 1 0
0 1 0 0 1
Types of matrix:
9. Upper triangular matrix: A square matrix A=[𝑎𝑖𝑗 ]𝑛 x 𝑛 is called an upper triangular matrix if all the
elements below the principal diagonal are zero.
Example:
− 2 1 − 3
0 5 4
E O F
aij = 0 , i j
0 0 7
L L EG
10. Lower triangular matrix: A square matrix A=[𝑎𝑖𝑗 ]𝑛 x 𝑛 is called a lower triangular matrix if all the
A C O I N G
elements above the principal diagonal are zero.
aij = 0 , i < j
3 0 0
G
Examples: − 5 1 0O E E R
− 1 0 8
G I N
EN
11. Triangular matrix:A square matrix A=[𝑎𝑖𝑗 ]𝑛 x 𝑛 is called a triangular matrix if it is upper as
well as lower triangular matrix.
aij = 0 , i j
i.e. it is a diagonal matrix
Equality of Matrices
Definition: Two matrices A and B are said to be equal if
i. they are of same order.
ii.
O F
all corresponding elements are equal.
E
L L
If A = B, then a = b i, j G
Let A = [a ij ]mxn and B = [b ij ]mxn
E
A
ij
C O ij
I N G
G O
Some properties of equality:
E E R
I N
• If A = B, then B = A for all A and B
G
EN
• If A = B, and B = C, then A = C for all A, B and C
Operations on Matrices
1. Addition and Subtraction : Let A=[ aij ]m × n and B=[ bij ]m × n .Then
• Sum A + B =[ aij + bij ] m × n
O
• Difference A - B = [ aij - bij ] m × n
E F
L E G
Note: Matrices of different orders cannot be added or subtracted.
L
Examples:
− 1 A
−3 O
C O N G
2 5RI 5 − 1
1.
4
2 G
1
+
IN
− −E E = 0 4
4
8
6 5
EN G
2x3
2 2 3 2x3 2x3
2. 4 − 3 − 1 1 2 5 3 − 5 − 6
2 6 − − 2 − 2 3 = 4 8
5 2x3 2x3 2
2x3
Properties of Matrix Addition
Properties
• Commutative Law: A + B = B + A
E O F
E G
• Associative Law: A + (B + C) = (A + B) + C = A + B + C
L L
• Existence of additive C
A O
identity: A + 0 = 0 + AG
I N =A
• Existence G O
of additive inverse AE E R
G I N + (-A) = 0 (where –A is the
EN
matrix composed of –a ijas elements)
Operations on Matrices
2. Scalar multiplication : Let A=[ aij ]m × n and k ≠ 0 be any scalar .Then
kA =[ kaij] m × n
E O F
i.e. Each element in the matrix is multiplied by the scalar k.
L L EG
4 − 3 − 1
Examples:
A C O
If A =
2 6
I N
5 2x3
G
, then
G O
8 − 6 − 2
E E R
1. 2A =
G I N
EN
4 12 10 2x3
− 20 15 5
2. − 5A =
− 10 − 30 − 25 2x3
Properties of Scalar Multiplication
• k (A + B) = kA + kB
• (k + l)A = kA + lA
E O F
• k(AB) = (kA)B = A(kB)
L L EG
A C O I N G
• k(lA) = (kl)A
G O E E R
G I N
EN
Operations on Matrices
3. Multiplication:
O F
• Two matrices A and B are said to be conformable for multiplication if the
E
L L EG
number of columns in A equals the number of rows in B.
• A mxn x B nxk
A C O =
I
C mxk
N G
G O E E R
G I N
• If A=[aij]m x n and B=[bjk]n x k , the product matrix C=AB=[cik] mxk has order
EN
m x k and each element in C can by computed by:
𝑐𝑖𝑘 = σ𝑛𝑗=1 𝑎𝑖𝑗 𝑏𝑗𝑘
Operations on Matrices
Multiplication rule: The ijth element of the product matrix is obtained by multiplying
each element in the ith row of the first matrix by the corresponding element in the jth
b11 b12
E O F
column of the second matrix and adding the products.
a11
a
a12 a13
L L EG
b21 b22 =
a11b11 + a12b21 + a13b31
a21b11 + a22b21 + a23b31
a11b12 + a12b22 + a13b32
a21b12 + a22b22 + a23b32 2 x 2
21 a22 a23 2 x 3
A C O I N G
b31 b32 3 x 2
Example 1:
G O E E R
1 2 3
4 8
I N
6 2 = 1 4 + 2 6 + 3 5 1 8 + 2 2 + 3 3 = 31 21
G
EN
4 2 7 4 4 + 2 6 + 7 5 4 8 + 2 2 + 7 3 63 57
2 x 3 5 3 2x 2 2x 2
3x 2
4 8 4 1 + 8 4 4 2 + 8 2 4 3 + 8 7 36 24 68
6 2 1 2 3 = 6 1 + 2 4 6 2 + 2 2 6 3 + 2 7 = 14 16 32
4 2 7
5 3 3 x 2 2x3
5 1 + 3 4 5 2 + 3 2 5 3 + 3 7 3 x3 17 16 36 3 x 3
Matrix Multiplication
Example 2
E O F
L L EG
A C O I N G
G O E E R
G I N
BA does not exist.
EN
Properties of Multiplication
Properties: Let matrices A, B and C be conformable for the operations indicated, then
F
1. A(BC)=(AB)C (Associative)
2. AI=A=IA
O
(Existence of identity)
G E
Note:
O L E
3. 𝐴 𝐵 + 𝐶 = 𝐴𝐵 + 𝐴𝐶 (Distributive property)
L
OA C R I G
• AB ≠BA, In general matrix multiplication is non commutative
N
Let A =
G
1 2
5 0
and B =
I N E E
3 4
0 2
5 0 EN G
1 2 3 4 3 8
AB = 0 2 = 15 20
3 4 1 2 23 6
BA = =
0 2 5 0 10 0
AB BA
Properties of Multiplication
• A ∙ B=0 ⟹A≠0 and B≠0 (Existence of zero divisors)
Ex. A=
3 2
B=
−2 0
E O F
3 2 3 0
L L EG
AB=
0 0
0 0
A C
=0O but A≠0 B≠0
I N G
G O E E R
I N
• If AB = AC, B is not necessarily equal to C
G
EN
• (𝐴 + 𝐵)2 =𝐴2 +AB+BA+𝐵2
Practical Application
Suppose you are a business owner and sell clothing. The following represents the
EG
Monday: 3 T-shirts at $10 each, 4 Trousers at $15 each, and 1 pair of shorts at $20.
L L
A C O
Tuesday: 4 T-shirts at $10 each, 2 Trousers at $15 each, and 3 pairs of shorts at $20.
I N G
Represent the information using two matrices: The product of the two matrices give the total revenue:
N
Unit price of each
I
Monday & Tuesday
G
item:
3 4
10 15 20 4
1 EN 2 = 110 130
3
Qty sold of each Qty sold of each
item on Monday item on Monday
E O F
THANK L L EG
YOU!
A C O I N G
G O E E R
G I N
EN