Matrix-Matrix Multiplication in Machine Learning

Hritika Agarwal
2 min readJul 18, 2020

--

To multiply two matrices, the number of columns of the first matrix must equal the number of rows of the second matrix.An m x n matrix multiplied by an n x o matrix results in an m x o matrix.

We multiply two matrices by breaking it into several vector multiplications and concatenating the result.

Example-:

Applying this in machine learning problems:

You can try this code in octave/Matlab.

The output will be as follow:

--

--

No responses yet