clear 

A=[2 3 1;5 2 4.2;22 17 4];
B=rand(3);
C=A*B;
if abs(det(C)-(det(A)*det(B)))<=1e-08
disp('Equality is true')
end
% An h sunthiki stin if itan det(C)==(det(A)*det(B)) to apotelesma tha itan
% mh alithes. Giati?
% if det(C)==(det(A)*det(B))
% disp('Equality is true');
% end
invA=inv(A);
invB=inv(B);
invC=inv(C);

if abs(det(invC)-(det(invA)*det(invB)))<=1e-08
disp('Equality is true for inverse matrices');
end