∑GATE DA Atlas

Systems of Linear Equations and Gaussian Elimination

Writing systems as Ax = b, elementary row operations, row echelon and reduced row echelon forms, Gaussian and Gauss–Jordan elimination with back substitution, pivoting and cost, the rank test for consistency (none, unique or infinitely many solutions), homogeneous systems, parametric solutions, Cramer's rule and computing inverses.

Section 29 practice questions

Matrix form

A system of mm linear equations in nn unknowns is Ax=bA\mathbf x = \mathbf b with A∈Rm×nA \in \mathbb R^{m\times n}. The augmented matrix [A∣b][A \mid \mathbf b] carries all the information.

Geometrically, each equation in R3\mathbb R^3 is a plane; the solution set is their intersection. Column view: b\mathbf b must be a combination of the columns of AA.

Elementary row operations

  1. Swap two rows.
  2. Multiply a row by a non-zero scalar.
  3. Add a multiple of one row to another.

They do not change the solution set (each is reversible), the row space, the null space or the rank. Each corresponds to left-multiplication by an invertible elementary matrix.

Echelon forms

Row echelon form (REF): all zero rows at the bottom; each row's leading entry (pivot) is to the right of the pivot above it; entries below each pivot are zero.

Reduced row echelon form (RREF): additionally, every pivot is 1 and is the only non-zero entry in its column. RREF is unique; REF is not.

REF: (21−1303210005)RREF: (10∗001∗00001)\text{REF: }\begin{pmatrix}\boxed{2} & 1 & -1 & 3\\ 0 & \boxed{3} & 2 & 1\\ 0 & 0 & 0 & \boxed{5}\end{pmatrix} \qquad \text{RREF: }\begin{pmatrix}1 & 0 & * & 0\\ 0 & 1 & * & 0\\ 0 & 0 & 0 & 1\end{pmatrix}

The number of pivots is the rank. Columns with pivots correspond to basic variables; the rest are free variables.

Gaussian elimination

  1. Forward elimination: for each column, pick a pivot, and subtract multiples of the pivot row to create zeros below it.
  2. Back substitution: solve the triangular system from the last equation upwards.

Gauss–Jordan continues to RREF, eliminating above the pivots too, so the solution can be read off directly.

Pivoting and stability

A zero (or tiny) pivot forces a row swap. Partial pivoting — choosing the entry of largest absolute value in the column as the pivot — keeps multipliers bounded by 1 and controls round-off error. In matrix terms this gives PA=LUPA = LU (see LU and SVD).

Cost: about 23n3\frac{2}{3}n^3 flops for elimination and n2n^2 for each triangular solve.

When does a solution exist? (Rouché–Capelli)

Let r=rank⁡(A)r = \operatorname{rank}(A) and r′=rank⁡([A∣b])r' = \operatorname{rank}([A\mid\mathbf b]), with nn unknowns.

ConditionSolutions
r<r′r < r'none (a row reads 0=c≠00 = c \ne 0)
r=r′=nr = r' = nexactly one
r=r′<nr = r' < ninfinitely many, with n−rn - r free parameters

For a square system, a unique solution exists for every b\mathbf b iff det⁡A≠0\det A \ne 0 iff AA is invertible.

Homogeneous systems

Ax=0A\mathbf x = \mathbf 0 is always consistent (x=0\mathbf x = \mathbf 0). Non-trivial solutions exist iff rank⁡(A)<n\operatorname{rank}(A) < n — in particular whenever there are more unknowns than equations, or when AA is square with det⁡A=0\det A = 0. The solution set is the null space, of dimension n−rank⁡(A)n - \operatorname{rank}(A).

Structure of all solutions: if xp\mathbf x_p is any particular solution of Ax=bA\mathbf x = \mathbf b, then every solution is xp+xh\mathbf x_p + \mathbf x_h with xh\mathbf x_h in the null space. The solution set is a translated subspace (an affine set), never a subspace unless b=0\mathbf b = \mathbf 0.

Cramer's rule

For a square system with det⁡A≠0\det A \ne 0: xi=det⁡Aidet⁡Ax_i = \dfrac{\det A_i}{\det A}, where AiA_i is AA with column ii replaced by b\mathbf b. Elegant for 2×22\times 2 and 3×33\times 3 problems, impractical for large ones.

Computing the inverse

Row-reduce [A∣I]→[I∣A−1][A \mid I] \to [I \mid A^{-1}]. If a zero row appears on the left, AA is singular. In numerical work you almost never form A−1A^{-1} explicitly — solving Ax=bA\mathbf x = \mathbf b by elimination or LU is cheaper and more accurate.

Over- and under-determined systems in data science

  • More equations than unknowns (m>nm > n, e.g. regression with many data points): usually inconsistent; we find the least-squares solution x^=(A⊤A)−1A⊤b\hat{\mathbf x} = (A^\top A)^{-1}A^\top\mathbf b — see projections.
  • Fewer equations than unknowns: infinitely many solutions; the minimum-norm one is A+bA^+\mathbf b via the pseudo-inverse (see SVD).

Quick revision

Practice questions

GATE-style questions: 3 one-mark and 6 two-mark. Wrong MCQs cost ⅓ of their marks in the real exam; MSQ and NAT have no negative marking. Attempt each before opening the solution.

Q1MCQ2 marks

The system

x+y+z=6,x+2y+3z=14,x+4y+λz=μx + y + z = 6,\quad x + 2y + 3z = 14,\quad x + 4y + \lambda z = \mu

has infinitely many solutions when

Q2NAT1 mark

A homogeneous system of 3 equations in 5 unknowns has a coefficient matrix of rank 3. The number of free variables (the dimension of its solution space) is ______.

Q3NAT2 marks

The solution of x+y+z=6x + y + z = 6, 2x−y+z=32x - y + z = 3, x+2y−z=2x + 2y - z = 2 has z=z = ______.

Q4MSQ2 marks

AA is an m×nm \times n matrix and b∈Rm\mathbf b \in \mathbb R^m. Which statements are true?

One or more options are correct.

Q5NAT2 marks

The homogeneous system with coefficient matrix (1232k6111)\begin{pmatrix}1&2&3\\2&k&6\\1&1&1\end{pmatrix} has a non-trivial solution for k=k = ______.

Q6MCQ1 mark

The number of arithmetic operations needed to solve a dense n×nn\times n system by Gaussian elimination grows as

Q7NAT2 marks

Using Cramer's rule on 2x+3y=82x + 3y = 8, x−y=−1x - y = -1, the value of yy is ______.

Q8MCQ1 mark

Which of the following is not preserved by elementary row operations on a matrix?

Q9NAT2 marks

The rank of (121024023612)\begin{pmatrix}1&2&1&0\\2&4&0&2\\3&6&1&2\end{pmatrix} is ______.