How to Solve Algebraic Equations with Multiple Variables (3 Easy Ways)

Need to learn how to solve algebraic equations with multiple variables in Excel? If you are looking for such unique tricks, you’ve come to the right place. Here, we will take you through 3 easy and effective methods of solving algebraic equations with multiple variables.


How to Solve Algebraic Equations with Multiple Variables: 3 Easy Ways

Let’s say we have the following three equations.
2x + 5y + 2z = -38
3x – 2y + 4z = 17
-6x + y – 7z = -12
Now, we’ll solve the equations by the following three methods. Thus, we’ll determine the value of the three variables x, y, and z.
Here, we have used Microsoft Excel 365 version, you may use any other version according to your convenience.


1. Applying Cramer’s Rule to Solve Algebraic Equations with Multiple Variables in Excel

Cramer’s rule is a particular formula in linear algebra. We often use it to solve systems of linear equations with as many equations as unknowns. It is effective whenever the equations have a distinct solution. Here, we’ll execute the same process in Excel. So, follow these simple steps.

📌 Steps:

  • At the very beginning, write down the equations in cells in the B5:B7 range.

How to Solve Algebraic Equations with Multiple Variables

  • Secondly, make a simple data range like in the image below.
  • Here, in cells in the C11:E13 range, we insert the Coefficients of the variables x, y, and z.
  • Also, in cells in the F11:F13 range, we input the Constants. Actually, they are the right-hand sides of the equations.

How to Solve Algebraic Equations with Multiple Variables

  • At this moment, select cell C15 and put in the following formula.
=C11
  • Then, press the ENTER key.

How to Solve Algebraic Equations with Multiple Variables

  • In this instance, drag the Fill Handle tool up to cell E17 in two steps. Firstly, drag it vertically down. Then, move it horizontally to the right.
  • Thus, you’ll get the coefficients in these cells.

How to Solve Algebraic Equations with Multiple Variables

  • Next, select cells in the C15:E17 range.
  • Later, press CTRL+1.

How to Solve Algebraic Equations with Multiple Variables

  • Suddenly, it opens the Format Cells dialog box.
  • After that, move to the Border tab.
  • Then, select the Style as shown in the picture below.
  • Later, give two outside borders like in the image.
  • Lastly, click OK.

How to Solve Algebraic Equations with Multiple Variables

  • Now, the data range looks like a determiner.

How to Solve Algebraic Equations with Multiple Variables

  • Then, select cell C19 and write down the following formula.
=F11
  • Then, press ENTER.
  • Actually, here we’re putting the Constants in the first column.

How to Solve Algebraic Equations with Multiple Variables

Note: In Dx, constants will sit in the first column. The coefficients of y and z will occupy the next two columns.

  • At this time, put the coefficients of y and z in the next two columns.

How to Solve Algebraic Equations with Multiple Variables

  • In Dy, the constants will sit in the second column. The other two columns are occupied by the coefficients of x and z respectively.

How to Solve Algebraic Equations with Multiple Variables

  • Similarly, in Dz, the constants will sit in the third column. The other two columns are occupied by the coefficients of x and y respectively.

How to Solve Algebraic Equations with Multiple Variables

  • Then, select cell D16 and get the following formula in the Formula Bar.
=MDETERM(C15:E17)

The MDETERM function determines the determinant of an array.

  • Now, press ENTER.

How to Solve Algebraic Equations with Multiple Variables

So, the determinant is -13.

  • Similarly, calculate the determinant of x, y, and z.

How to Solve Algebraic Equations with Multiple Variables

  • Then, select cell G5 and paste the formula below.
=G20/G16
  • Hence, press ENTER.

How to Solve Algebraic Equations with Multiple Variables

That’s how we get the value of variable x.

  • Similarly, find the value of y and z by dividing their determinant (Dy; Dz) with the determinant D respectively.

How to Solve Algebraic Equations with Multiple Variables

Read More: How to Solve an Equation for X When Y is Given in Excel 


2. Utilizing MINVERSE and MMULT Functions

In this method, we’ll use some Excel functions to solve the problem. Let’s see the process in detail.

📌 Steps:

  • Firstly, create a simple data range containing the Coefficients and Constants of the three equations like Method 1.

How to Solve Algebraic Equations with Multiple Variables

  • Then, create matrix A and matrix B as in the image below.
  • Here, matrix A contains the coefficients of the variables.
  • On the other hand, matrix B includes the constants of the equations.

How to Solve Algebraic Equations with Multiple Variables

  • Afterward, create a space for the inverse matrix of A.

How to Solve Algebraic Equations with Multiple Variables

  • Then, select cell C19 which is the first cell in this area.
  • Later, write down the following formula.
=MINVERSE(C15:E17)

the MINVERSE function returns the inverse matrix of a matrix. The main matrix should be stored in an array.

  • Lastly, press ENTER.

How to Solve Algebraic Equations with Multiple Variables

Note: If you are using any other version of Excel rather than Microsoft Excel 365, make sure to press CTRL+SHIFT+ENTER to get the result.

  • Eventually, select cell G5 and paste the following formula.
=MMULT(C19#,H15:H17)

Here, the MMULT function multiplies two matrices in array form. Then, it returns the product in an array form.

  • Correspondingly, hit the ENTER key.

How to Solve Algebraic Equations with Multiple Variables

Thus, we get the values of the variables in cells in the G5:G7 range.

Read More: How to Solve 2 Equations with 2 Unknowns in Excel


3. Using Solver Add-in to Solve Algebraic Equations with Multiple Variables in Excel

In this method, we’ll use an add-in of Excel. It’s the Solver add-in. So, without further delay, let’s dive in!

📌 Steps:

  • Primarily, create a basic outline like in the image below. Also, we did it in Method 1.

How to Solve Algebraic Equations with Multiple Variables

  • Now, construct a data range like the one below.
  • It should contain the headings R.H.S, and L.H.S horizontally and Equation 1, Equation 2, and Equation 3 vertically.

How to Solve Algebraic Equations with Multiple Variables

  • Later, go to the File tab.

How to Solve Algebraic Equations with Multiple Variables

  • Then, select Options from the menu.

How to Solve Algebraic Equations with Multiple Variables

  • Instantly, the Excel Options window opens up.
  • Then, move to the Add-ins menu.
  • After that, select Excel Add-ins from the Manage drop-down list.
  • Later, click on Go.

How to Solve Algebraic Equations with Multiple Variables

  • Immediately, it opens the Add-ins dialog box.
  • Now, check the box of Solver Add-in.
  • Lastly, click OK.

How to Solve Algebraic Equations with Multiple Variables

  • At this moment, create a data range like the picture below.

How to Solve Algebraic Equations with Multiple Variables

  • Then, select cell C16 and insert the following formula.
=SUMPRODUCT(C11:E11,C21:E21)

Here, the SUMPRODUCT function returns the sum of the products of the corresponding values from all the arrays. It takes one or more arrays as an argument, multiplies the corresponding values of all the arrays, and then returns the sum of the products.

  • As always, tap the ENTER key on your keyboard.

Applying Solver Add-in

Note: For your convenience, we highlighted the cell ranges of the arguments in the picture above.

  • After that, put the constant of Equation 1 in cell E16.

Applying Solver Add-in

  • Equivalently, fill up the fields of Equation 2 and Equation 3.

Applying Solver Add-in

  • Then, jump to the Data tab.
  • Next, select Solver on the Analyze group.

Applying Solver Add-in

  • Hence, the Solve Parameters wizard opens.
  • Then, select cell C16 in the Set Objective box.
  • After that, select cells in the C21:E21 range in the By Changing Variable Cells box.
  • Lastly, click on the Add button.

Applying Solver Add-in

  • Thus, it opens the Add Constraint input box.
  • Later, give the reference of cell C16 into the Cell Reference box.
  • Next, select the equal sign (=).
  • After that, give the cell reference of cell E16 into the Constraint box.
  • Lastly, click on Add.

Applying Solver Add-in

  • Correspondingly, repeat the above steps for Equation 2 and Equation 3.
  • At last, click on the OK button.

Applying Solver Add-in

  • Again, it returns us to the Solver Parameters window.
  • Then, untick the box of Make Unconstrained Variables Non-Negative.
  • After that, choose Simplex LP from the Select a Solving Method drop-down list.
  • Lastly, click on Solve.

Applying Solver Add-in

  • Hence, the Solver Results wizard will open.
  • Here, select the OK button.

Applying Solver Add-in

  • Thus, we can see the values of the variables in cells in the C21:E21 range.

Applying Solver Add-in

  • Finally, move the answers to the top of the sheet to make them visible easily.
  • So, transfer them to cells in the G5:G7 range.

Applying Solver Add-in

That’s how we can solve these algebraic equations with multiple variables.

Read More: How to Solve System of Equations in Excel


Practice Section

For doing practice by yourself we have provided a Practice section like below in each sheet on the right side. Please do it by yourself.

Practice Section

Read More: How to Solve Polynomial Equation in Excel


Download Practice Workbook

You may download the following Excel workbook for better understanding and practice yourself.


Conclusion

This article provides easy and brief solutions to solve algebraic equations with multiple variables in Excel. Don’t forget to download the Practice file. Thank you for reading this article, we hope this was helpful. Please let us know in the comment section if you have any queries or suggestions.


Related Articles


<< Go Back to Excel Solve Equation | Excel Solver Examples | Solver in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Shahriar Abrar Rafid
Shahriar Abrar Rafid

Shahriar Abrar Rafid, BSc, Naval Architecture and Marine Engineering, Bangladesh University of Engineering and Technology, Bangladesh, has worked with the ExcelDemy project for more than 1 year. He has written over 100+ articles for ExcelDemy. He is a professional visual content developer adept at crafting scripts, meticulously editing Excel files, and delivering insightful video tutorials for YouTube channels. His work and learning interests vary from Microsoft Office Suites and Excel to Data Analysis, VBA, and Video recording and... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo