SlideShare une entreprise Scribd logo
1  sur  44
4.4 Matrices: Basic Operations
Addition and Subtraction of matrices
 To add or subtract matrices, they must be of the same order,
mxn. To add matrices of the same order, add their
corresponding entries. To subtract matrices of the same order,
subtract their corresponding entries. The general rule is as
follows using mathematical notation:
ij ij
ij ij
A B a b
A B a b
 
  
 
 
  
 
An example:
 1. Add the matrices
 First, note that each matrix
has dimensions of 3X3, so
we are able to perform the
addition. The result is shown
at right:
 Solution: Adding
corresponding entries we
have
4 3 1 1 2 3
0 5 2 6 7 9
5 6 0 0 4 8
 
   
   
  
   
   
 
    3 1 4
6 2 7
5 10 8

 
 

 
 

 
Subtraction of matrices
 Now, we will subtract
the same two matrices
 Subtract corresponding
entries as follows:
4 3 1 1 2 3
0 5 2 6 7 9
5 6 0 0 4 8
 
   
   
  
   
   
 
   
4 ( 1) 3 2 1 3
0 6 5 ( 7) 2 9
5 0 6 ( 4) 0 8
    
 
 
    
 
 
    
 
5 5 2
6 12 11
5 2 8
 
 
 
 
 
 
 
 
=
Scalar Multiplication
 The scalar product of a number k and a
matrix A is the matrix denoted by kA,
obtained by multiplying each entry of A by
the number k . The number k is called a
scalar. In mathematical notation,
ij
A
k ka
 
  
Example of scalar multiplication
 Find (-1)A where
 A =
 Solution:
 (-1)A=
 -1
1 2 3
6 7 9
0 4 8

 
 

 
 

 
1 2 3
6 7 9
0 4 8

 
 

 
 

 
1 2 3 1 2 3
( 1) 6 7 9 6 7 9
0 4 8 0 4 8
  
   
   
     
   
   
 
   
E.g. 3—Solving a Matrix Equation
 Solve the matrix equation
2X – A = B
for the unknown matrix X, where:
2 3 4 1
5 1 1 3
A B

   
 
   

   
E.g. 3—Solving a Matrix Equation
 We use the properties of matrices to
solve for X.
2X – A = B
2X = B + A
X = ½(B + A)
E.g. 3—Solving a Matrix Equation
 Thus,
4 1 2 3
1
2 1 3 5 1
6 2
1
2 4 4
3 1
2 2
X
 

   
 
 
   

   
 
 
  

 
 
  

Matrix product
 The method of
multiplication of
matrices is not as
intuitive and may seem
strange, although this
method is extremely
useful in many
mathematical
applications.
 Matrix multiplication
was introduced by an
English mathematician
named Arthur Cayley
 (1821-1895) . We will
see shortly how matrix
multiplication can be
used to solve systems
of linear equations.
Arthur Cayley (1821-1895)
 Introduced matrix multiplication
Product of a Row Matrix and a Column
Matrix
 In order to understand the general procedure of matrix
multiplication, we will introduce the concept of the product of a
row matrix by a column matrix. A row matrix consists of a single
row of numbers while a column matrix consists of a single
column of numbers. If the number of columns of a row matrix
equals the number of rows of a column matrix, the product of a
row matrix and column matrix is defined. Otherwise, the product
is not defined. For example, a row matrix consists of 1 row of 4
numbers so this matrix has four columns. It has dimensions
 1 X 4. This matrix can be multiplied by a column matrix
consisting of 4 numbers in a single column (this matrix has
dimensions 4X1.
Multiplication of Matrices
 First, the product AB (or A · B) of two
matrices A and B is defined only when:
– The number of columns in A is equal to
the number of rows in B.
Multiplication of Matrices
 This means that, if we write their
dimensions side by side, the two inner
numbers must match:
 Columns in A Rows in B
Matrices A B
Dimensions m x n n x k
Multiplication of Matrices
 If the dimensions of A and B match
in this fashion, then the product AB
is a matrix of dimension m x k.
– Before describing the procedure for obtaining
the elements of AB, we define the inner product
of a row of A and a column of B.
Inner Product
 If is a row of A, and
 if is a column of B,
their inner product is the number
a1b1 + a2b2 +··· +anbn
 
L
1 2 n
a a a
 
 
 
 
 
 
M
1
2
n
b
b
b
Inner Product
 For example, taking the inner product
of [2 –1 0 4] and gives:
2 · 5 + (–1) · 4 + 0 · (–3) + 4 · ½ = 8
1
2
5
4
3
 
 
 
 

 
 
Row by column multiplication
 1X4 row matrix multiplied by a
4X1 column matrix: Notice the
manner in which corresponding
entries of each matrix are
multiplied:
Revenue of a car dealer
 A car dealer sells four model types: A,B,C,D.
On a given week, this dealer sold 10 cars of
model A, 5 of model B, 8 of model C and 3
of model D. The selling prices of each
automobile are respectively $12,500,
$11,800, $15,900 and $25,300. Represent
the data using matrices and use matrix
multiplication to find the total revenue.
Solution using matrix multiplication
 We represent the number of each model sold using a row matrix (4X1) and we
use a 1X4 column matrix to represent the sales price of each model. When a
4X1 matrix is multiplied by a 1X4 matrix, the result is a 1X1 matrix of a single
number.
     
12,500
11,800
10 5 8 3 10(12,500) 5(11,800) 8(15,900) 3(25,300) 387,100
15,900
25,300
 
 
      
 
 
 
Matrix Product
 If A is an m x p matrix and B is a p x n matrix, the
matrix product of A and B denoted by AB is an m x
n matrix whose element in the ith row and jth
column is the real number obtained from the product
of the Ith row of A and the jth column of B. If the
number of columns of A does not equal the number
of rows of B, the matrix product AB is not defined.
Multiplying a 2X4 matrix by a 4X3
matrix to obtain a 4X2
 The following is an illustration of the product of a 2 x 4 matrix with a 4 x
3 . First, the number of columns of the matrix on the left equals the
number of rows of the matrix on the right so matrix multiplication is
defined. A row by column multiplication is performed three times to
obtain the first row of the product:
 70 80 90.
Final result
1+2*4+3*7+4*10 1*2+2*5+3*8+4*11 1*3+2*6+3*9+4*12
5*1+6*4+7*7+8*10
Find multiplication?
Undefined matrix multiplication
Why is this matrix multiplication not defined? The answer is that
the left matrix has three columns but the matrix on the right has
only two rows. To multiply the second row [4 5 6] by the third
column, 3 there is no number to pair with 6 to multiply.
7
More examples:
Given A = B=
Find AB if it is defined:
3 1 1
2 0 3

 
 
 
1 6
3 5
2 4
 
 

 
 

 
1 6
3 5
2 4
 
 

 
 

 
3 1 1
2 0 3

 
 
 
Solution:
2 0 3
3 1 1
 
 
 

 Since A is a 2 x 3 matrix and B is a
3 x 2 matrix, AB will be a 2 x 2
matrix.
 1. Multiply first row of A by first
column of B :
 3(1) + 1(3) +(-1)(-2)=8
 2. First row of A times second
column of B:
 3(6)+1(-5)+ (-1)(4)= 9
 3. Proceeding as above the final
result is
6
5
4
1
3
2
 
 
 
 
 


4
9
8
4 2
 
 

 
E.g. 4—Multiplying Matrices
 Let
Calculate, if possible, the products
AB and BA.
1 3 1 5 2
and
1 0 0 4 7
A B

   
 
   

   
A=2*2 B=2*3
E.g. 4—Multiplying Matrices
 Since A has dimension 2 x 2 and B has
dimension 2 x 3, the product AB is
defined and has dimension 2 x 3.
– We can thus write:
– The question marks must be filled in using
the rule defining the product of two matrices.
1 3 1 5 2 ? ? ?
1 0 0 4 7 ? ? ?
AB

     
 
     

     
E.g. 4—Multiplying Matrices
 If we define C = AB = [cij], the entry c11 is
the inner product of the first row of A and
the first column of B:
– Similarly, we calculate the remaining entries
of the product as follows.
1 3 1 5 2
1 ( 1) 3 0 1
1 0 0 4 7

   
     
   

   
E.g. 4—Multiplying Matrices
Entry
Inner
Product of
Value
Product
Matrix
c12
1 · 5 + 3 · 4
= 17
c13
1 · 2 + 3 · 7
= 23
1 3 1 5 2
1 0 0 4 7

   
   

   
1 17

 
 
 
1 3 1 5 2
1 0 0 4 7

   
   

   
1 17 23

 
 
 
E.g. 4—Multiplying Matrices
Entry
Inner
Product of
Value
Product
Matrix
c21
(–1) · (–1)
+ 0 · 0 = 1
c22
(–1) · 5
+ 0 · 4 = –5
c23
(–1) · 2
+ 0 · 7 = –2
1 3 1 5 2
1 0 0 4 7

   
   

   
1 3 1 5 2
1 0 0 4 7

   
   

   
1 3 1 5 2
1 0 0 4 7

   
   

   
1 17 23
1

 
 
 
1 17 23
1 5

 
 

 
1 17 23
1 5 2

 
 
 
 
E.g. 4—Multiplying Matrices
 Thus, we have:
– However, the product BA is not defined—because the
dimensions of B and A are 2 x 3 and 2 x 2.
– The inner two numbers are not the same.
– So, the rows and columns won’t match up
when we try to calculate the product.
1 17 23
1 5 2
AB

 
  
 
 
Is Matrix Multiplication Commutative?
 Now we will attempt to multiply the
matrices in reverse order:
 BA =
 Now we are multiplying a 3 x 2
matrix by a 2 x 3 matrix. This matrix
multiplication is defined but the
result will be a 3 x 3 matrix. Since
AB does not equal BA, matrix
multiplication is not commutative.
 BA=
1 6
3 5
2 4
 
 

 
 

 
3 1 1
2 0 3

 
 
 
15 1 17
1 3 18
2 2 14
 
 
 
 
 

 
Practical application
 Suppose you a business owner and sell clothing. The following
represents the number of items sold and the cost for each item:
Use matrix operations to determine the total revenue over the
two days:
 Monday: 3 T-shirts at $10 each, 4 hats at $15 each, and 1 pair
of shorts at $20.
Tuesday: 4 T-shirts at $10 each, 2 hats at $15 each, and 3 pairs
of shorts at $20.
Solution of practical application
 Represent the information using two matrices: The product of
the two matrices give the total revenue:
 Then your total revenue for the two days is =[110 130]
Price Quantity=Revenue
 
3 4
10 15 20 4 2
1 3
 
 
 
 
 
Unit price of each
item:
Qty sold of each
item on Monday
Qty sold of each item
on Tuesday
 Properties of
Matrix Multiplication
Properties of Matrix Multiplication
 Although matrix multiplication is not
commutative, it does obey the
Associative and Distributive Properties.
Properties of Matrix Multiplication
 Let A, B, and C be matrices for
which the following products are
defined.
– Then,
A(BC) = (AB)C Associative
Property
A(B + C) = AB + AC
(B + C)A = BA + CA
Distributive
Property
E.g. 4—Multiplying Matrices

1 3 1 5 2
and
1 0 0 4 7
A B

   
 
   

   
Properties of Matrix Multiplication
 The next example shows that,
even when both AB and BA are
defined, they aren’t necessarily
equal.
– This result proves that matrix multiplication
is not commutative.
E.g. 5—Matrix Multiplication Is Not
Commutative
 Let
 Calculate the products AB and BA.
– Since both matrices A and B have dimension 2 x
2, both products AB and BA are defined, and
each product is also a 2 x 2 matrix.
5 7 1 2
and
3 0 9 1
A B
   
 
   
 
   
E.g. 5—Matrix Multiplication Is Not
Commutative
5 7 1 2
3 0 9 1
5 1 7 9 5 2 7 ( 1)
( 3) 1 0 9 ( 3) 2 0 ( 1)
68 3
3 6
AB
   
    
 
   
      
 
  
        
 
 
  
 
 
E.g. 5—Matrix Multiplication Is Not
Commutative
This shows that, in general, AB ≠ BA.
– In fact, in this example, AB and BA don’t even
have an entry in common.
1 2 5 7
9 1 3 0
1 5 2 ( 3) 1 7 2 0
9 5 ( 1) ( 3) 9 7 ( 1) 0
1 7
48 63
BA
   
    
 
   
      
 
  
        
 

 
  
 

Contenu connexe

Tendances

Set Theory
Set TheorySet Theory
Set Theory
itutor
 
systems of linear equations & matrices
systems of linear equations & matricessystems of linear equations & matrices
systems of linear equations & matrices
Student
 
Adding and subtracting matrices unit 3, lesson 2
Adding and subtracting matrices   unit 3, lesson 2Adding and subtracting matrices   unit 3, lesson 2
Adding and subtracting matrices unit 3, lesson 2
holmsted
 
Lesson 5: Matrix Algebra (slides)
Lesson 5: Matrix Algebra (slides)Lesson 5: Matrix Algebra (slides)
Lesson 5: Matrix Algebra (slides)
Matthew Leingang
 
Linear Algebra and Matrix
Linear Algebra and MatrixLinear Algebra and Matrix
Linear Algebra and Matrix
itutor
 
Project business maths
Project business mathsProject business maths
Project business maths
areea
 

Tendances (20)

Matrix and its operations
Matrix and its operationsMatrix and its operations
Matrix and its operations
 
the inverse of the matrix
the inverse of the matrixthe inverse of the matrix
the inverse of the matrix
 
Matrices
MatricesMatrices
Matrices
 
Matrix.
Matrix.Matrix.
Matrix.
 
Matrices ppt
Matrices pptMatrices ppt
Matrices ppt
 
Set Theory
Set TheorySet Theory
Set Theory
 
Matrices - Mathematics
Matrices - MathematicsMatrices - Mathematics
Matrices - Mathematics
 
Matrix Algebra seminar ppt
Matrix Algebra seminar pptMatrix Algebra seminar ppt
Matrix Algebra seminar ppt
 
Matrix introduction and matrix operations.
Matrix introduction and matrix operations. Matrix introduction and matrix operations.
Matrix introduction and matrix operations.
 
Matrices
MatricesMatrices
Matrices
 
systems of linear equations & matrices
systems of linear equations & matricessystems of linear equations & matrices
systems of linear equations & matrices
 
Lesson 3 - matrix multiplication
Lesson 3 - matrix multiplicationLesson 3 - matrix multiplication
Lesson 3 - matrix multiplication
 
Adding and subtracting matrices unit 3, lesson 2
Adding and subtracting matrices   unit 3, lesson 2Adding and subtracting matrices   unit 3, lesson 2
Adding and subtracting matrices unit 3, lesson 2
 
Solving system of linear equations
Solving system of linear equationsSolving system of linear equations
Solving system of linear equations
 
Lesson 5: Matrix Algebra (slides)
Lesson 5: Matrix Algebra (slides)Lesson 5: Matrix Algebra (slides)
Lesson 5: Matrix Algebra (slides)
 
Linear algebra notes 1
Linear algebra notes 1Linear algebra notes 1
Linear algebra notes 1
 
Linear Algebra and Matrix
Linear Algebra and MatrixLinear Algebra and Matrix
Linear Algebra and Matrix
 
Matrix Algebra : Mathematics for Business
Matrix Algebra : Mathematics for BusinessMatrix Algebra : Mathematics for Business
Matrix Algebra : Mathematics for Business
 
Ppt on matrices and Determinants
Ppt on matrices and DeterminantsPpt on matrices and Determinants
Ppt on matrices and Determinants
 
Project business maths
Project business mathsProject business maths
Project business maths
 

Similaire à matrices basic operation.ppt

Matrix product
Matrix productMatrix product
Matrix product
mstf mstf
 
Matrices Chapter 4 Obj. 1.04,2.10
Matrices Chapter 4 Obj. 1.04,2.10Matrices Chapter 4 Obj. 1.04,2.10
Matrices Chapter 4 Obj. 1.04,2.10
jeaniehenschel
 
Matrices Chapter 4 Obj 1.04 2.10
Matrices Chapter 4 Obj 1.04 2.10Matrices Chapter 4 Obj 1.04 2.10
Matrices Chapter 4 Obj 1.04 2.10
jeaniehenschel
 
Section 7.5 version 2 AM new ppt for every
Section 7.5 version 2 AM new ppt for everySection 7.5 version 2 AM new ppt for every
Section 7.5 version 2 AM new ppt for every
javed75
 

Similaire à matrices basic operation.ppt (20)

Lesson 1 matrix
Lesson 1 matrixLesson 1 matrix
Lesson 1 matrix
 
Lesson 6
Lesson 6Lesson 6
Lesson 6
 
Bba i-bm-u-2- matrix -
Bba i-bm-u-2- matrix -Bba i-bm-u-2- matrix -
Bba i-bm-u-2- matrix -
 
9.matrices and transformation Further Mathematics Zimbabwe Zimsec Cambridge
9.matrices and transformation   Further Mathematics Zimbabwe Zimsec Cambridge9.matrices and transformation   Further Mathematics Zimbabwe Zimsec Cambridge
9.matrices and transformation Further Mathematics Zimbabwe Zimsec Cambridge
 
Matrices & Determinants
Matrices & DeterminantsMatrices & Determinants
Matrices & Determinants
 
Mathematics 1
Mathematics 1Mathematics 1
Mathematics 1
 
9.2 Matrices
9.2 Matrices9.2 Matrices
9.2 Matrices
 
Matrix product
Matrix productMatrix product
Matrix product
 
matrix algebra
matrix algebramatrix algebra
matrix algebra
 
7.5 Matrices and Matrix Operations
7.5 Matrices and Matrix Operations7.5 Matrices and Matrix Operations
7.5 Matrices and Matrix Operations
 
M a t r i k s
M a t r i k sM a t r i k s
M a t r i k s
 
Takue
TakueTakue
Takue
 
Final project
Final projectFinal project
Final project
 
Mathematics 1
Mathematics 1Mathematics 1
Mathematics 1
 
matrix
matrixmatrix
matrix
 
Matrices Chapter 4 Obj. 1.04,2.10
Matrices Chapter 4 Obj. 1.04,2.10Matrices Chapter 4 Obj. 1.04,2.10
Matrices Chapter 4 Obj. 1.04,2.10
 
Matrices Chapter 4 Obj 1.04 2.10
Matrices Chapter 4 Obj 1.04 2.10Matrices Chapter 4 Obj 1.04 2.10
Matrices Chapter 4 Obj 1.04 2.10
 
Section 7.5 version 2 AM new ppt for every
Section 7.5 version 2 AM new ppt for everySection 7.5 version 2 AM new ppt for every
Section 7.5 version 2 AM new ppt for every
 
7 4
7 47 4
7 4
 
WCS Specialist Maths An Introduction to Matrices PowerPoint
WCS Specialist Maths An Introduction to Matrices PowerPointWCS Specialist Maths An Introduction to Matrices PowerPoint
WCS Specialist Maths An Introduction to Matrices PowerPoint
 

Dernier

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 

Dernier (20)

Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 

matrices basic operation.ppt

  • 1. 4.4 Matrices: Basic Operations
  • 2. Addition and Subtraction of matrices  To add or subtract matrices, they must be of the same order, mxn. To add matrices of the same order, add their corresponding entries. To subtract matrices of the same order, subtract their corresponding entries. The general rule is as follows using mathematical notation: ij ij ij ij A B a b A B a b              
  • 3. An example:  1. Add the matrices  First, note that each matrix has dimensions of 3X3, so we are able to perform the addition. The result is shown at right:  Solution: Adding corresponding entries we have 4 3 1 1 2 3 0 5 2 6 7 9 5 6 0 0 4 8                            3 1 4 6 2 7 5 10 8             
  • 4. Subtraction of matrices  Now, we will subtract the same two matrices  Subtract corresponding entries as follows: 4 3 1 1 2 3 0 5 2 6 7 9 5 6 0 0 4 8                            4 ( 1) 3 2 1 3 0 6 5 ( 7) 2 9 5 0 6 ( 4) 0 8                          5 5 2 6 12 11 5 2 8                 =
  • 5. Scalar Multiplication  The scalar product of a number k and a matrix A is the matrix denoted by kA, obtained by multiplying each entry of A by the number k . The number k is called a scalar. In mathematical notation, ij A k ka     
  • 6. Example of scalar multiplication  Find (-1)A where  A =  Solution:  (-1)A=  -1 1 2 3 6 7 9 0 4 8              1 2 3 6 7 9 0 4 8              1 2 3 1 2 3 ( 1) 6 7 9 6 7 9 0 4 8 0 4 8                               
  • 7. E.g. 3—Solving a Matrix Equation  Solve the matrix equation 2X – A = B for the unknown matrix X, where: 2 3 4 1 5 1 1 3 A B                
  • 8. E.g. 3—Solving a Matrix Equation  We use the properties of matrices to solve for X. 2X – A = B 2X = B + A X = ½(B + A)
  • 9. E.g. 3—Solving a Matrix Equation  Thus, 4 1 2 3 1 2 1 3 5 1 6 2 1 2 4 4 3 1 2 2 X                                    
  • 10. Matrix product  The method of multiplication of matrices is not as intuitive and may seem strange, although this method is extremely useful in many mathematical applications.  Matrix multiplication was introduced by an English mathematician named Arthur Cayley  (1821-1895) . We will see shortly how matrix multiplication can be used to solve systems of linear equations.
  • 11. Arthur Cayley (1821-1895)  Introduced matrix multiplication
  • 12. Product of a Row Matrix and a Column Matrix  In order to understand the general procedure of matrix multiplication, we will introduce the concept of the product of a row matrix by a column matrix. A row matrix consists of a single row of numbers while a column matrix consists of a single column of numbers. If the number of columns of a row matrix equals the number of rows of a column matrix, the product of a row matrix and column matrix is defined. Otherwise, the product is not defined. For example, a row matrix consists of 1 row of 4 numbers so this matrix has four columns. It has dimensions  1 X 4. This matrix can be multiplied by a column matrix consisting of 4 numbers in a single column (this matrix has dimensions 4X1.
  • 13. Multiplication of Matrices  First, the product AB (or A · B) of two matrices A and B is defined only when: – The number of columns in A is equal to the number of rows in B.
  • 14. Multiplication of Matrices  This means that, if we write their dimensions side by side, the two inner numbers must match:  Columns in A Rows in B Matrices A B Dimensions m x n n x k
  • 15. Multiplication of Matrices  If the dimensions of A and B match in this fashion, then the product AB is a matrix of dimension m x k. – Before describing the procedure for obtaining the elements of AB, we define the inner product of a row of A and a column of B.
  • 16. Inner Product  If is a row of A, and  if is a column of B, their inner product is the number a1b1 + a2b2 +··· +anbn   L 1 2 n a a a             M 1 2 n b b b
  • 17. Inner Product  For example, taking the inner product of [2 –1 0 4] and gives: 2 · 5 + (–1) · 4 + 0 · (–3) + 4 · ½ = 8 1 2 5 4 3             
  • 18. Row by column multiplication  1X4 row matrix multiplied by a 4X1 column matrix: Notice the manner in which corresponding entries of each matrix are multiplied:
  • 19. Revenue of a car dealer  A car dealer sells four model types: A,B,C,D. On a given week, this dealer sold 10 cars of model A, 5 of model B, 8 of model C and 3 of model D. The selling prices of each automobile are respectively $12,500, $11,800, $15,900 and $25,300. Represent the data using matrices and use matrix multiplication to find the total revenue.
  • 20. Solution using matrix multiplication  We represent the number of each model sold using a row matrix (4X1) and we use a 1X4 column matrix to represent the sales price of each model. When a 4X1 matrix is multiplied by a 1X4 matrix, the result is a 1X1 matrix of a single number.       12,500 11,800 10 5 8 3 10(12,500) 5(11,800) 8(15,900) 3(25,300) 387,100 15,900 25,300                 
  • 21. Matrix Product  If A is an m x p matrix and B is a p x n matrix, the matrix product of A and B denoted by AB is an m x n matrix whose element in the ith row and jth column is the real number obtained from the product of the Ith row of A and the jth column of B. If the number of columns of A does not equal the number of rows of B, the matrix product AB is not defined.
  • 22. Multiplying a 2X4 matrix by a 4X3 matrix to obtain a 4X2  The following is an illustration of the product of a 2 x 4 matrix with a 4 x 3 . First, the number of columns of the matrix on the left equals the number of rows of the matrix on the right so matrix multiplication is defined. A row by column multiplication is performed three times to obtain the first row of the product:  70 80 90.
  • 23. Final result 1+2*4+3*7+4*10 1*2+2*5+3*8+4*11 1*3+2*6+3*9+4*12 5*1+6*4+7*7+8*10
  • 25. Undefined matrix multiplication Why is this matrix multiplication not defined? The answer is that the left matrix has three columns but the matrix on the right has only two rows. To multiply the second row [4 5 6] by the third column, 3 there is no number to pair with 6 to multiply. 7
  • 26. More examples: Given A = B= Find AB if it is defined: 3 1 1 2 0 3        1 6 3 5 2 4             1 6 3 5 2 4             3 1 1 2 0 3       
  • 27. Solution: 2 0 3 3 1 1         Since A is a 2 x 3 matrix and B is a 3 x 2 matrix, AB will be a 2 x 2 matrix.  1. Multiply first row of A by first column of B :  3(1) + 1(3) +(-1)(-2)=8  2. First row of A times second column of B:  3(6)+1(-5)+ (-1)(4)= 9  3. Proceeding as above the final result is 6 5 4 1 3 2             4 9 8 4 2       
  • 28. E.g. 4—Multiplying Matrices  Let Calculate, if possible, the products AB and BA. 1 3 1 5 2 and 1 0 0 4 7 A B                 A=2*2 B=2*3
  • 29. E.g. 4—Multiplying Matrices  Since A has dimension 2 x 2 and B has dimension 2 x 3, the product AB is defined and has dimension 2 x 3. – We can thus write: – The question marks must be filled in using the rule defining the product of two matrices. 1 3 1 5 2 ? ? ? 1 0 0 4 7 ? ? ? AB                      
  • 30. E.g. 4—Multiplying Matrices  If we define C = AB = [cij], the entry c11 is the inner product of the first row of A and the first column of B: – Similarly, we calculate the remaining entries of the product as follows. 1 3 1 5 2 1 ( 1) 3 0 1 1 0 0 4 7                    
  • 31. E.g. 4—Multiplying Matrices Entry Inner Product of Value Product Matrix c12 1 · 5 + 3 · 4 = 17 c13 1 · 2 + 3 · 7 = 23 1 3 1 5 2 1 0 0 4 7               1 17        1 3 1 5 2 1 0 0 4 7               1 17 23       
  • 32. E.g. 4—Multiplying Matrices Entry Inner Product of Value Product Matrix c21 (–1) · (–1) + 0 · 0 = 1 c22 (–1) · 5 + 0 · 4 = –5 c23 (–1) · 2 + 0 · 7 = –2 1 3 1 5 2 1 0 0 4 7               1 3 1 5 2 1 0 0 4 7               1 3 1 5 2 1 0 0 4 7               1 17 23 1        1 17 23 1 5         1 17 23 1 5 2         
  • 33. E.g. 4—Multiplying Matrices  Thus, we have: – However, the product BA is not defined—because the dimensions of B and A are 2 x 3 and 2 x 2. – The inner two numbers are not the same. – So, the rows and columns won’t match up when we try to calculate the product. 1 17 23 1 5 2 AB          
  • 34. Is Matrix Multiplication Commutative?  Now we will attempt to multiply the matrices in reverse order:  BA =  Now we are multiplying a 3 x 2 matrix by a 2 x 3 matrix. This matrix multiplication is defined but the result will be a 3 x 3 matrix. Since AB does not equal BA, matrix multiplication is not commutative.  BA= 1 6 3 5 2 4             3 1 1 2 0 3        15 1 17 1 3 18 2 2 14             
  • 35. Practical application  Suppose you a business owner and sell clothing. The following represents the number of items sold and the cost for each item: Use matrix operations to determine the total revenue over the two days:  Monday: 3 T-shirts at $10 each, 4 hats at $15 each, and 1 pair of shorts at $20. Tuesday: 4 T-shirts at $10 each, 2 hats at $15 each, and 3 pairs of shorts at $20.
  • 36. Solution of practical application  Represent the information using two matrices: The product of the two matrices give the total revenue:  Then your total revenue for the two days is =[110 130] Price Quantity=Revenue   3 4 10 15 20 4 2 1 3           Unit price of each item: Qty sold of each item on Monday Qty sold of each item on Tuesday
  • 37.  Properties of Matrix Multiplication
  • 38. Properties of Matrix Multiplication  Although matrix multiplication is not commutative, it does obey the Associative and Distributive Properties.
  • 39. Properties of Matrix Multiplication  Let A, B, and C be matrices for which the following products are defined. – Then, A(BC) = (AB)C Associative Property A(B + C) = AB + AC (B + C)A = BA + CA Distributive Property
  • 40. E.g. 4—Multiplying Matrices  1 3 1 5 2 and 1 0 0 4 7 A B                
  • 41. Properties of Matrix Multiplication  The next example shows that, even when both AB and BA are defined, they aren’t necessarily equal. – This result proves that matrix multiplication is not commutative.
  • 42. E.g. 5—Matrix Multiplication Is Not Commutative  Let  Calculate the products AB and BA. – Since both matrices A and B have dimension 2 x 2, both products AB and BA are defined, and each product is also a 2 x 2 matrix. 5 7 1 2 and 3 0 9 1 A B                
  • 43. E.g. 5—Matrix Multiplication Is Not Commutative 5 7 1 2 3 0 9 1 5 1 7 9 5 2 7 ( 1) ( 3) 1 0 9 ( 3) 2 0 ( 1) 68 3 3 6 AB                                               
  • 44. E.g. 5—Matrix Multiplication Is Not Commutative This shows that, in general, AB ≠ BA. – In fact, in this example, AB and BA don’t even have an entry in common. 1 2 5 7 9 1 3 0 1 5 2 ( 3) 1 7 2 0 9 5 ( 1) ( 3) 9 7 ( 1) 0 1 7 48 63 BA                                              