Linear Independence Calculator
Enter up to four vectors of up to four components. The calculator builds the matrix whose columns are your vectors, runs Gaussian elimination, and tells you whether the set is linearly independent or dependent. You get the rank, the dimension of the span, and the full row-reduction worked out step by step.
What does linear independence mean?
A set of vectors is linearly independent when the only way to write the zero vector as a linear combination of those vectors is to set every coefficient to zero. In other words, none of the vectors can be built from the others by scaling and adding. If you can express one vector as a combination of the rest, the set is linearly dependent and contains redundant information. Independent vectors each point in a genuinely new direction that the others cannot reach.
How Gaussian elimination checks independence
Place your vectors as columns of a matrix. Row-reduce that matrix using Gaussian elimination (elementary row operations that do not change the column space). Count the non-zero rows that remain: that number is the rank. If the rank equals the number of vectors, every column had a pivot, meaning every vector contributes a new independent direction. If the rank is smaller, at least one column was a combination of earlier columns, so the set is dependent. Gaussian elimination is more general than the determinant test because it handles non-square matrices (more or fewer vectors than dimensions).
When can you use the determinant instead?
When the number of vectors exactly equals the dimension of the space (a square matrix), you can also compute the determinant. A non-zero determinant means the vectors are independent; a zero determinant means they are dependent. For non-square cases, such as two vectors in 3D or three vectors in 2D, the determinant is not defined and you must use rank via Gaussian elimination. The calculator computes the determinant automatically for square cases and shows it alongside the rank.
Rank, span, and basis
The rank of the matrix is exactly the dimension of the space spanned by your vectors. If you have three vectors in 3D and the rank is 3, they span all of 3D space and form a basis for it. If the rank is 2, your three vectors all lie in a single plane; one of them is redundant. A set of k vectors forms a basis for a k-dimensional space precisely when they are linearly independent and span that space. Linear independence is the no-redundancy requirement; spanning is the no-gaps requirement.
Linear independence quick reference
| Condition | What it means | Result |
|---|---|---|
| rank(A) = k | All k vectors contribute a new direction | Linearly Independent |
| rank(A) < k | At least one vector is a combination of others | Linearly Dependent |
| k > n | More vectors than dimensions (pigeonhole) | Always Dependent |
| k = n and det(A) != 0 | Square matrix with non-zero determinant | Independent and a basis |
| k = n and det(A) = 0 | Square matrix is singular | Dependent |
| Any vector is the zero vector | Zero vector is always dependent | Always Dependent |
| Two vectors are scalar multiples | One is a scalar multiple of the other | Always Dependent |
Key conditions and their meaning for a set of k vectors in n-dimensional space.
Frequently asked questions
How do I tell if two vectors are linearly independent?
Two vectors are linearly independent if and only if neither is a scalar multiple of the other. Equivalently, set them as columns of a 2-row matrix and check that the 2x2 determinant is non-zero, or verify the rank is 2. If the vectors point in the same or exactly opposite directions, they are dependent.
Can more vectors than dimensions ever be independent?
No. In an n-dimensional space you can have at most n linearly independent vectors. If you have more vectors than dimensions, at least one must be a linear combination of the others. The rank of the matrix is always at most the number of rows (dimensions), so rank can never exceed n.
What is the difference between linear independence and orthogonality?
Orthogonality means vectors are perpendicular (their dot product is zero). Independence means no vector can be written as a combination of the others. Orthogonal vectors are always independent, but independent vectors are not necessarily orthogonal. For example, (1, 0) and (1, 1) are independent but not orthogonal.
What does it mean if the determinant is zero?
For a square matrix, a zero determinant means the columns (your vectors) are linearly dependent. The matrix is singular, meaning it has no inverse, and the system Ax = 0 has non-trivial solutions. In geometric terms, the column vectors all lie in a lower-dimensional subspace instead of spanning the full space.
How do I find the specific dependence relation?
Reduce the matrix fully to reduced row echelon form (RREF). Each free-variable column (a column without a pivot) corresponds to a dependent vector. The RREF expresses those columns as combinations of the pivot columns, giving you the explicit coefficients of the dependence relation.
Is the zero vector always linearly dependent?
Yes. Any set containing the zero vector is automatically linearly dependent, because you can write zero as 1 times the zero vector plus 0 times every other vector. That is a non-trivial combination equaling zero, which violates the definition of independence.