matrix_exponentiation
Raise a square matrix to a non-negative integer power using fast exponentiation, with optional modular arithmetic for large-number computations.
Instructions
Raise a square matrix to a non-negative integer power using fast exponentiation, with optional modular arithmetic.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mod | No | Optional modulus for modular arithmetic | |
| power | Yes | Non-negative integer exponent (max 1 billion) | |
| matrix | Yes | Square matrix (max 10x10) |