% Creates two matrices and checks if they commute.
% Minas Spetsakis, Jan. 2021

S=rand(4)*0.1;
A=S+S';
B=S-S';
norm(A*B-B*A)/norm(A*B)

A=eye(4)+S;
B=eye(4)-S;
norm(A*B-B*A);
% or norm(A*B-B*A)/norm(A*B)
