Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

Matrix power (matrix_power)

A square matrix to a whole power.

How to write it

matrix_power(matrix, n)

matrix
A square matrix. Takes a matrix, written as a list of rows.
n
The power. Takes a whole number.

Examples

  • (1110)5=(8553)\displaystyle \begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix}^{5} = \begin{pmatrix} 8 & 5 \\ 5 & 3 \end{pmatrix}
    matrix_power([[1, 1], [1, 0]], 5)

    In the solver, matrix_power([[1, 1], [1, 0]], 5) gives [[8, 5], [5, 3]].

    Open in the solver