O'Reilly logo

Clojure for Machine Learning by Akhil Wali

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Multiplying matrices

Multiplication is another important binary operation on matrices. In the broader sense, the term matrix multiplication refers to several techniques that multiply matrices to produce a new matrix.

Let's define three matrices, A, B, and C, and a single value N, in the REPL. The matrices have the following values:

Multiplying matrices

We can multiply the matrices by using the M/* function from the core.matrix library. Apart from being used to multiply two matrices, this function can also be used to multiply any number of matrices, and scalar values as well. We can try out the following M/* function to multiply two given matrices in the REPL:

user> (pm ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required