What would be the time complexity of multiplying a square matrix $A$ of size $K \times K$, $n$-times?

210 Views Asked by At

I have got O$(k^3 \log(n))$. But I could not justify the time. Could you please elaborate the same? In case of Matrix Chain Multiplication all parenthesisations of $A$ $n$-times will have a cost of $(n-1)k^3$.