Linear Independence and Basis Calculator

Check whether real vectors are linearly independent, extract a basis from the original vectors, and see exactly which vectors are redundant. All input stays in your browser.

Enter Vectors as Matrix Columns

A candidate pivot no larger than this fraction of the largest input magnitude is treated as zero. Standard suits most ordinary decimal data.

Each column is one vector. Enter integers, decimals, or scientific notation. Display precision does not round intermediate calculations.

Put coordinates in rows and vectors in columns. Separate entries with spaces, commas, or tabs. A valid paste has 1–8 rows and 1–8 columns.

Independence Result

Not calculated Enter vectors and test independence
Rank
Vectors
Pivot vectors
Redundant vectors
A set is independent when every vector column contains a pivot after row reduction.

Advertisement

Basis, RREF, and Dependence Relations

Basis for the span

Pivot columns selected from the original vectors.

Calculate a set to display a basis.

Reduced row echelon form

Pivot positions determine independence.

Calculate a set to display RREF.

Dependence relations

Each equation writes a redundant vector using the basis vectors.

Dependence relations will appear here.

Null-relation basis

Coefficient vectors c satisfying Ac = 0.

Relation coefficient vectors will appear here.

How the Independence Test Works

Place the vectors in the columns of A = [v₁ v₂ … vₖ] and row-reduce A. A pivot column adds a new direction; a non-pivot column is a combination of earlier pivot columns.

Independent set

rank(A) = k

Every column is a pivot, so the only solution of Ac = 0 is c = 0.

Dependent set

rank(A) < k

At least one free coefficient gives a nonzero relation among the vectors.

Basis for the span

{original pivot columns}

The selected original vectors are independent and span every input vector.

Numerical method: The calculator uses Gauss–Jordan elimination with partial pivoting and JavaScript double-precision arithmetic. The selected tolerance is relative to the largest entered magnitude. Results are numerical estimates for decimal data; use exact symbolic software when exact rational dependence is required.

How to Use the Calculator

  1. Choose the coordinate dimension and vector count. A set with more vectors than coordinates must be dependent.
  2. Enter each vector down one column, or paste the whole matrix with one coordinate row per line.
  3. Choose a pivot tolerance and select Test independence.
  4. Read the verdict, basis, and dependence relations. Pivot and vector numbers start at 1.

Worked 3D Example

The default vectors are v₁ = (1,0,1), v₂ = (2,1,3), and v₃ = (3,1,4). Because v₃ = v₁ + v₂, the set is dependent.

Input matrix

A = [[1,2,3], [0,1,1], [1,3,4]]

RREF

[[1,0,1], [0,1,1], [0,0,0]]

Basis and relation

{v₁, v₂}; v₃ = v₁ + v₂

Independent, Spanning, and a Basis

These words answer different questions. Independent means no input vector can be built from the others. Spanning Rᵈ means the rank equals the coordinate dimension d. A set is a basis of Rᵈ only when both are true—equivalently, it contains exactly d vectors and has rank d.

A dependent set can still span Rᵈ; it simply contains extra vectors. The pivot vectors displayed by this calculator remove that redundancy while preserving the same span.

Linear Independence and Basis FAQs

How do I know if vectors are linearly independent?

Put them in the columns of a matrix. They are independent if every column is a pivot column after row reduction, or equivalently if the matrix rank equals the number of vectors.

How does the calculator choose a basis?

It scans columns from left to right during elimination. The original vectors at the resulting pivot-column positions form the displayed basis. Other valid bases may exist.

Why does the basis use original vectors rather than RREF columns?

Row operations can change the column space. RREF tells us which positions are pivots, but the basis for the original span must take vectors from those positions in the original matrix.

Can more vectors than coordinates be independent?

No. At most d vectors can be independent in Rᵈ. Any set containing more than d vectors is automatically dependent.

Does an independent set always form a basis?

It always forms a basis for its own span. It forms a basis for the entire coordinate space only when its rank also equals the coordinate dimension.

Why can changing tolerance change the answer?

Nearly dependent decimal vectors can create a very small pivot. A looser tolerance treats more small pivots as numerical zero; exact-zero mode can instead magnify floating-point roundoff.

Are my vector entries private?

Yes. The calculation, clipboard text, and downloaded file are created locally. This calculator’s code does not transmit or save the entered values.

Calculation Notes

Last reviewed: August 5, 2026 by the Starlight Tools editorial team.

The calculator supports 1–8 vectors with 1–8 real coordinates. Nonzero magnitudes must be between 10⁻⁴⁰ and 10⁴⁰. The reported relation residual is the largest absolute coordinate of Ac across the displayed null-relation basis.

Explore more tools