Using rref to give the inverse of a square matrix A Suppose A is an nxn matrix and I is the nxn identity matrix. I = [ 1 0 0 ... 0 ] [ 0 1 0 ... 0 ] [ 0 0 1 ... 0 ] [ . . . . . ] [ . . . . . ] [ . . . . . ] [ 0 0 0 ... 1 ] (I = eye(3,3) will make I the 3x3 identity matrix in scilab) The inverse of A, written A^(-1) has the property that A*A^(-1) = A^(-1)*A = I Not all matrices have inverses, for example [ 2 1 ] does not. [ 4 2 ] To use rref to find inverses, we augment (A | I) and rref the resulting n x 2n matrix. If the resulting matrix looks like (I | B) then B = A^(-1). If there are fewer than n pivots, in the first n columns, A does not have an inverse. *************************** Scilab commands to do scilab2. exec('filename') inv(A) = A^(-1) is the inverse of the matrix A eye(3,3) is the 3x3 identity matrix