In: Computer Science
Use MATLAB to nd the products AB and BA for the following matrices:
Consider the matrices,
The objective is to find the products AB and BA by using MATLAB.
In MATLAB, for defining a matrix the row elements are separated “,” and the next column is generated by “;”.
Input:
>>A = [11, 5; -9, -4];
>>B = [-7 -8; 6, 2];
>>AB=A*B
>>BA=B*A
Output:
Hence, obtain
In this problem, AB ≠ BA.
In this problem, AB ≠ BA.