Learn how to create, multiply, and manipulate matrices in C programming language. The innermost loop performs the multiplication of corresponding elements from the current row of the first matrix and the current column of the second matrix. Add these products to get the element of the result matrix. Repeat these steps for all elements of the result matrix. C++ Program to Multiply Two Matrices Understand matrix multiplication in C by Scaler Topics. This article explains how to multiply two matrices and the criteria for multiplying two matrices. To put it simply, matrix multiplication computes each element of the result matrix by taking the dot product of the rows in the first matrix with the columns in the second matrix. The product C = A × B is a m x p matrix if A is a m x n matrix and B is a n x p matrix.