Javatpoint Logo
Javatpoint Logo

Java Program to multiply two matrices

We can multiply two matrices in java using binary * operator and executing another loop. A matrix is also known as array of arrays. We can add, subtract and multiply matrices.

In case of matrix multiplication, one row element of first matrix is multiplied by all columns of second matrix.

Matrix Multiplication in Java

Let's see a simple example to multiply two matrices of 3 rows and 3 columns.

Test it Now


6 6 6 
12 12 12 
18 18 18 
Next TopicJava Programs

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA