Engineering Mathematics›⌂ 0:00 studied

Module 1 · 12 min read · Free chapter

Linear algebra: matrices, equations and eigenvalues

In short

Linear algebra studies matrices and the linear equations they represent. The rank tells whether a system has a unique solution, many solutions or none. Eigenvalues are the scaling factors of special directions; their sum equals the trace and their product equals the determinant of the matrix.

What are you preparing for? We show the practice and previous year questions of your exam.

Start from zero: a table of numbers that does work

A grocer sells rice, dal and oil. One customer buys 5 kg rice, 2 kg dal and 1 litre oil; another buys 3, 1 and 2. If rice costs ₹50, dal ₹120 and oil ₹150, each bill is a sum of "quantity × price". Writing the quantities as a table and the prices as a column does both bills in one step. That table is a matrix, and the step is matrix multiplication.

Engineers meet the same pattern everywhere. A truss gives one equation per joint, a circuit gives one per loop, and a heat-flow model gives one per grid point. Each time, many unknowns are tied together by straight-line (linear) relations. Linear algebra is the toolkit that handles all of them at once, whether there are three unknowns or three million.

Rules of the game. Two matrices of the same order add element by element. The product ABAB needs the columns of A to match the rows of B: an m×nm \times n matrix times an n×pn \times p matrix gives m×pm \times p. The order matters, because in general AB≠BAAB \ne BA. Think of "put on socks, then shoes" against "shoes, then socks".

Why it matters. Every branch paper in GATE (ME, EE, EC, CE and CS) starts with this topic, and ESE Paper 1 tests it too. It usually gives one or two quick questions. Later chapters on circuits, structures, control and vibrations reuse the same rank and eigenvalue ideas.

Special matrices, determinants and the inverse

Some matrices have names because their shape makes work easier. A diagonal matrix has non-zero entries only on the main diagonal. A triangular matrix has zeros on one side of it. A symmetric matrix equals its transpose (AT=AA^T = A), as stiffness matrices of structures do. A skew-symmetric matrix has AT=−AA^T = -A, so its diagonal is all zeros. An orthogonal matrix has ATA=IA^TA = I, which describes pure rotations.

The determinant of a square matrix is one number that tells whether the matrix can be "undone". For a 2×22 \times 2 matrix with rows (a,b)(a, b) and (c,d)(c, d), that is A=[abcd]A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}, det⁡A=ad−bc\det A = ad - bc. In 2D it is the factor by which areas change; in 3D it is the factor for volumes. If det⁡A=0\det A = 0, the matrix squashes space flat and information is lost.

That is why the inverse exists only when det⁡A≠0\det A \ne 0. Then A−1=adj⁡Adet⁡AA^{-1} = \dfrac{\operatorname{adj} A}{\det A}, where adj A is the transpose of the cofactor matrix. For a 2×22 \times 2 matrix this is quick: swap a and d, change the signs of b and c, and divide by ad−bcad - bc.

Rules worth memorising.

  • det⁡(AB)=det⁡A⋅det⁡B\det(AB) = \det A \cdot \det B, and det⁡(AT)=det⁡A\det(A^T) = \det A.
  • For an n×nn \times n matrix, det⁡(kA)=kndet⁡A\det(kA) = k^n \det A, not kdet⁡Ak \det A.
  • (AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1} and (AB)T=BTAT(AB)^T = B^TA^T, so the order reverses.
  • Swapping two rows changes the sign of the determinant; adding a multiple of one row to another does not change it.

Worked example. A 3×33 \times 3 matrix has det⁡A=4\det A = 4. Then det⁡(2A)=23×4=32\det(2A) = 2^3 \times 4 = 32, and det⁡(A−1)=14\det(A^{-1}) = \dfrac{1}{4}. If B has det⁡B=−2\det B = -2, det⁡(AB)=−8\det(AB) = -8.

Rank and when a system of equations has a solution

Suppose three friends tell you facts about the prices of tea and samosa. If two of them say the same thing in different words, you have really been told only two facts. Rank counts the genuinely different facts in a matrix. Formally, it is the largest number of linearly independent rows, which always equals the number of independent columns.

To find the rank, reduce the matrix by row operations to echelon form, where each row starts with more zeros than the row above. The number of non-zero rows left is the rank. A 3×33 \times 3 matrix with det⁡A≠0\det A \ne 0 has rank 3; if det⁡A=0\det A = 0, its rank is 2 or less.

Now take the system AX=BAX = B with n unknowns, and form the augmented matrix [A∣B][A \mid B]. The rank test then decides everything.

  • If rank⁡A≠rank⁡ [A∣B]\operatorname{rank} A \ne \operatorname{rank}\,[A \mid B], the equations contradict each other, so there is no solution (inconsistent).
  • If rank⁡A=rank⁡ [A∣B]=n\operatorname{rank} A = \operatorname{rank}\,[A \mid B] = n, there is exactly one solution.
  • If rank⁡A=rank⁡ [A∣B]=r<n\operatorname{rank} A = \operatorname{rank}\,[A \mid B] = r < n, there are infinitely many solutions, with n−rn - r free variables.

The homogeneous system AX=0AX = 0 is always consistent, because X=0X = 0 works. It has non-trivial solutions only when rank⁡A<n\operatorname{rank} A < n, which for a square matrix means det⁡A=0\det A = 0. This fact returns in eigenvalues, where det⁡(A−λI)=0\det(A - \lambda I) = 0 is exactly the condition for a non-zero eigenvector.

Worked example. For x+y+z=6x + y + z = 6, x+2y+3z=14x + 2y + 3z = 14 and x+4y+kz=μx + 4y + kz = \mu, row reduction gives the third row as (0, 0, k−7∣μ−30)(0,\ 0,\ k - 7 \mid \mu - 30). If k≠7k \ne 7 there is a unique solution. If k=7k = 7 and μ=30\mu = 30 there are infinitely many. If k=7k = 7 and μ≠30\mu \ne 30 there is none.

Why it matters. In a structure, "no unique solution" signals a mechanism, a frame that can move. In a circuit, it signals a badly posed network. The rank test lets the engineer see this before solving anything.

Solving systems fast: Gaussian elimination and LU decomposition

Cramer's rule and A−1A^{-1} work for three unknowns, but they become far too slow for large systems. Computers instead use Gaussian elimination. Each step uses one equation (the pivot row) to remove one unknown from the equations below it. After n−1n - 1 rounds the system is upper-triangular, and back-substitution finds the last unknown first and works upward.

LU decomposition stores that same work so it can be reused. It writes A=LUA = LU, where L is lower-triangular and U is upper-triangular. Then AX=BAX = B is solved in two easy passes: first LY=BLY = B by forward substitution, then UX=YUX = Y by back substitution. This pays off when the same A meets many different right-hand sides, such as one structure under many load cases.

There are two common conventions. In Doolittle's method, L has 1s on its diagonal. In Crout's method, U has 1s on its diagonal. Since det⁡A=det⁡L⋅det⁡U\det A = \det L \cdot \det U, the determinant also comes almost free as the product of the diagonal entries.

Worked example. Take

A=[2145],L=[1021],U=[2103]A = \begin{bmatrix} 2 & 1 \\ 4 & 5 \end{bmatrix},\quad L = \begin{bmatrix} 1 & 0 \\ 2 & 1 \end{bmatrix},\quad U = \begin{bmatrix} 2 & 1 \\ 0 & 3 \end{bmatrix}

from Doolittle's method. Check: the second row of LU is 2×(2,1)+(0,3)=(4,5)2 \times (2, 1) + (0, 3) = (4, 5). Also det⁡A=2×3=6\det A = 2 \times 3 = 6, which matches 2×5−1×42 \times 5 - 1 \times 4.

Why it matters. Finite-element software for buildings, load-flow programs for power grids and circuit simulators all solve huge linear systems in this way. Pivoting, which swaps rows so the pivot is not tiny, keeps the rounding errors small.

Eigenvalues and eigenvectors: the directions a matrix respects

Press a rubber sheet sideways and most lines drawn on it turn. A few special lines only get longer or shorter without turning. Those directions are the eigenvectors of the stretch, and the stretch factors are the eigenvalues. In symbols, a non-zero X is an eigenvector of A when AX=λXAX = \lambda X.

Rewrite that as (A−λI)X=0(A - \lambda I)X = 0. A non-zero X exists only when the matrix A−λIA - \lambda I is singular, so det⁡(A−λI)=0\det(A - \lambda I) = 0. This is the characteristic equation, a polynomial of degree n whose roots are the eigenvalues. Put each λ\lambda back into (A−λI)X=0(A - \lambda I)X = 0 to find its eigenvector.

Worked example. For A=[4123]A = \begin{bmatrix} 4 & 1 \\ 2 & 3 \end{bmatrix},

det⁡(A−λI)=(4−λ)(3−λ)−2=λ2−7λ+10=0,\det(A - \lambda I) = (4 - \lambda)(3 - \lambda) - 2 = \lambda^2 - 7\lambda + 10 = 0,

so λ=5\lambda = 5 or 22. Check with the shortcuts: 5+2=75 + 2 = 7 is the trace (4+34 + 3), and 5×2=105 \times 2 = 10 is det A (12−212 - 2). For λ=5\lambda = 5, the equation −x+y=0-x + y = 0 gives the eigenvector (1,1)(1, 1).

Shortcuts that save time in the exam.

  • Sum of eigenvalues = trace; product of eigenvalues = det A. So a singular matrix has at least one zero eigenvalue.
  • A triangular or diagonal matrix shows its eigenvalues on its diagonal.
  • ATA^T has the same eigenvalues as A; A−1A^{-1} has 1λ\dfrac{1}{\lambda}; AkA^k has λk\lambda^k; kAkA has kλk\lambda; A+kIA + kI has λ+k\lambda + k.
  • A real symmetric matrix has real eigenvalues, and eigenvectors for different eigenvalues are orthogonal.
  • A skew-symmetric matrix has eigenvalues that are zero or purely imaginary, and an orthogonal matrix has eigenvalues with ∣λ∣=1\lvert \lambda \rvert = 1.

Why it matters. The natural frequencies of a vibrating beam or shaft are eigenvalues. Principal stresses in solid mechanics are the eigenvalues of the stress matrix, and their directions are the eigenvectors. In control systems, the eigenvalues of the state matrix decide stability, and in a Markov chain the steady state is an eigenvector with λ=1\lambda = 1.

Cayley-Hamilton, diagonalisation and vector spaces

The Cayley-Hamilton theorem says every square matrix satisfies its own characteristic equation. For the matrix in the last example, λ2−7λ+10=0\lambda^2 - 7\lambda + 10 = 0 becomes A2−7A+10I=0A^2 - 7A + 10I = 0. Multiply by A−1A^{-1} and you get A−1=7I−A10A^{-1} = \dfrac{7I - A}{10} without any cofactors. In the same way, A3A^3 or A4A^4 can be written using only A and I.

A matrix is diagonalisable when it has n linearly independent eigenvectors. Put them as the columns of P, and then P−1AP=DP^{-1}AP = D, a diagonal matrix of the eigenvalues. Powers then become easy, because Ak=PDkP−1A^k = PD^kP^{-1}. A matrix with n distinct eigenvalues is always diagonalisable, and so is every real symmetric matrix.

Vector-space words used in GATE EC and CS. Vectors are linearly independent when no one of them can be built from the others; that is, c1v1+⋯+ckvk=0c_1v_1 + \cdots + c_kv_k = 0 forces every c to be zero. A basis is an independent set that spans the whole space, and the number of vectors in it is the dimension. For an m×nm \times n matrix, rank+nullity=n\text{rank} + \text{nullity} = n, where nullity is the dimension of the solution space of AX=0AX = 0.

Why it matters. Diagonalising splits a coupled system into independent pieces. That is how a multi-storey building's vibration is broken into separate "modes", and how a coupled set of circuit or control equations is solved one mode at a time.

Descriptive lens: how ESE and state papers ask this

ESE Paper 1 and some state AE papers ask short derivations or full workings, not only the final number. Three question types come up again and again: testing a system for consistency with a parameter, finding eigenvalues and eigenvectors of a 3×33 \times 3 matrix, and using Cayley-Hamilton to find A−1A^{-1} or a power of A.

Our practice questions (not previous-year questions).

  1. For what values of kk and μ\mu does the system x+y+z=6x + y + z = 6, x+2y+3z=10x + 2y + 3z = 10, x+2y+kz=μx + 2y + kz = \mu have (a) no solution, (b) a unique solution, (c) infinitely many solutions?
  2. Find the eigenvalues and eigenvectors of the matrix with rows (2, 0, 0), (0, 3, 4), (0, 4, −3). State why the eigenvectors are orthogonal.
  3. Verify the Cayley-Hamilton theorem for the matrix A=[1221]A = \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}, and use it to find A−1A^{-1} and A3A^3.

Answer plan for question 2.

  • First, note the matrix is real symmetric, so the eigenvalues will be real and the eigenvectors orthogonal.
  • Next, expand det(A−λIA - \lambda I) along the first row to get (2−λ)(λ2−25)=0(2 - \lambda)(\lambda^2 - 25) = 0, so λ=2,5,−5\lambda = 2, 5, -5.
  • Then solve (A−λI)X=0(A - \lambda I)X = 0 for each λ\lambda and write each eigenvector in its simplest form.
  • Finally, check that the dot products of the three eigenvectors are zero, and that 2+5−5=22 + 5 - 5 = 2 equals the trace.

Quick revision

  • ABAB exists when the columns of A equal the rows of B, and in general AB≠BAAB \ne BA.
  • A−1A^{-1} exists only when det⁡A≠0\det A \ne 0, and then A−1=adj⁡Adet⁡AA^{-1} = \dfrac{\operatorname{adj} A}{\det A}.
  • det⁡(kA)=kndet⁡A\det(kA) = k^n \det A, (AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1} and (AB)T=BTAT(AB)^T = B^TA^T.
  • Rank is the number of non-zero rows in echelon form.
  • AX=BAX = B has no solution if rank⁡A≠rank⁡ [A∣B]\operatorname{rank} A \ne \operatorname{rank}\,[A \mid B], one solution if both equal nn, and infinitely many if both equal r<nr < n.
  • AX=0AX = 0 has non-trivial solutions only when det⁡A=0\det A = 0 (square AA).
  • LU: solve LY=BLY = B forward, then UX=YUX = Y backward; Doolittle puts 1s on L, Crout on U.
  • Eigenvalues solve det⁡(A−λI)=0\det(A - \lambda I) = 0; their sum is the trace and their product is det A.
  • Symmetric matrices have real eigenvalues; orthogonal matrices have ∣λ∣=1\lvert \lambda \rvert = 1.
  • Cayley-Hamilton gives A−1A^{-1} and powers of A from the characteristic equation; rank+nullity=n\text{rank} + \text{nullity} = n.

Check yourself

Exam-style questions on this chapter. Pick an answer to see the explanation. 0 of 13 answered

  1. If AA is 3×43 \times 4 and BB is 4×24 \times 2, the order of ABAB is:

  2. For a 3×33 \times 3 matrix with det⁡A=5\det A = 5, det⁡(2A)\det(2A) is:

  3. (AB)−1(AB)^{-1} equals:

  4. For AX=BAX = B with 3 unknowns, rank⁡A=2\operatorname{rank} A = 2 and rank⁡ [A∣B]=3\operatorname{rank}\,[A \mid B] = 3. The system has:

  5. For AX=BAX = B with 4 unknowns, rank⁡A=rank⁡ [A∣B]=2\operatorname{rank} A = \operatorname{rank}\,[A \mid B] = 2. The number of free variables is:

  6. A square homogeneous system AX=0AX = 0 has a non-trivial solution when:

  7. In Doolittle's LU decomposition, the 1s are placed on:

  8. The eigenvalues of [4123]\begin{bmatrix} 4 & 1 \\ 2 & 3 \end{bmatrix} are:

  9. A 3×33 \times 3 matrix has eigenvalues 1, 2 and 3. Its determinant is:

  10. If λ\lambda is an eigenvalue of AA, an eigenvalue of A−1+2IA^{-1} + 2I is:

  11. The eigenvalues of a real symmetric matrix are always:

  12. For AA with characteristic equation λ2−7λ+10=0\lambda^2 - 7\lambda + 10 = 0, Cayley-Hamilton gives A−1A^{-1} as:

  13. A 5×75 \times 7 matrix has rank 4. Its nullity is:

Previous year questions

Previous year questions for UPSC CSE will appear here once each one is checked word for word against the official question paper.

Learn with AI

A tutor that asks instead of telling, a partner that argues the other side, and this chapter told through your own district.

Tell the tutor what you are stuck on. It will guide you with questions and give the answer after a few tries.

🙋 Raise a doubt or feedback

Stuck somewhere, or spotted a mistake? Write to the ExamHike team. We usually reply within a day, and you will see the reply on My progress.

Log in to ask a doubt or send feedback →

Frequently asked questions

When does Ax = b have a unique solution?

When rank of A equals rank of the augmented matrix and equals the number of unknowns.

What is the sum of eigenvalues of a matrix?

It equals the trace, the sum of the diagonal elements.

What does the Cayley-Hamilton theorem say?

Every square matrix satisfies its own characteristic equation.

Are eigenvalues of a symmetric matrix real?

Yes, a real symmetric matrix always has real eigenvalues.

More in this module: Algebra and calculus for engineers

Official sources

Facts in this chapter were checked against these official sources.

  1. GATE 2026 syllabus ME, Section 1 Engineering Mathematics
  2. GATE 2026 syllabus EC, Section 1 Engineering Mathematics
  3. GATE 2026 syllabus CS, Section 1 Engineering Mathematics
  4. NPTEL Engineering Mathematics - I (IIT Kharagpur, 111105121)