SlideShare a Scribd company logo
1 of 13
Matrix Demystified…
What is Matrix?
• What is Matrix?
    – Novel, Movie??
    – A Physical/Visual Construct?
         • (like grid…, or students in prayer hall)
    –   Some geometric construct? (like rectangle, square??)
    –   CS Data Structure (like Two Dimensional Array??)
    –    Rows….Columns….Other definitions? ...
    –   Yes, these are all fine, but why do we need this?
•   Addition, Subtraction – Oh, ok…. now, I see
•   Multiplication – Hey ---- What the heck is this !!!
•   Determinant, Inverse ---- ?$%#
•   Rank, Eigen-Value, Eigen-Vector----------Bhaago!!
Why this kolaveri di?
• Root Cause
    – No Surprise, Our education system
    – Which divorces the description of mathematical ideas from their
      historical context
    – Not convinced?
        • Google for Matrix Multiplication
        • http://en.wikipedia.org/wiki/Matrix_multiplication#General_definition
        • Do you still want to study matrices?
• Wrong Sequence
    – First Matrix, then addition/subtraction then multiplication – THIS IS
      WRONG
    – First Matrix Multiplication, then add/subtract, then Matrix – THIS IS
      RIGHT
• This presentation is an attempt towards correcting this injustice
  done to simple and great idea of MATRIX
What is Matrix Multiplication?
• Software Engineer
  – (for for for c[I,j] += a[I,k] * b[k,r] )
  – One more successful program he wrote without
    understanding a, b, c (or m, n, r) of it
• DSP Engineer -
  – Convolution, Weighted Sum, FIR, Pipelining…
  – Impressive terms , but why matrix?
• Mathematician – See Wikipedia… 
• Super Market Clerk -??? –What is he doing here?
  – In all probabilities, he was the one who invented
    matrix multiplication and hence matrix!!!
Super Market – Birth Place of Matrix
           Multiplication
• Let me explain…
  – Suppose you buy 1 kg Sugar, ½ Liter Milk and 5
    cakes of detergent soap.
  – Let 1 Kg sugar = Rs. 61; 1 Liter Milk Rs. 40 and 1
    cake of soap costs Rs. 25
Contd…
• How will you calculate the cost?
   => 1 * 61+ 0.5 *1 + 5 * 1
   = (….blank cheque )
=> We can generalize it by applying famous [(price per
unit) * (no units formula)]
  1 [sugar price] + 40 [milk price] + 25 [ cake price ]
  That’s it!! Above expression is Matrix Multiplication
  This [Multiply and Accumulate] “*+” is central concept
  at matrix multiplication and hence at matrix
Contd…
• This operation reduces it’s two sequences to a
  single number, or two vector operands to a scalar
  quantity
• Let us see how….
   – Split the above formula into two parts
   – Price Per Unit (PPU) List = [61 40 25]
   – Number Of Units = [1 ½ 5]
• If you want to calculate the bill, you will multiply
  corresponding vectors, and add all the terms of
  resulting vectors( here, we can consider the term
  vector to mean lists)
Contd..
Total price
= + ( [61 40 25] .* [1 ½ 5] )
= + ( [61*1 40*1/2 25*5] )
= + ([61 20 125])
= 206
Note two operations here
1. Multiplication between corresponding elements of two
    vectors of same size ( no of units * units price
    operation). One thing it converts different infos like kg,
    liter and 5 pieces to same unit price. This allows
    addition to be possible
2. Addition of all elements belonging to same vector
Contd…
• These two operations together is called Matrix
  Multiplications
    + ([61 40 25] .* [1 ½ 5])
    [61 40 25] * [1 ½ 5] ; //note that .* becomes
  just * now
   This itself represented as
   [1 ½ 5] * 61
              40

              25
This visual concept gives birth to idea
                   of
• A vector in horizontal orientation and another
  in vertical.
• But it is just visualization. They could have
  been elliptical and diagonal also.
• But, again why this circus? Why we could not
  keep both horizontal.
• Answer is…
I too do not know
• However, some guesses
• To differentiate .* from * (not convincing enough)
• To keep in-line with addition, and subtraction
  - Operands of +, - , .* are of same type
  - Result will also be of same type
  - But matrix multiplication yields scalar when two
  vectors are multiplied. Probably, notation helps to
  emphasize this fact that this is not straight multiplication
Contd…
• Let us explore further. Let us consider 5 people shopped
  in the shop on a particular day. Using the notation
  discussed earlier
            1½5                 61
            213
            457                 40
            983
            324                 25

        19 16.5 25

Note that row elements are of different types (sugar milk and soap) where as column elements are of same type.
Keeping the same philosophy , since prices are of same type they better represented as columns. Note that adding a
given column appears natural. For example, if you observe sum row below, it shows total amount of sugar sold in a day.
Same is with Milik and Soap. However, adding all row elements of a row does not make any sense. What is Sugar + Milk
+ Soap? Sweet Washing System?.....Yucc!!! If we want to preserve this convention, price also should be column rather
than row.
Contd…
• Now, conventional matrix emerges, with rows
  columns etc.,
• I will leave it to you to extend to other matrix
  related ideas. (Ab tumhare havaale matrix
  saathiyon )
• All the best!!

More Related Content

What's hot (20)

Matrix Operations
Matrix OperationsMatrix Operations
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
 
Lesson 4 b special matrix multiplication
Lesson 4 b  special matrix multiplicationLesson 4 b  special matrix multiplication
Lesson 4 b special matrix multiplication
 
Matrix and It's Applications
Matrix and It's ApplicationsMatrix and It's Applications
Matrix and It's Applications
 
MATIX AND TYPES OF MATRIX
MATIX AND TYPES OF MATRIXMATIX AND TYPES OF MATRIX
MATIX AND TYPES OF MATRIX
 
Matrix Algebra : Mathematics for Business
Matrix Algebra : Mathematics for BusinessMatrix Algebra : Mathematics for Business
Matrix Algebra : Mathematics for Business
 
Matrices and determinants
Matrices and determinantsMatrices and determinants
Matrices and determinants
 
Business mathematics presentation
Business mathematics presentationBusiness mathematics presentation
Business mathematics presentation
 
Real numbers Business Mathematics
Real numbers Business MathematicsReal numbers Business Mathematics
Real numbers Business Mathematics
 
Ppt on matrices
Ppt on matricesPpt on matrices
Ppt on matrices
 
Lesson 2b - scalar multiplication
Lesson 2b - scalar multiplicationLesson 2b - scalar multiplication
Lesson 2b - scalar multiplication
 
Matrix.
Matrix.Matrix.
Matrix.
 
Co-factor matrix..
Co-factor matrix..Co-factor matrix..
Co-factor matrix..
 
Introduction of matrices
Introduction of matricesIntroduction of matrices
Introduction of matrices
 
Matrix Algebra seminar ppt
Matrix Algebra seminar pptMatrix Algebra seminar ppt
Matrix Algebra seminar ppt
 
Matrices & Determinants
Matrices & DeterminantsMatrices & Determinants
Matrices & Determinants
 
Matrices
Matrices Matrices
Matrices
 
Introduction to matices
Introduction to maticesIntroduction to matices
Introduction to matices
 
Introduction to Matrices
Introduction to MatricesIntroduction to Matrices
Introduction to Matrices
 
MATRICES
MATRICESMATRICES
MATRICES
 

Similar to Matrix demystified

COORDINATE ALGEBRA Unit One Power point
COORDINATE ALGEBRA Unit One Power pointCOORDINATE ALGEBRA Unit One Power point
COORDINATE ALGEBRA Unit One Power pointAmanda Manning
 
Counting and Sequences
Counting and SequencesCounting and Sequences
Counting and SequencesDan Stewart
 
Math 7 lesson 11 properties of real numbers
Math 7   lesson 11 properties of real numbersMath 7   lesson 11 properties of real numbers
Math 7 lesson 11 properties of real numbersAriel Gilbuena
 
"A Framework for Developing Trading Models Based on Machine Learning" by Kris...
"A Framework for Developing Trading Models Based on Machine Learning" by Kris..."A Framework for Developing Trading Models Based on Machine Learning" by Kris...
"A Framework for Developing Trading Models Based on Machine Learning" by Kris...Quantopian
 
powerpointfull-140924104315-phpapp02 (1).pdf
powerpointfull-140924104315-phpapp02 (1).pdfpowerpointfull-140924104315-phpapp02 (1).pdf
powerpointfull-140924104315-phpapp02 (1).pdfMossolbEquiper
 
Engineering Numerical Analysis-Introduction.pdf
Engineering Numerical Analysis-Introduction.pdfEngineering Numerical Analysis-Introduction.pdf
Engineering Numerical Analysis-Introduction.pdfssuseraae901
 
Introduction to MS Excel
Introduction to MS ExcelIntroduction to MS Excel
Introduction to MS ExcelTarek Dib
 
RTCUSA 2011 Session 10 Part B A+Revit Families Jay Zallan Presentation
RTCUSA 2011 Session 10 Part B A+Revit Families Jay Zallan PresentationRTCUSA 2011 Session 10 Part B A+Revit Families Jay Zallan Presentation
RTCUSA 2011 Session 10 Part B A+Revit Families Jay Zallan PresentationJay Zallan
 
Computability and Complexity
Computability and ComplexityComputability and Complexity
Computability and ComplexityEdward Blurock
 
Topic 5 (multiple regression)
Topic 5 (multiple regression)Topic 5 (multiple regression)
Topic 5 (multiple regression)Ryan Herzog
 
How to Solve Linear Equation with the help of Liner Equation Calculator?
How to Solve Linear Equation with the help of Liner Equation Calculator?How to Solve Linear Equation with the help of Liner Equation Calculator?
How to Solve Linear Equation with the help of Liner Equation Calculator?Maria Wilson
 
Operation and expression in c++
Operation and expression in c++Operation and expression in c++
Operation and expression in c++Online
 
Linear Equations Year 8
Linear Equations Year 8Linear Equations Year 8
Linear Equations Year 8Neil Bailllie
 
Computer algorithm(Dynamic Programming).pdf
Computer algorithm(Dynamic Programming).pdfComputer algorithm(Dynamic Programming).pdf
Computer algorithm(Dynamic Programming).pdfjannatulferdousmaish
 
Calculator_workshop-2024_version accept the
Calculator_workshop-2024_version accept theCalculator_workshop-2024_version accept the
Calculator_workshop-2024_version accept theRitchiWit
 

Similar to Matrix demystified (20)

COORDINATE ALGEBRA Unit One Power point
COORDINATE ALGEBRA Unit One Power pointCOORDINATE ALGEBRA Unit One Power point
COORDINATE ALGEBRA Unit One Power point
 
Counting and Sequences
Counting and SequencesCounting and Sequences
Counting and Sequences
 
Uta005 lecture3
Uta005 lecture3Uta005 lecture3
Uta005 lecture3
 
Math 7 lesson 11 properties of real numbers
Math 7   lesson 11 properties of real numbersMath 7   lesson 11 properties of real numbers
Math 7 lesson 11 properties of real numbers
 
QBIC
QBICQBIC
QBIC
 
"A Framework for Developing Trading Models Based on Machine Learning" by Kris...
"A Framework for Developing Trading Models Based on Machine Learning" by Kris..."A Framework for Developing Trading Models Based on Machine Learning" by Kris...
"A Framework for Developing Trading Models Based on Machine Learning" by Kris...
 
powerpointfull-140924104315-phpapp02 (1).pdf
powerpointfull-140924104315-phpapp02 (1).pdfpowerpointfull-140924104315-phpapp02 (1).pdf
powerpointfull-140924104315-phpapp02 (1).pdf
 
Engineering Numerical Analysis-Introduction.pdf
Engineering Numerical Analysis-Introduction.pdfEngineering Numerical Analysis-Introduction.pdf
Engineering Numerical Analysis-Introduction.pdf
 
Introduction to MS Excel
Introduction to MS ExcelIntroduction to MS Excel
Introduction to MS Excel
 
RTCUSA 2011 Session 10 Part B A+Revit Families Jay Zallan Presentation
RTCUSA 2011 Session 10 Part B A+Revit Families Jay Zallan PresentationRTCUSA 2011 Session 10 Part B A+Revit Families Jay Zallan Presentation
RTCUSA 2011 Session 10 Part B A+Revit Families Jay Zallan Presentation
 
Excel Tips 101
Excel Tips 101Excel Tips 101
Excel Tips 101
 
Excel tips
Excel tipsExcel tips
Excel tips
 
Computability and Complexity
Computability and ComplexityComputability and Complexity
Computability and Complexity
 
Topic 5 (multiple regression)
Topic 5 (multiple regression)Topic 5 (multiple regression)
Topic 5 (multiple regression)
 
How to Solve Linear Equation with the help of Liner Equation Calculator?
How to Solve Linear Equation with the help of Liner Equation Calculator?How to Solve Linear Equation with the help of Liner Equation Calculator?
How to Solve Linear Equation with the help of Liner Equation Calculator?
 
Operation and expression in c++
Operation and expression in c++Operation and expression in c++
Operation and expression in c++
 
Linear Equations Year 8
Linear Equations Year 8Linear Equations Year 8
Linear Equations Year 8
 
Computer algorithm(Dynamic Programming).pdf
Computer algorithm(Dynamic Programming).pdfComputer algorithm(Dynamic Programming).pdf
Computer algorithm(Dynamic Programming).pdf
 
Matlab for marketing people
Matlab for marketing peopleMatlab for marketing people
Matlab for marketing people
 
Calculator_workshop-2024_version accept the
Calculator_workshop-2024_version accept theCalculator_workshop-2024_version accept the
Calculator_workshop-2024_version accept the
 

Matrix demystified

  • 2. What is Matrix? • What is Matrix? – Novel, Movie?? – A Physical/Visual Construct? • (like grid…, or students in prayer hall) – Some geometric construct? (like rectangle, square??) – CS Data Structure (like Two Dimensional Array??) – Rows….Columns….Other definitions? ... – Yes, these are all fine, but why do we need this? • Addition, Subtraction – Oh, ok…. now, I see • Multiplication – Hey ---- What the heck is this !!! • Determinant, Inverse ---- ?$%# • Rank, Eigen-Value, Eigen-Vector----------Bhaago!!
  • 3. Why this kolaveri di? • Root Cause – No Surprise, Our education system – Which divorces the description of mathematical ideas from their historical context – Not convinced? • Google for Matrix Multiplication • http://en.wikipedia.org/wiki/Matrix_multiplication#General_definition • Do you still want to study matrices? • Wrong Sequence – First Matrix, then addition/subtraction then multiplication – THIS IS WRONG – First Matrix Multiplication, then add/subtract, then Matrix – THIS IS RIGHT • This presentation is an attempt towards correcting this injustice done to simple and great idea of MATRIX
  • 4. What is Matrix Multiplication? • Software Engineer – (for for for c[I,j] += a[I,k] * b[k,r] ) – One more successful program he wrote without understanding a, b, c (or m, n, r) of it • DSP Engineer - – Convolution, Weighted Sum, FIR, Pipelining… – Impressive terms , but why matrix? • Mathematician – See Wikipedia…  • Super Market Clerk -??? –What is he doing here? – In all probabilities, he was the one who invented matrix multiplication and hence matrix!!!
  • 5. Super Market – Birth Place of Matrix Multiplication • Let me explain… – Suppose you buy 1 kg Sugar, ½ Liter Milk and 5 cakes of detergent soap. – Let 1 Kg sugar = Rs. 61; 1 Liter Milk Rs. 40 and 1 cake of soap costs Rs. 25
  • 6. Contd… • How will you calculate the cost? => 1 * 61+ 0.5 *1 + 5 * 1 = (….blank cheque ) => We can generalize it by applying famous [(price per unit) * (no units formula)] 1 [sugar price] + 40 [milk price] + 25 [ cake price ] That’s it!! Above expression is Matrix Multiplication This [Multiply and Accumulate] “*+” is central concept at matrix multiplication and hence at matrix
  • 7. Contd… • This operation reduces it’s two sequences to a single number, or two vector operands to a scalar quantity • Let us see how…. – Split the above formula into two parts – Price Per Unit (PPU) List = [61 40 25] – Number Of Units = [1 ½ 5] • If you want to calculate the bill, you will multiply corresponding vectors, and add all the terms of resulting vectors( here, we can consider the term vector to mean lists)
  • 8. Contd.. Total price = + ( [61 40 25] .* [1 ½ 5] ) = + ( [61*1 40*1/2 25*5] ) = + ([61 20 125]) = 206 Note two operations here 1. Multiplication between corresponding elements of two vectors of same size ( no of units * units price operation). One thing it converts different infos like kg, liter and 5 pieces to same unit price. This allows addition to be possible 2. Addition of all elements belonging to same vector
  • 9. Contd… • These two operations together is called Matrix Multiplications + ([61 40 25] .* [1 ½ 5]) [61 40 25] * [1 ½ 5] ; //note that .* becomes just * now This itself represented as [1 ½ 5] * 61 40 25
  • 10. This visual concept gives birth to idea of • A vector in horizontal orientation and another in vertical. • But it is just visualization. They could have been elliptical and diagonal also. • But, again why this circus? Why we could not keep both horizontal. • Answer is…
  • 11. I too do not know • However, some guesses • To differentiate .* from * (not convincing enough) • To keep in-line with addition, and subtraction - Operands of +, - , .* are of same type - Result will also be of same type - But matrix multiplication yields scalar when two vectors are multiplied. Probably, notation helps to emphasize this fact that this is not straight multiplication
  • 12. Contd… • Let us explore further. Let us consider 5 people shopped in the shop on a particular day. Using the notation discussed earlier 1½5 61 213 457 40 983 324 25 19 16.5 25 Note that row elements are of different types (sugar milk and soap) where as column elements are of same type. Keeping the same philosophy , since prices are of same type they better represented as columns. Note that adding a given column appears natural. For example, if you observe sum row below, it shows total amount of sugar sold in a day. Same is with Milik and Soap. However, adding all row elements of a row does not make any sense. What is Sugar + Milk + Soap? Sweet Washing System?.....Yucc!!! If we want to preserve this convention, price also should be column rather than row.
  • 13. Contd… • Now, conventional matrix emerges, with rows columns etc., • I will leave it to you to extend to other matrix related ideas. (Ab tumhare havaale matrix saathiyon ) • All the best!!