Search for question
Question

2. Consider matrix multiplication for a 2 x 2 matrix. a) Use pseudo code to write a program that inputs a1, a12, a21, and a22 from Matrix A, and b11,

b12, b21, and b22 from Matrix B, and the calculates AB and BA. b) Code this into Matlab and test your program on the matrices c) Use the built in matrix multiplication commands in Matlab on the matrices A and B and compare your answers. A=\left(\begin{array}{ll} 1 & 2 \\ 3 & 4 \end{array}\right) \text { and } B=\left(\begin{array}{ll} 4 & -1 \\ 2 & -2 \end{array}\right)

Fig: 1

Fig: 2

Fig: 3

Fig: 4

Fig: 5