Ask Your Question

Revision history [back]

What algorithm does Sage use for the product of two matrices?

(am new to Sage and programming in general as you can see. Feel free to expand your answer)

I want to find out how a matrix product is calculated.

M = random_matrix(ZZ, 10, density=1)
N = random_matrix(ZZ, 10, density=1)
M*N

Is it simply identical to M.__mul__(N) in each case? Or does Sage switch to another algorithm if useful - M._multiply_strassen(N) for example?