7 Solving systems of linear equations
This chapter covers
- Detecting collisions of objects in a 2D video game
- Writing equations to represent lines and finding where lines intersect in the plane
- Picturing and solving systems of linear equations in 3D or beyond
- Re-writing vectors as linear combinations of other vectors
When you think of algebra, you probably think of problems that require “solving for x.” For instance, you probably spent quite a bit of time in algebra class learning to solve equations like 3x2 + 2x + 4 = 0; that is, figuring out what value or values of x make the equation true.
Linear algebra, being a branch of algebra, has the same kinds of computational questions. The difference is that what you want to solve for may be a vector or matrix rather than a number. If you take a traditional linear algebra course, you might cover a lot of algorithms to solve these kinds of problems. But because you have Python at your disposal, you only need to know how to recognize the problem you’re facing and choose the right library to find the answer for you.