Enter two spans, choose dimension, and calculate today. See a basis for the combined space. Check intersection size and whether the sum is direct.
Enter spanning vectors for two subspaces in Rn.
Use one vector per line. Separate entries with commas or spaces.
Fractions like 1/2 are allowed.
| Subspace | Spanning vectors | Expected dimension |
|---|---|---|
| U | [(1,0,0), (0,1,0)] | 2 |
| V | [(0,1,0), (0,0,1)] | 2 |
| U+V | [(1,0,0), (0,1,0), (0,0,1)] | 3 |
| Intersection | [(0,1,0)] | 1 |
This calculator formalizes how two linear subspaces combine inside R^n. You provide spanning vectors for U and V, and the tool constructs a basis for U+V, estimates intersection size, and flags whether the sum is direct. These outputs support quick lecture checks, modeling workflows, and documentation where linear structure matters. Verify rank overlap quickly.
Vectors are entered one per line, with coordinates separated by spaces or commas, and optional fractions like 3/5. Blank lines are ignored, so you can group vectors. The ambient dimension n must match every vector length. A tolerance ε controls when near‑zero pivots are treated as zero, which stabilizes results for noisy decimals. Display decimals affect tables and exported files, not internal arithmetic.
To compute dim(U) and dim(V), the calculator reduces the generator matrices to reduced row echelon form and selects pivot columns as an independent set. The basis reported for each subspace is drawn from your original vectors, making it easy to track meaning. The sum basis is obtained by stacking the generators of U and V and repeating the pivot selection. For the intersection, it solves Uα = Vβ by forming the combined matrix [U | −V] and extracting nullspace directions. This converts equality of two spans into a single homogeneous system.
The dimension identity dim(U+V)=dim(U)+dim(V)−dim(U∩V) provides a consistency check and is used to keep dimension outputs stable. “Direct sum” is reported as Yes precisely when dim(U∩V)=0, meaning each vector in U+V has a unique decomposition u+v. If the intersection is nontrivial, shared directions appear in the intersection basis table. Optional Gram–Schmidt produces an orthonormal basis for U+V, useful for projections, distances, and angle computations.
CSV export is convenient for spreadsheets, while PDF export provides a report for assignments and audits. When validating results, compare pivot columns with your original vectors, try a smaller or larger ε, and verify that computed bases reproduce the same span by forming linear combinations. If U+V reaches full dimension n, the combined subspace covers the entire ambient space. If dim(U)+dim(V) is large but dim(U+V) is small, the intersection explains the overlap and highlights redundant generators.
It is the set of all sums u+v where u comes from U and v comes from V. The calculator outputs a basis and dimension for this combined subspace.
Your lines may contain dependent vectors. The tool selects an independent subset (pivot columns) that spans the same subspace, so the basis is shorter and nonredundant.
The calculator solves Uα = Vβ by building the matrix [U | −V] and finding its nullspace. The resulting directions map to vectors that lie in both subspaces.
It means U and V share only the zero vector, so dim(intersection)=0. In that case, every vector in U+V has a unique decomposition into a part from U and a part from V.
If inputs are exact integers, keep ε very small. For decimals from measurements or rounding, increase ε slightly so near‑dependent vectors are treated as dependent and the reported dimensions stay stable.
An orthonormal basis is convenient for projections and distance calculations. It can also improve numerical behavior when you reuse the basis in later computations such as least‑squares fitting.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.