top of page

Gauss and Cramer methods: Linear system solutions in excel

I've just started studying Data Science and, in my first semester, I'm learning a lot about linear algebra. To share some of what I'm studying, I've created this excel with some methods for solving linear systems, which are very important in the field.



Gauss Method

How it works: On the Gauss Method tab, simply fill in cells A3 to C5 with the coefficients of the matrix. The second matrix, usually made up of numbers without variables, must be entered in column E. After that, the results will be automatically calculated.



What is displayed:

  • Colors for easier interpretation:

    • Main diagonal: green

    • Expected zeros: light red

    • Result: blue

  • Excel performs the Gauss elimination automatically and displays the results, whether in decimals, integers or fractions.

  • The tool also validates the results by multiplying the values obtained by the original matrix and checking that they are consistent with the second matrix.

  • The determinant is calculated to check if there is a solution to the system.



Cramer's method

How it works: In this tab, you enter the matrix of coefficients (with the values in green) and the vector of results (also in green). Excel automatically calculates the determinants of the matrices and solves for the system's X, Y and Z variables, as shown in the example:



When Excel replaces the column of X, Y, and Z with the values from the results vector, it shows how each of these variables is calculated.


Excel then shows the calculated X, Y and Z results.




Solving for Two Lines


How it works: In this tab, the user can enter the values of the equations of the two lines so that Excel can determine whether they are coincident, perpendicular, parallel or secant.


Example calculation: Excel receives the coefficients of the equations and performs the calculation automatically. If the system is solvable, it will display the values of A, B and C in both decimal and fractional form.



Conclusion

The aim of this material is to help with the study and application of methods for solving linear systems. The tool is designed to be practical and intuitive, making calculations faster and more accessible. I hope this material helps you study and learn more about linear algebra!

If you want to learn more about this and other related topics, keep following the blog!

© 2023 por Vicky Costa.

Networking
Social

  • Facebook
  • LinkedIn
  • Instagram
  • GitHub
  • Pinterest
bottom of page