chapter three

3 The geometry of linear equations

 

This chapter covers

  • The geometrical sense of systems of linear equations
  • Telling which systems could possibly be solved
  • Understanding iterative solvers
  • Choosing a direct solver based on the complexity of the algorithms
  • Picking the best solver for any particular system

Systems of linear equations are everywhere. In fact, we have already solved one in the first chapter. Remember the two trains problem?

solution = solve([
    Vp - Va * 2,
    Va * 1 + Vp * 1 – 450
], (Va, Vp))

Yes, this is a small but well-defined system of linear equations.

You have probably heard that half of the whole domain of machine learning is just linear systems in disguise, and this is not far from the truth. These systems are more than welcome in traditional engineering and economics too. And, of course, they are used vastly in applied geometry. From small systems that occur naturally in problems like ray and triangle intersection to fairly large systems that help us put a texture on a triangle mesh.

These systems are popular in computational mathematics for two reasons. First, a lot of real-world processes are inherently linear and can be modeled with simple linear equations. Second, because computational mathematics is not very good at solving non-linear systems, whenever it’s possible we tend to linearize our equations even if we lose some of the modeling accuracy.

3.1 Linear equations as hyperplanes

3.1.1 An equation is a hyperplane

3.1.2 A solution is where hyperplanes intersect

3.1.3 Summary

3.2 Overspecified and underspecified systems

3.2.1 Overspecified systems

3.2.2 Underspecified systems

3.2.3 Summary

3.3 A visual example of an interactive linear solver

3.3.1 The basic principle of iteration

3.3.2 Starting point and exit conditions

3.3.3 Convergence and stability

3.3.4 Summary

3.4 Direct solver

3.4.1 Turning an iterative solver into a direct one

3.4.2 Algorithm complexity

3.4.3 Summary

3.5 Linear equations system as matrix multiplication

3.5.1 Matrix equations

3.5.2 What types of matrices we should know about

3.5.3 Things we’re allowed to do with equations

3.5.4 Summary

3.6 Gaussian elimination and LU-decomposition

3.6.1 An example

3.6.2 What do “elimination” and “decomposition” mean exactly?

3.6.3 Summary

3.7 Which solver fits my problem the best?