David W. Sutherland _________________________________________________________ dws3963
Week 2____________________________________________________________________2.3.7
http://hotard108.tripod.com/m311.html
Find the inverse of the matrix, if it exists:
> matrix(3,3,[-1,2,3,2,1,5,4,-6,-7]);
To solve, start with the system:
> matrix(3,3,[-1,2,3,2,1,5,4,-6,-7]),matrix(3,3,[1,0,0,0,1,0,0,0,1]);
Next, try to reduce the matrix on the left so that it looks like the one on the right. To begin, add 2 times the first row to the second row to get a zero in the (2,1) position, and add 4 times the first row to the third row to get a zero in the (3,1) position.
> matrix(3,3,[-1,2,3,0,5,11,0,2,5]),matrix(3,3,[1,0,0,2,1,0,4,0,1]);
Next, subtract 2/5 times the second row from the third row to get a zero in the (3,2) position.
> matrix(3,3,[-1,2,3,0,5,11,0,0,3/5]),matrix(3,3,[1,0,0,2,1,0,16/5,-2/5,1]);
Next, subtract 2/5 the second row from the first row to get a zero in the (1,2) position.
> matrix(3,3,[-1,0,-7/5,0,5,11,0,0,3/5]),matrix(3,3,[1/5,-2/5,0,2,1,0,16/5,-2/5,1]);
Next, add 7/3 times the third row to the first row to get a zero in the (1,3) position.
> matrix(3,3,[-1,0,0,0,5,11,0,0,3/5]),matrix(3,3,[23/3,-4/3,7/3,2,1,0,16/5,-2/5,1]);
Next, subtract 55/3 times the third row from the second row to get a zero in the (2,3) position.
> matrix(3,3,[-1,0,0,0,5,0,0,0,3/5]),matrix(3,3,[23/3,-4/3,7/3,-170/3,25/3,-55/3,16/5,-2/5,1]);
Next, divide the first row by -1, divide the second row by 5, and divide the third row by 3/5.
> matrix(3,3,[1,0,0,0,1,0,0,0,1]),matrix(3,3,[-23/3,4/3,-7/3,-34/3,5/3,-11/3,16/3,-2/3,5/3]);
The matrix on the right should be the inverse matrix. To check, multiply the inverse matrix with the original. If the product is the identity matrix, the solution is correct.
To check in Maple, use the linalg package.
> with(linalg):
> a:=matrix(3,3,[-23/3,4/3,-7/3,-34/3,5/3,-11/3,16/3,-2/3,5/3]);
> b:=matrix(3,3,[-1,2,3,2,1,5,4,-6,-7]);
> evalm(a&*b);
The product is the identity matrix, so the solution must be correct.
> Answer:=matrix(3,3,[-23/3,4/3,-7/3,-34/3,5/3,-11/3,16/3,-2/3,5/3]);
>