How to Solve Linear Equations in Excel Using the MINVERSE and MMULT FunctionsSystems of linear equations pop up everywhere you look. Small retail shops want to maximize the profit from the distribution of goods taking up limited shelf space. Chemists need to balance constituents of a complex reaction.
The TI-89 has an on-board computer algebra system (CAS) that manipulates mathematical expressions and allows you to do things like find exact solutions to different types of algebraic and differential equations, as well as take various kinds of de.
Economists are compelled to build models; sometimes of businesses, sometimes of entire nations. We’re going to take a look at solving linear equations using Microsoft Excel.
Although Excel is designed to be a highly interactive tool for bookkeeping and analysis and is not intended to compete with dedicated mathematics tools like SciLab and Matlab, Excel has no trouble solving the fundamental problems encountered by most businesses.If fact, the greatest difficulty encountered when solving linear equations with Excel lies not in Excel, but in formulating the problem in a structure that Excel understands. To focus on correctly formulating the problem, we will use an extremely simple pair of simultaneous equations for out illustration. This set of equations is from a discussion in the fun introductory text for mathematical economics written by Anthony and Biggs. For our problem, we’re going to take a pair of equations that define what economists call the demand set and the supply set. We seek a stable equilibrium point; in other words, the point where supply equals demand. How to Formuate the ProblemSupply set:2q – 15p = -20Demand set:q + 5p = 40If we plot these equations in Excel, we are not surprised to see that as we move along the horizontal axis, that is, in the direction of increasing supply, the demand set line shows the price decreasing along the vertical axis. Similarly, if we follow the supply set line we observed that increasing price along the vertical axis will be associated with a corresponding increase in the supply.
We readily see that the linear plots intersect; we now need to calculate the point of intersection. Plot of supply set and demand set defined by our linear equations.There are many ways to solve a set of simultaneous linear equations. If we wish to use Excel, the most direct way is to express our problem in matrix notation.A set of linear equations can be expressed as a matrix times a vector equaling a vector of known values. The algebra looks like this:Ax=bFor our problem, what this notation is saying isWe can find q and p by multiplying the (-20, 40) vector by the inverse of A, and that is exactly what we will have Excel do. Algebraically, what we will do is this:x = A -1bIn Excel this is easy. We enter the matrix in any 2 X 2 array of cells: The matrix of coefficients for our system of linear equations.Here we have labeled the matrix “A” but this is not necessary for our calculation.
![Ti 89 and button Ti 89 and button](/uploads/1/2/5/5/125563305/434922676.jpg)
Now we’re all set to calculate the solution to our equations.Calculate the matrix inverse by selecting another 2 X 2 array of cells. In the formula bar, start typing =MINVERSE( and then highlight the cells of the first matrix (i.e. “A”) to indicate that this array is the argument to the MINVERSE function. Close the parentheses but do not hit. MINVERSE is an example of what Mr.
Excel refers to as a “CSE” function. This handy mnemonic reminds us that you must hit for the array argument to be properly entered.When you are finished, the formula bar should look like this: The formula bar after successfully entering the MINVERSE functionNote: You cannot enter the curly braces manually for CSE functions. You must hit!Now that we have the matrix inverse, we can apply it to the vector (-20, 40) using matrix multiplication. You guessed it – another CSE function! Enter -20 and 40 in two cells in a column. Highlight two empty cells in a neighboring column. In keeping with mathematical convention, our answers will appear as a column vector; rows won’t work!
After selecting two empty cells in a column, type = MMULT( in the formula bar. Highlight the inverse 2 X 2 matrix to enter it as the first argument, add a comma, then highlight the (-20,40) vector as the second argument. Close the parenthesis, and by now you know that you will hold down the control and shift key prior to hitting.
The results should look something like this: The results of solving the system of linear equations.Of course, we always want to confirm that our results are correct, so we insert q=20 and p=4 into the original equations and prove that we have found our equilibrium point. We also take pleasure in observing that this is consistent with the intersection point visualized on the chart.Mathematical purists will note that calculating a matrix inverse is not the most efficient way to solve a system of linear equations.
![Ti-89 for dummies pdf Ti-89 for dummies pdf](/uploads/1/2/5/5/125563305/870601344.jpg)
However, it becomes very efficient if we would like to apply the same matrix inverse to several different sets of parameters. Of course, it is just this sort of “what-if” analysis that makes Excel such a desirable tool to begin with.If you would like to download the completed workbook, click. Please feel free to drop me a note if you have any comments or questions.To learn more, have a look at our including 3 new 1-day online courses!.
Share this article:.