Closure and span
A subspace of contains zero and is closed under addition and scalar multiplication. An equivalent test for a nonempty set is closure under every linear combination of two of its members. This explains why the line is a subspace and the parallel line is not. The latter misses zero.
The span of a list of vectors consists of all their linear combinations. It is a subspace because adding or scaling combinations gives another combination of the same list. In particular, the span is the smallest subspace containing the list.
Independent directions and coordinates
A list is linearly independent when the zero vector has only one representation as a combination of the list, with all coefficients zero. Otherwise at least one vector is redundant: solve a nonzero relation for any vector with a nonzero coefficient.
A basis is an independent spanning list. Spanning gives coordinates for every vector. Independence makes those coordinates unique, because two different coordinate lists for the same vector would yield a nonzero relation on subtraction. The dimension is the number of vectors in a basis. One way to justify that the count is fixed: a basis of vectors identifies the space with where more than vectors are dependent by elimination and fewer than cannot span because their matrix has fewer than pivots.
In take the plane Put and then The vectors and span the plane. Comparing their first two entries proves independence. The dimension is
Change the basis, keep the vector
Put the basis columns into If is the coordinate vector relative to that ordered basis, then is the vector in ordinary coordinates. To find solve The same physical displacement can have different coordinates in different bases.
from sympy import Matrix
B = Matrix([[1, 1], [0, 1]])
v = Matrix([5, 2])
print(list(B.LUsolve(v)))[3, 2]Exercises
Is a subspace of
Show solution✓ Checked
No. Zero fails the equation, since its coordinate sum is
Find a basis for the span of and
Show solution✓ Checked
The third is the sum of the first two, so it adds no direction. The first two are independent because their first two entries form the coordinate vectors of Keep those two.
Find the coordinates of relative to the ordered basis then relative to the reversed order.
Show solution✓ Checked
In the first order, the second entry gives coefficient for The first entry leaves coefficient for Reversing the order gives coordinates