Skip to content
GATEiit

GATE DA · Linear Algebra

Systems of linear equations and their solutions; Gaussian elimination

Linear systems Ax = b: the rank test for no, one or infinitely many solutions, Gaussian elimination and back substitution, homogeneous systems and parameter cases; GATE asks to solve, count solutions and find critical parameters.

Before you start

  • Rank and determinant →

    The rank test and det⁡A≠0 decide how many solutions exist.

  • Vector spaces and subspaces →

    Solutions of Ax=0 form the null space; Ax=b is solvable when b is in the column space.

  • Matrix multiplication

    A system is a matrix times a vector; elimination is a sequence of row operations.

This topic comes before: Determinant, rank and nullity; projections, Eigenvalues and eigenvectors, LU decomposition and singular value decomposition (SVD), Simple linear regression, multiple linear regression and ridge regression, Vector spaces and subspaces; linear dependence and independence of vectors

Concept notes

1. When does Ax = b have a solution?

A system of m equations in n unknowns is Ax=b, with A of size m×n. Form the augmented matrix [A∣b]. Let r=rank⁡A.

Condition Solutions
rank⁡A<rank⁡[A∣b] none (inconsistent)
rank⁡A=rank⁡[A∣b]=n exactly one
rank⁡A=rank⁡[A∣b]=r<n infinitely many, with n−r free parameters

This is the rank test (Rouché–Capelli theorem). In words: Ax=b is solvable exactly when b is in the column space of A.

A real linear system has 0, 1 or infinitely many solutions, never exactly 2: if x1≠x2 both work, so does x1+t(x2−x1) for every t.

For a square system (m=n): det⁡A≠0 gives a unique solution for every b. If det⁡A=0 there is either no solution or infinitely many, depending on b.

Two special shapes:

  • If rank⁡A=m (full row rank), the columns span Rm and the system is consistent for every b.
  • If rank⁡A=n (full column rank), there is at most one solution.
Unique: rank A = rank [A|b] = nNone: rank A < rank [A|b]Infinite: rank A = rank [A|b] < nlines meet onceparallel linessame line
Two equations in two unknowns: the three possible cases

2. Gaussian elimination

Gaussian elimination turns [A∣b] into row echelon form using three elementary row operations, none of which changes the solution set:

  1. swap two rows;
  2. multiply a row by a non-zero scalar;
  3. add a multiple of one row to another (Ri→Ri−lijRj).

In echelon form, each row's first non-zero entry (the pivot) lies to the right of the pivot above it, and zero rows are at the bottom. The number of pivots is the rank. Then back substitution solves from the last equation upwards.

Procedure for column j: pick a non-zero pivot (swap rows if needed), compute multipliers lij=aij/ajj for the rows below, and subtract. The multipliers are exactly the entries of L in A=LU.

Reading the result:

  • A row (0  0⋯0∣c) with c≠0 means 0=c: no solution.
  • Columns without a pivot give free variables; set them as parameters.

Gauss–Jordan continues to reduced row echelon form (pivots equal 1, zeros above and below each pivot). Applied to [A∣I] it produces [I∣A−1].

Cost: elimination on an n×n matrix needs about n33 multiplications, and back substitution about n22, so the work is O(n3). Partial pivoting (choose the largest available pivot in the column) avoids division by zero and reduces rounding error.

3. Homogeneous systems and the structure of solutions

A homogeneous system Ax=0 always has the trivial solution x=0. Its solutions form the null space N(A), a subspace of dimension n−r.

  • Non-trivial solutions exist if and only if r<n. For a square matrix this means det⁡A=0.
  • If m<n (fewer equations than unknowns), r≤m<n, so non-trivial solutions always exist.

For a consistent non-homogeneous system, every solution has the form x=xp+xh, where xp is any one particular solution and xh runs over N(A). So the solution set is a shifted copy of the null space (a line or plane that need not pass through the origin). It is a subspace only when b=0.

Parameter questions. GATE often gives a system with unknown constants such as λ and μ and asks when it has no, one or infinitely many solutions. Eliminate until the last row reads (0  0  f(λ)∣g(λ,μ)). Then:

  • f(λ)≠0: unique solution;
  • f(λ)=0, g≠0: no solution;
  • f(λ)=0, g=0: infinitely many.

For a square system, f(λ)=0 is the same as det⁡A=0, which is often the faster route to the critical value.

4. Cramer's rule and other routes

For a square system with det⁡A≠0, Cramer's rule gives xi=det⁡Aidet⁡A, where Ai is A with column i replaced by b. It is handy for one unknown of a 2×2 or 3×3 system, but costs far more than elimination for large n.

When to use what:

Situation Best tool
Solve a specific 3×3 system elimination and back substitution
Only one unknown needed, small system Cramer's rule
Decide no / one / infinite rank test, or det⁡A for square systems
Many right-hand sides with the same A factor A=LU once, then two triangular solves each
Inverse needed Gauss–Jordan on [A∣I]

Checks that save marks: substitute your answer into every original equation; count pivots before declaring the solution unique; remember that row operations change the determinant (a swap flips its sign, scaling a row scales it) but never the rank or the solution set.

When the system has no exact solution (more equations than unknowns, inconsistent), data science uses the least squares solution of ATAx^=ATb, which is linked to projection matrices.

Formulas to remember

Consistency
Ax=b solvable  ⟺  rank⁡A=rank⁡[A∣b]
Number of free parametersn = number of unknowns
n−rank⁡A
General solution
x=xp+xh,Axh=0
Elimination multiplier
lij=aijajj,Ri←Ri−lijRj
Cramer's ruleAi: column i of A replaced by b
xi=det⁡Aidet⁡A
Elimination costFor an n×n system
≈n33 multiplications

Common mistakes

  • Concluding 'infinitely many solutions' from det⁡A=0 alone; you must also check consistency, since the system may have no solution.
  • Forgetting that homogeneous systems are always consistent; the only question is whether non-trivial solutions exist.
  • Counting equations instead of independent equations; a repeated or combined equation does not reduce the solution dimension.
  • Dividing by an expression such as λ−3 during elimination without treating λ=3 as a separate case.
  • Thinking row operations preserve the determinant; swaps and scalings change it, though they never change the rank or the solutions.

Worked examples

Try each step yourself, then reveal the working.

Example 1: Solve a 3 by 3 system by elimination

numerical

Solve x+y+z=6, 2x+y+3z=13, x+3y+2z=13.

  1. Step 1: Clear the first column below the pivot.

    Try it on paper first.

Example 2: No, one or infinitely many solutions

numerical

For the system x+y+z=3, x+2y+2z=5, x+3y+λz=μ, find the values of λ and μ for which there is (a) a unique solution, (b) no solution, (c) infinitely many solutions.

  1. Step 1: Eliminate $x$ from rows 2 and 3.

    Try it on paper first.

Example 3: When does a homogeneous system have a non-trivial solution?

numerical

Find k for which x+y+z=0, x+2y+3z=0, 2x+3y+kz=0 has a non-trivial solution, and find that solution.

  1. Step 1: Square homogeneous system: what must happen to $\det A$?

    Try it on paper first.

Example 4: Fewer equations than unknowns

conceptual

A homogeneous system has 3 equations in 5 unknowns. Can it have only the trivial solution? What if the system is non-homogeneous?

  1. Step 1: Bound the rank.

    Try it on paper first.

Previous year questions

3 official GATE DA questions on this topic, newest first.

Practise these 3 PYQs →

Topic test

10 questions: up to 3 official PYQs and original practice questions, with GATE marking (MCQ wrong answers lose marks). Score 60% or more to pass. A new set is drawn each time.

Mark as mastered

Loading your progress…

My revision notes

Notes written by the GATEiit team against the official GATE DA syllabus; being checked by a reviewer. Updated 2026-11-21. Spotted a mistake? Use Report an issue on any question, or contact us.