How this calculation works
Row reduction identifies which input columns add new directions. The corresponding original columns form a basis of their span. The result reports whether all supplied columns are independent and whether their span fills the ambient coordinate space.
Basis = original pivot columns; dimension = rank(A)A worked example
Columns (1,0), (2,0), (0,1) span the plane. Original columns 1 and 3 form a basis, so the dimension is 2. The full input list is dependent.
Good to know
Exact rational matrices up to 6 × 6. Entries are bounded to ±1,000,000, integer fraction denominators to 1,000,000 and decimal input to 6 places. Intermediate fractions have a size limit. No complex entries, symbolic expressions, measurement uncertainty or numerical-conditioning analysis. Ordered vectors are entered as matrix columns.
Reference: TU Delft: basis and dimension (opens in a new tab) ↗
A spanning list can contain more vectors than a basis needs
The vectors (1,0), (2,0) and (0,1) span the plane, but the second vector repeats the direction already supplied by the first. A basis must span the same space without redundant directions. Here columns 1 and 3 form a basis of dimension two.
The ambient dimension is the number of components in each column. Three-component vectors live in a three-dimensional coordinate space even when their span is only a line or a plane. The output distinguishes the dimension of the span from whether that span fills the ambient space.
Column order can change which original vectors are selected. Several different bases may span the same subspace. A different valid answer from another solver does not by itself imply an error; compare the spans and independence.
The finite-field basis and span finder instead works modulo a selected prime and treats input rows as vectors. Its dependence relationships can differ from this rational-coordinate calculation.
Use pivot positions from reduction, then return to the original columns
Row operations preserve dependence relations among columns but can change the column space itself. That is why this tool uses the reduced matrix to identify pivot positions and retrieves those columns from the original input.
A zero column contributes no direction. If all columns are zero, the span is the zero subspace with dimension zero. Its basis is the empty list: a list containing the zero vector would be dependent and therefore would not be a basis.
Enter every candidate vector as a column. For example, three planar candidates make a 2 × 3 input matrix. If you enter them as three rows instead, you have asked about two vectors in a different ambient space.
A few questions, answered
Does a basis always contain every supplied vector?
Only if the supplied columns are already independent. Otherwise some columns must be removed while preserving the span.
Is the selected basis unique?
No. The dimension is fixed, but many bases may describe the same space. The tool chooses original pivot columns in input order.
Can I enter equations of a subspace?
This page expects spanning vectors. For a subspace defined by homogeneous equations, enter its coefficient matrix in the null-space basis calculator.