Tsallaka zuwa abun ciki
Justice Tech School

Matrix Power and Rank

matrix_power repeats a matrix product and matrix_rank counts independent rows.

Example
a = np.array([[1, 1], [1, 0]])
print(np.linalg.matrix_power(a, 5))
print(np.linalg.matrix_rank(np.array([[1, 2], [2, 4]])))

Result

[[8 5]
 [5 3]]
1

Exercise

Repeat a product.

np.linalg.(a, 3)

Quiz Test

Fibonacci with matrix power?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.