acalculator

Test vectors for linear independence

Type your vectors, one per row. The linear independence calculator puts them in the columns of a matrix, reduces it to RREF and tells you whether they are linearly independent or dependent, with a relation between them.

Your numbers

Vectors (one per row)
Rows are vectors; columns are their entries.
Independent or dependent
Linearly dependent (rank 2 < 3 vectors)

Linearly dependent (rank 2 < 3 vectors).

Dependence relation
v₃ = −v₁ + 2v₂
Rank
2
Number of vectors
3
Independent vectors
v₁, v₂
RREF of the matrix [v₁ v₂ …]
[1, 0, −1; 0, 1, 2; 0, 0, 0]

Independent or dependent: Linearly dependent (rank 2 < 3 vectors). Linearly dependent (rank 2 < 3 vectors).

How to calculate

Checks whether vectors are linearly independent by the rank of the matrix with the vectors as columns, in exact fractions, and gives a dependence relation when they are not.

Example with the default inputs (Vectors (one per row) [1, 2, 3; 4, 5, 6; 7, 8, 9]): Linearly dependent (rank 2 < 3 vectors).

Method: Put the vectors in the columns of a matrix and reduce it to RREF. They are independent exactly when every column has a pivot (rank = number of vectors). Otherwise the first column without a pivot, j, gives v_j = Σ R[row][j] × v_p over the earlier pivot columns p.

  • Every entry is read as an exact fraction: a decimal such as 0.1 is 1/10, so there is no rounding.
  • There are 1 to 10 vectors, all with the same number of entries, from 1 to 10.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Vectors (one per row) 1, 2, 3; 4, 5, 6; 7, 8, 9 gives Independent or dependent Linearly dependent (rank 2 < 3 vectors), Dependence relation v₃ = −v₁ + 2v₂, Rank 2, Independent vectors v₁, v₂.Source: Dan Margalit and Joseph Rabinoff, Interactive Linear Algebra (Georgia Institute of Technology), §2.5 Linear Independence (a set is linearly independent when x₁v₁ + … + x_kv_k = 0 has only the trivial solution; this holds exactly when the matrix with the vectors as columns has a pivot in every column; a wide matrix has dependent columns; a nonzero solution of Ax = 0 gives a dependence relation), https://textbooks.math.gatech.edu/ila/linear-independence.html (retrieved 2026-10-19); MIT OpenCourseWare 18.06 Linear Algebra (Gilbert Strang), Lecture 7: Solving Ax = 0: pivot variables, special solutions (counting the pivots gives the rank), https://ocw.mit.edu/courses/18-06-linear-algebra-spring-2010/resources/lecture-7-solving-ax-0-pivot-variables-special-solutions/ (retrieved 2026-10-19)
  2. Vectors (one per row) 1, 0, 0; 1, 1, 0; 1, 1, 1 gives Independent or dependent Linearly independent (rank 3 = 3 vectors), Rank 3, RREF of the matrix [v₁ v₂ …] [1, 0, 0; 0, 1, 0; 0, 0, 1].Source: Dan Margalit and Joseph Rabinoff, Interactive Linear Algebra (Georgia Institute of Technology), §2.5 Linear Independence (a set is linearly independent when x₁v₁ + … + x_kv_k = 0 has only the trivial solution; this holds exactly when the matrix with the vectors as columns has a pivot in every column; a wide matrix has dependent columns; a nonzero solution of Ax = 0 gives a dependence relation), https://textbooks.math.gatech.edu/ila/linear-independence.html (retrieved 2026-10-19)
  3. Vectors (one per row) 1, 2; 3, 4; 5, 6 gives Independent or dependent Linearly dependent (rank 2 < 3 vectors), Dependence relation v₃ = −v₁ + 2v₂.Source: Dan Margalit and Joseph Rabinoff, Interactive Linear Algebra (Georgia Institute of Technology), §2.5 Linear Independence (a set is linearly independent when x₁v₁ + … + x_kv_k = 0 has only the trivial solution; this holds exactly when the matrix with the vectors as columns has a pivot in every column; a wide matrix has dependent columns; a nonzero solution of Ax = 0 gives a dependence relation), https://textbooks.math.gatech.edu/ila/linear-independence.html (retrieved 2026-10-19)
  4. Vectors (one per row) 2, 4; 1, 2 gives Independent or dependent Linearly dependent (rank 1 < 2 vectors), Dependence relation v₂ = (1/2)v₁.Source: Dan Margalit and Joseph Rabinoff, Interactive Linear Algebra (Georgia Institute of Technology), §2.5 Linear Independence (a set is linearly independent when x₁v₁ + … + x_kv_k = 0 has only the trivial solution; this holds exactly when the matrix with the vectors as columns has a pivot in every column; a wide matrix has dependent columns; a nonzero solution of Ax = 0 gives a dependence relation), https://textbooks.math.gatech.edu/ila/linear-independence.html (retrieved 2026-10-19)
  5. Vectors (one per row) 1, 2, 3; 0, 0, 0 gives Independent or dependent Linearly dependent (rank 1 < 2 vectors), Dependence relation v₂ = 0.Source: Dan Margalit and Joseph Rabinoff, Interactive Linear Algebra (Georgia Institute of Technology), §2.5 Linear Independence (a set is linearly independent when x₁v₁ + … + x_kv_k = 0 has only the trivial solution; this holds exactly when the matrix with the vectors as columns has a pivot in every column; a wide matrix has dependent columns; a nonzero solution of Ax = 0 gives a dependence relation), https://textbooks.math.gatech.edu/ila/linear-independence.html (retrieved 2026-10-19)
  6. Vectors (one per row) 3, -1 gives Independent or dependent Linearly independent (rank 1 = 1 vector).Source: Dan Margalit and Joseph Rabinoff, Interactive Linear Algebra (Georgia Institute of Technology), §2.5 Linear Independence (a set is linearly independent when x₁v₁ + … + x_kv_k = 0 has only the trivial solution; this holds exactly when the matrix with the vectors as columns has a pivot in every column; a wide matrix has dependent columns; a nonzero solution of Ax = 0 gives a dependence relation), https://textbooks.math.gatech.edu/ila/linear-independence.html (retrieved 2026-10-19)

How it works

Vectors v₁, v₂, …, v_k are linearly independent when x₁v₁ + x₂v₂ + … + x_kv_k = 0 only for x₁ = x₂ = … = x_k = 0. Otherwise they are linearly dependent.

  1. Matrix. Put the vectors in the columns of a matrix A: column j is v_j. Each vector you type is a row of the box, so A is the box turned on its side.
  2. RREF. Reduce A to its reduced row echelon form R by Gauss-Jordan elimination: for each column from the left, the first remaining row with a nonzero entry becomes the pivot row; it is swapped up, scaled so the pivot is 1, and subtracted from every other row to clear the column. Row operations keep every relation between the columns.
  3. Rank. The rank r is the number of pivots. The vectors are independent exactly when r = k, a pivot in every column (Interactive Linear Algebra §2.5). More vectors than entries (k > n) are always dependent, since there are at most n pivots.
  4. Relation. When the vectors are dependent, let j be the first column with no pivot. Column j of R is the sum of R[i][j] times the pivot columns before it (pivot i sits in row i), and the same relation holds for the original vectors: v_j = Σ R[i][j] × v_p, over the pivot columns p before j, in order. If column j is all 0 (v_j is the zero vector), the relation is v_j = 0.

The independent vectors are the pivot columns' vectors: they are independent, and every other vector is a combination of them.

Rules

  • 1 to 10 vectors, each with 1 to 10 entries; every vector has the same number of entries. Each cell is an integer, a decimal or a fraction. A cell typed as a fraction (1/3 or 3/2) is read as that exact fraction, and a decimal as its exact value (0.25 is 1/4), so all the arithmetic is exact.

Output format

  • Independent or dependent: Linearly independent (rank r = k vectors) or Linearly dependent (rank r < k vectors), with 1 vector for k = 1.
  • Dependence relation (dependent vectors only): the name of vector j, then " = ", then the terms in the order of their pivot columns, leaving out weights of 0. A weight of size 1 is written as the vector alone (v₁), a whole number before it (2v₂), a fraction in brackets before it ((1/2)v₁). The first term has − before it when its weight is negative (−v₁). Each later term is joined by " + " or, for a negative weight, " − " (a sign with a space on each side). With no terms left, the relation is v_j = 0. Vector names carry subscript digits: v₁, v₁₀. Example: v₃ = −v₁ + 2v₂.
  • Independent vectors: the pivot columns' vectors, v₁, v₂, or none when every vector is 0.
  • RREF: exact fractions in lowest terms with the true minus sign, row by row in square brackets with rows separated by semicolons.
  • The answer sentence is the independent-or-dependent text with a full stop after it.

Worked examples by hand

[1, 2, 3], [4, 5, 6], [7, 8, 9]. A = [1, 4, 7; 2, 5, 8; 3, 6, 9].

  1. R2 → R2 − 2 × R1 gives [0, −3, −6]; R3 → R3 − 3 × R1 gives [0, −6, −12].
  2. R2 → −1/3 × R2 gives [0, 1, 2]; R1 → R1 − 4 × R2 gives [1, 0, −1]; R3 → R3 + 6 × R2 gives [0, 0, 0].

R = [1, 0, −1; 0, 1, 2; 0, 0, 0]: rank 2 < 3, so linearly dependent. Column 3 has no pivot: v₃ = −1 × v₁ + 2 × v₂, so v₃ = −v₁ + 2v₂. Check: −[1, 2, 3] + 2 × [4, 5, 6] = [7, 8, 9].

[1, 0, 0], [1, 1, 0], [1, 1, 1]. A = [1, 1, 1; 0, 1, 1; 0, 0, 1] reduces to the identity: rank 3 = 3, linearly independent.

Three vectors in a plane. [1, 2], [3, 4], [5, 6]: A = [1, 3, 5; 2, 4, 6] has at most 2 pivots for 3 vectors, so they are dependent. R = [1, 0, −1; 0, 1, 2] gives v₃ = −v₁ + 2v₂: −[1, 2] + 2 × [3, 4] = [5, 6].

Parallel vectors. [2, 4] and [1, 2]: A = [2, 1; 4, 2] reduces to [1, 1/2; 0, 0], so v₂ = (1/2)v₁.

The zero vector. [1, 2, 3] and [0, 0, 0]: column 2 of R is all 0, so v₂ = 0 and the set is dependent.

Other questions people ask

How do you check if vectors are linearly independent?

Put them in the columns of a matrix and row reduce it. The vectors are linearly independent exactly when every column has a pivot, that is when the rank equals the number of vectors (Interactive Linear Algebra §2.5).

What does linearly dependent mean?

At least one vector is a combination of the others: some weights, not all 0, give x₁v₁ + x₂v₂ + … = 0. For [1, 2, 3], [4, 5, 6] and [7, 8, 9], [7, 8, 9] = −[1, 2, 3] + 2 × [4, 5, 6].

Can 4 vectors in R³ be linearly independent?

No. A matrix with more columns than rows cannot have a pivot in every column, so more vectors than entries are always dependent. Three vectors in the plane are dependent for the same reason.

Is a set with the zero vector independent?

No. The zero vector is 0 times any other vector, so a set that holds it is always dependent. The page shows the relation as v_j = 0.

How do I find the relation between dependent vectors?

In the RREF, the first column without a pivot belongs to a vector that is a combination of the earlier pivot vectors, and that column holds the weights. The page writes it as v_j = a v_p + b v_q + ….

What is the difference between rank and linear independence?

The rank is how many of the vectors are independent: the number of pivots. The vectors are independent when the rank equals their number; the pivot vectors are a largest independent set among them.