Find a Solution to a Set of Simultaneous Linear Equations An elementary introduction to the application of matrix manipulations with PROC IML is to solve simultaneous equations. For example: .4r + .2s + .3t = 40 .6r + .2s + .1t = 30 .5r + .3s + .3t = 50 Given the numerical constants of X and the stated values of Y, solve for r, s, and t. In this example, p=3. The IML code shown below can be adjusted for any value of p, as long as the matrix is 'square' and no linear relationships exist among the rows or columns. The solution is based on the matrix relationship that if X is non-singular, (i.e, it is invertible), a solution can be calculated. X * b = y * original form of equation b = X^(-1) * y * solution vector (X-inverse times Y) * program begins; PROC IML; * insert the pxp matrix with the name X ; X = { 0.4 0.2 0.3, 0.6 0.2 0.1, 0.5 0.3 0.3}; Y = {40, 30, 50}; *enter the Y matrix as a column vector; print x, y; xiv = INV(x); *compute the inverse of X; PRINT xiv; * multiply the two matrices will compute the identity matrix; ii = x * xiv; print ii; * b is the solution vector for r, s, and t; b = xiv * y; print b; * verify you get the original Y vector; yh = x * b; PRINT yh; RUN; QUIT;