David W. Sutherland _________________________________________________________ dws3963
Week 2____________________________________________________________________2.3.9
http://hotard108.tripod.com/m311.html
Find the inverse of the matrix, if it exists:
> matrix(3,3,[2,5,-1,-1,3,-2,0,-6,3]);
To solve, start with the system:
> matrix(3,3,[2,5,-1,-1,3,-2,0,-6,3]),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 1/2 the first row to the second row to get a zero in the (2,1) position.
> matrix(3,3,[2,5,-1,0,11/2,-5/2,0,-6,3]),matrix(3,3,[1,0,0,1/2,1,0,0,0,1]);
Next, add 12/11 the second row to the third row to get a zero in the (3,2) position.
> matrix(3,3,[2,5,-1,0,11/2,-5/2,0,0,3/11]),matrix(3,3,[1,0,0,1/2,1,0,6/11,12/11,1]);
Next, subtract 10/11 the second row from the first row to get a zero in the (1,2) position.
> matrix(3,3,[2,0,14/11,0,11/2,-5/2,0,0,3/11]),matrix(3,3,[6/11,-10/11,0,1/2,1,0,6/11,12/11,1]);
Next, subract 14/3 times the third row from the first row to get a zero in the (1,3) position.
> matrix(3,3,[2,0,0,0,11/2,-5/2,0,0,3/11]),matrix(3,3,[-2,-6,-14/3,1/2,1,0,6/11,12/11,1]);
Next, add 55/6 times the third row to the second row to get a zero in the (2,3) position.
> matrix(3,3,[2,0,0,0,11/2,0,0,0,3/11]),matrix(3,3,[-2,-6,-14/3,11/2,11,55/6,6/11,12/11,1]);
Next, divide the first row by two, divide the second row by 11/2, and divide the third row by 3/11.
> matrix(3,3,[1,0,0,0,1,0,0,0,1]),matrix(3,3,[-1,-3,-14/6,1,2,5/3,2,4,11/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):
Warning, new definition for norm
Warning, new definition for trace> a:=matrix(3,3,[-1,-3,-14/6,1,2,5/3,2,4,11/3]);
> b:=matrix(3,3,[2,5,-1,-1,3,-2,0,-6,3]);
> evalm(a&*b);
The product is the identity matrix, so the solution must be correct.
> Answer:=matrix(3,3,[-1,-3,-14/6,1,2,5/3,2,4,11/3]);
>