A = [2 1 1; 1 -1 -1; 1 2 1];
b = [3; 0; 0];

R = rref([A b]);
disp("Reduced Row Echelon Form of Augmented A =");
disp(R);

AA = [A eye(length(A))];
R = rref(AA);
disp("A and Inverse of A:");
disp(R);