How to Check Whether a Vector Lies in a Span
At a glance
- 1. Build a linear combination
Set an arbitrary linear combination of the given vectors equal to the target vector.
- 2. Write a system
Match coordinates to obtain a system of linear equations for the coefficients.
- 3. Solve for coefficients
If the system has a solution, the target belongs to the span; otherwise, it does not.
- 4. Check the result
Substitute the coefficients into the combination and verify every coordinate.
Try it: Matrix calculator
A set of vectors determines a subspace: its span, consisting of every linear combination of those vectors. To decide whether a particular vector is included, you do not need to describe the whole subspace. You only need to check whether some choice of coefficients produces that vector.
The test is a system of linear equations. If the system has a solution, the target vector is in the span; if it has no solution, it is not.
Set the linear combination equal to the target
Suppose the given vectors are and the target is . The question is whether there are scalars such that
The scalars are unknowns. Write each vector in coordinates and equate corresponding coordinates. This gives a system of linear equations in .
If the vectors are columns of a matrix , the same test is simply whether the matrix equation
has a solution. The column space of is the span of its columns, so lies in that span exactly when this system is consistent.
Worked example: a vector that is in the span
Check whether is in the span of
Set up the linear combination:
Matching coordinates gives
The third equation gives . The first then gives , and the second is satisfied: . Thus the system has a solution, and
Therefore, belongs to the span. The two given vectors also span a plane in ; the calculation shows that this particular target lies in that plane.
Worked example: a vector that is not in the span
Keep the same two vectors, but use the target . The coordinate equations become
The first two equations give and : doubling the first equation and subtracting the second gives , so and then . The third equation instead requires . The equations contradict one another, so there is no solution. Hence is not in the span.
This also shows why checking all coordinates matters: matching only some coordinates does not establish membership.
Matrix method for larger problems
Place the given vectors as columns of and append the target as an extra column. Row-reduce the augmented matrix . If reduction produces a row of the form
the system is inconsistent, so is not in the span. If no such row appears, the system is consistent, and is in the span. There may be one solution or many; either is enough for membership.
Equivalently, compare ranks: is in the column space of exactly when .
Common mistakes
- Confusing spanning with independence. The vectors do not have to be linearly independent. Redundant vectors can still span a subspace, and membership is still determined by whether the system is consistent.
- Expecting a unique answer. A target can have multiple representations when the given vectors are dependent. Existence, not uniqueness, is the test.
- Using too few coordinate equations. In , match all coordinates. A candidate combination that works in some coordinates but not others is not equal to the target.
- Assuming the span fills the whole space. Two vectors in usually span at most a plane, not all of . A target outside that plane will make the system inconsistent.
- Misreading the question. The span of any set is a subspace by definition. The usual question is whether the given vector belongs to that span, not whether the span itself is a subspace.
References
- Linear Algebra and Its Applications, David C. Lay, Steven R. Lay, and Judi J. McDonald
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.