Solving a system of equations in pure python without numpy or scipy covers a system of equations from math to complete code, and it’s very closely related to the matrix inversion post. There are times that we’d want an inverse matrix of a system for repeated uses of solving for X, but most of the time we simply need a single solution of X for a system of equations, and there is a method that allows us to solve directly for X where we don’t need to know the inverse of the system matrix. We’ll use python again, and even though the code is similar, it is a bit different. So there’s a separate GitHub repository for this project.
Also, we know that numpy or scipy or sklearn modules could be used, but we want to see how to solve for X in a system of equations without using any of them, because this post, like most posts on this site, is about understanding the principles from math to complete code. However, near the end of the post, there is a section that shows how to solve for X in a system of equations using numpy / scipy. Remember too, try to develop the code on your own with as little help from the post as possible, and use the post to compare to your math and approach. However, just working through the post and making sure you understand the steps thoroughly is also a great thing to do.