2020-12-21

If A and B are $n×n$ matrices. Find the cost of calculating ${A}^{2}+BAB$

funblogC

Expert

Step 1
According to the given information,
It is required to determine the cost of calculating ${A}^{2}+BAB$
where A and B are $n×n$ matrices.
Step 2
The cost of multiplying two square matrices of order
cost of ${A}^{2}={n}^{3}$
cost of $BAB=\left(BA\right)B$
cost of $BAB={n}^{3}+{n}^{3}$
thus,
cost of ${A}^{3}+BAB={n}^{3}+{n}^{3}+{n}^{3}$
cost of ${A}^{3}+BAB=3{n}^{3}$

Jeffrey Jordon

Expert