clear all;
close all;
clc;

%initialize matrices
A = [ 1  4  5;
     -2 1  -1];
B = [1  0;
     0 -1;
     2  0];
C = [0 1;
     1 0];
D = [2 -1;
     1  0];

%compute matrix products
AB = A*B
BA = B*A
BC = B*C
BD = B*D
CA = C*A
CC = C*C
CD = C*D
DA = D*A
DC = D*C
DD = D*D