Big Data
Matrix Multiplication
Authors: Nisarga Bhaskar, Niveditha Kundapuram
Prof. K.S. Srinivas
Department of AI/ML
Acknowledgements:
Significant information in the slide deck presented through the Unit 1 of the course have been created by the TAs, Niveditha and
Nisarga. There have been some information which we might have leveraged with the help of Prof. K.S. Srinivas’s. We may have
supplemented the same with contents from books and other sources from Internet and would like to sincerely thank, acknowledge and
reiterate that the credit/rights for the same remain with the original authors/publishers only. These are intended for classroom
presentation only.
,Big Data
Basics of Matrix Multiplication
● Matrices : Arrays of numbers arranged
in rows and columns.
○ Fundamental in mathematical
computations and data processing.
● An mxn matrix has m rows and n
columns
○ Can be considered as a collection of
m row vectors and n column
vectors
● Involves multiplying corresponding elements of two matrices to generate a new matrix.
,Big Data
Algorithmic Approach to Matrix Multiplication
Matrix multiplication is a mathematical operation that combines two matrices to produce a
new matrix by multiplying corresponding elements and summing the results
, Big Data
Algorithmic Approach to Matrix Multiplication
Input: matrices A and B
Let C be a new matrix of the appropriate size
For i from 1 to n:
For j from 1 to p:
Let sum = 0
For k from 1 to m:
Set sum ← sum + Aik × Bkj
Set Cij ← sum
Return C
Matrix Multiplication
Authors: Nisarga Bhaskar, Niveditha Kundapuram
Prof. K.S. Srinivas
Department of AI/ML
Acknowledgements:
Significant information in the slide deck presented through the Unit 1 of the course have been created by the TAs, Niveditha and
Nisarga. There have been some information which we might have leveraged with the help of Prof. K.S. Srinivas’s. We may have
supplemented the same with contents from books and other sources from Internet and would like to sincerely thank, acknowledge and
reiterate that the credit/rights for the same remain with the original authors/publishers only. These are intended for classroom
presentation only.
,Big Data
Basics of Matrix Multiplication
● Matrices : Arrays of numbers arranged
in rows and columns.
○ Fundamental in mathematical
computations and data processing.
● An mxn matrix has m rows and n
columns
○ Can be considered as a collection of
m row vectors and n column
vectors
● Involves multiplying corresponding elements of two matrices to generate a new matrix.
,Big Data
Algorithmic Approach to Matrix Multiplication
Matrix multiplication is a mathematical operation that combines two matrices to produce a
new matrix by multiplying corresponding elements and summing the results
, Big Data
Algorithmic Approach to Matrix Multiplication
Input: matrices A and B
Let C be a new matrix of the appropriate size
For i from 1 to n:
For j from 1 to p:
Let sum = 0
For k from 1 to m:
Set sum ← sum + Aik × Bkj
Set Cij ← sum
Return C