Develop geometrical intuition for a 2D linear system
Av=b
where A is a 2-by-2 matrix, and v and b are 2-by-1 column vectors
Setup
Start a python shell and import libraries:
Row picture
As a specific example, we consider the system
(21−11)(xy)=(15)
In the row picture, this system consists of following two linear equations:
2x−yx+y=1=5
Each equation above represents a straight line (of the form y=mx+b). The following code block plots these lines. The solution is their intersection point (2, 3):
produces the following plot:
Column picture
A different way to think about this problem is to view the operation Av as taking a linear combination of the columns of A and ask what is is the correct linear combination that gives us b. In other words, for what values of x and y do we get:
x(21)+y(−11)=(15)
The next code block plots the two column vectors and the correct linear combination:
Visualizing the column space
The column space of a matrix is the span of the column vectors, i.e. the set of all possible linear combinations of the columns.
The green dots in the plot below show the specific linear combinations we generated from the two column vectors
Solving a linear system
How to solve the linear system Av=b for given A and b