what is the matrix complexity when you multiply an mxn matrix by nxm matrix? my guess is that it will be m^2 since it would result to an m by m matrix, but im not too sure
all help would be much appreciated
what is the matrix complexity when you multiply an mxn matrix by nxm matrix? my guess is that it will be m^2 since it would result to an m by m matrix, but im not too sure
all help would be much appreciated
Copyright © 2021 JogjaFile Inc.
Computing the dot product of two length $n$ vectors requires $2n$ operations. In your case, you compute a dot product of two length $n$ vectors for each entry in the result. A total of $m^2 \cot 2n$ operations. The the operation count is $2m^2n$.
You can generalize this idea for an $n\times m$ matrix multiplied by a $m\times p$ matrix to get an operation count of $2mnp$