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. Typical problem given A and A*C find C. Solution: use the above method to find A^(-1) and multiply AC on the left by the inverse. A^(-1)*(A*C) = (A^(-1)*A)*C = I*C = C. Often, for matrices, AB not= BA. So this usually means (A*C)*A^(-1) will not be C. *************************** Scilab commands to do scilab3. exec('filename') inv(A) = A^(-1) is the inverse of the matrix A eye(3,3) is the 3x3 identity matrix