✏️ Explanatory Question

Write an algorithm to multiply two 2-Dimensional array?

👁 1,834 Views
📘 Detailed Answer
💡

Answer with Explanation

Multiplication of two matrixes:
Rule: Multiplication of two matrixes is only possible if first matrix has size m X n and other matrix has size n x r. Where m, n and r are any positive integer.

Multiplication of two matrixes is defined as:

Where 1 ? i ? m and 1 ? j ? n


For example:
Suppose two matrixes A and B of size of 2 x 2 and 2 x 3 respectively:

Here A is a two