Matrix Inverse
matrix_inverseCompute the inverse of a square matrix provided as a 2D list. Requires a non-singular matrix.
Instructions
Calculate the inverse of a square matrix.
Note: Requires NumPy. Raises ValueError if NumPy is unavailable.
Examples: matrix_inverse([[1, 2], [3, 4]]) matrix_inverse([[2, 0], [0, 2]]) # Diagonal matrix
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| matrix | Yes | 2D list of numbers representing a square matrix. Each inner list is a row. Example: [[1, 2], [3, 4]] |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | Yes | ||
| error | No | ||
| topic | Yes | ||
| success | Yes | ||
| difficulty | Yes | ||
| result_matrix | No |