I need to do the following two operations:
solve
Ax=bby inverting then-by-n matrix A, andsolve
r=Arusing power iteration (i.e. by repeated multiplying current vector r by A) such as one would do for thePageRankalgorithm.
My question is: When computing the matrix-vector product A^{-1}b or the matrix-vector product Ar, is it better to use numpy.dot or numpy.matmul? (I understand there might be differences in higher dimensions, but my question is only for the case where A is a 2D array and b, r are vectors.)