Matrix Determinant
matrix_determinantCompute the determinant of a square matrix to assess invertibility and scaling factor.
Instructions
Calculate the determinant of a square matrix.
Note: Requires NumPy. Raises ValueError if NumPy is unavailable.
Examples: matrix_determinant([[1, 2], [3, 4]]) matrix_determinant([[1, 0, 0], [0, 1, 0], [0, 0, 1]]) # Identity 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 | ||
| topic | Yes | ||
| difficulty | Yes | ||
| determinant | Yes |