Matrix Multiplication
matrix_multiplyMultiply two matrices (A × B) using 2D lists of numbers to compute the product matrix.
Instructions
Multiply two matrices (A × B).
Note: Requires NumPy. Raises ValueError if NumPy is unavailable.
Examples: matrix_multiply([[1, 2], [3, 4]], [[5, 6], [7, 8]]) matrix_multiply([[1, 2, 3]], [[1], [2], [3]])
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| matrix_a | Yes | 2D list of numbers representing the first matrix. Each inner list is a row. Example: [[1, 2], [3, 4]] | |
| matrix_b | Yes | 2D list of numbers representing the second matrix. Each inner list is a row. Example: [[5, 6], [7, 8]] |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes | ||
| cols_a | Yes | ||
| cols_b | Yes | ||
| rows_a | Yes | ||
| rows_b | Yes | ||
| difficulty | Yes | ||
| result_matrix | Yes |