If A and B are 2x2 matrices, how is the input (A*B)^2 interpreted by MATLAB as?

1 次查看(过去 30 天)
Is (A*B)^2 interpreted as A*B*A*B or (A*B)*(A*B)?

回答(2 个)

Matt J
Matt J 2022-6-4
It is interpreted as,
tmp=A*B;
C=tmp*tmp;

Benjamin Thompson
Since 2x2 matrix multiplication is supported by the associative property, both of those interpretations are the same. This is similar to scalar multiplication.

类别

Help CenterFile Exchange 中查找有关 Mathematics 的更多信息

标签

产品


版本

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by