# 矩阵的幂（Matrix power，matrix_power）

方阵的整数次幂。

## 怎么写

### matrix_power(matrix, n)

**matrix**

一个方阵。接受一个矩阵，写作行组成的列表。

**n**

幂次。接受一个整数。

## 示例

- $\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)`

  在求解器中，`matrix_power([[1, 1], [1, 0]], 5)` 的结果是 `[[8, 5], [5, 3]]`。

  [在求解器中打开](https://zh.hilberon.com/?q=matrix_power%28%5B%5B1%2C%201%5D%2C%20%5B1%2C%200%5D%5D%2C%205%29)

## 相关函数

- [matrix_log](https://zh.hilberon.com/library/matrix_log)

  方阵的对数。
- [matrix_function](https://zh.hilberon.com/library/matrix_function)

  方阵的函数。
- [matrix_exp](https://zh.hilberon.com/library/matrix_exp)

  方阵的指数。
- [identity_matrix](https://zh.hilberon.com/library/identity_matrix)

  给定大小的单位矩阵。
- [hilbert_matrix](https://zh.hilberon.com/library/hilbert_matrix)

  给定大小的 Hilbert 矩阵：第 i 行第 j 列的元素为 1/(i + j - 1)。
- [diagonal_matrix](https://zh.hilberon.com/library/diagonal_matrix)

  对角线为给定列表、其余位置为零的矩阵。

---
Source: https://zh.hilberon.com/library/matrix_power
