Example from class EDUŠ A = [ 1 2;3 4] A = 1 2 3 4 ***********Generate augmented matrix with identity on right side - use eye(2) EDUŠ aug = [A eye(2)] aug = 1 2 1 0 3 4 0 1 **********Reduce to RREF to get inverse on RHS EDUŠ A1 = rref(aug) A1 = 1.0000 0 -2.0000 1.0000 0 1.0000 1.5000 -0.5000 ******* Extract the block of the augmented matrix which represents the inverse EDUŠ in = A1(:,3:4) in = -2.0000 1.0000 1.5000 -0.5000 EDUŠ in*A ******* verify ans = 1 0 0 1 EDUŠ