{
const f = x => -2/3*x + 2/3;
const g = x => x-4;
return Plot.plot({
width: 800,
height: 500,
marks: [
Plot.line([[-3,f(-3)],[4,f(4)]]),
Plot.line([[-3,g(-3)],[4,g(4)]]),
Plot.dot([[14/5, -6/5]], {
fill: 'currentColor', r: 3,
stroke: 'currentColor'
}
),
Plot.axisX({y:0}),
Plot.axisY({x:0}),
Plot.ruleX([0]),
Plot.ruleY([0])
]
})
}
Geometry of 2D and 3D Systems
Solutions of systems of equations have many applications. Before we go and try to solve a system, though, it might make sense to consider whether we think there should even be a solution. That is, we might think first from a theoretical perspective.
This type of thinking often has a picture associated with it; thus, we might use geometric intuition to guide our thought process. In linear algebra, we often work with very high dimensional systems. Nonetheless, visualization in two and three dimensions is often a good start for this geometric intuition.
Two dimensions
The general two-dimensional, linear system of equations has the form
\[\begin{aligned} ax+by &= U \\ cx+dy &= V. \end{aligned}\]The symbols \(a\), \(b\), \(c\), \(d\), \(U\), and \(V\) are parameters - i.e. symbols representing constants. The symbols \(x\) and \(y\) are variables - i.e. symbols representing unknowns that we’d like to solve for.
The graph of each of these equations is a line and a solution to the system is realized geometrically as a point of intersection point of those lines. Thus, we can glean an understanding of the possible types of solutions sets of these equations by envisioning the way a pair of lines can relate to one another in the plane.
A unique solution
Generally, two generic lines are unlikely to be parallel. In that case, the lines will intersect at exactly one point. Thus, most often a pair of linear equations will have a unique solution.
Here’s an example:
\[\begin{aligned} 2x+3y &= 2 \\ x-y &= 4. \end{aligned}\]It’s not hard to come up with a pair of points, graph each line, and visualize the solution. It should look like so:
Here’s some computer code to plot and solve that system.
This example is by no means unique; if you write down an essentially random system of two linear equations in two unknowns, it will almost certainly have exactly one solution.
No solutions
If you choose your coefficients just right, then you can force the lines to be parallel. Generally, this means that the corresponding system will have no solutions. Here’s an example:
\[\begin{aligned} 4x+6y &= 2 \\ 2x+3y &= -2 \end{aligned}\]You can plot and try to solve the system, if you like.
Infinitely many solutions
In an even more special case, the two lines might be coincident. In this case, there will be infinitely many solutions.
\[\begin{aligned} 4x+6y &= 2 \\ 2x+3y &= 1 \end{aligned}\]You can see how the solution is represented in the computer code, too.
Three dimensions
The general three dimensional system has the form
\[\begin{aligned} ax+by+cz &= U \\ dx+ey+fz &= V \\ gx+hy+iz &= W \\ \end{aligned}\]The graphs of these equations in space are planes so we can understand the types of possibilities here by graphing planes in space.
A unique solution
Just as in two dimensions, we can generally expect a linear system in 3D to have a unique solution. To see this, note first that the intersection of a pair of planes generally forms a line.
Now, if we add another plane to this picture, then generally the line will pierce this plane in exactly one point.
Infinitely many solutions
Continuing from the first two planes in the previous example, well it just might happen that the third plane contains the line of intersection of the first two exactly.
In this case, the corresponding system has infinitely many solutions.
No solutions
Of course, it’s also possible that the new plane is parallel to the line.
In this case the corresponding system has no solutions.
\(n\)-dimensional space
Generally, we’ll work in \(n\) dimensions. Often \(n\) will be small - 2 or 3 or 4; maybe 5. Sometimes, \(n\) will be very, very large; this is particularly true in real world applications.
We’ll also work with arbitrary \(n\), particularly when we state, prove, or use theorems. For example, the ideas that we’ve explored here are true for all \(n\). That is, for all integers \(n>0\), the generic \(n\times n\) linear system has a unique solution. In special cases, an \(n\times n\) linear system can have infinitely many or zero solutions.
Clearly, we’ll need to be a bit more precise about terms like “generic” and “special cases”, which we can and will do.