Module 1 · 12 min read · Free chapter
Linear algebra: matrices, equations and eigenvalues
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.
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 needs the columns of A to match the rows of B: an matrix times an matrix gives . The order matters, because in general . 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 (), as stiffness matrices of structures do. A skew-symmetric matrix has , so its diagonal is all zeros. An orthogonal matrix has , which describes pure rotations.
The determinant of a square matrix is one number that tells whether the matrix can be "undone". For a matrix with rows and , that is , . In 2D it is the factor by which areas change; in 3D it is the factor for volumes. If , the matrix squashes space flat and information is lost.
That is why the inverse exists only when . Then , where adj A is the transpose of the cofactor matrix. For a matrix this is quick: swap a and d, change the signs of b and c, and divide by .
Rules worth memorising.
- , and .
- For an matrix, , not .
- and , 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 matrix has . Then , and . If B has , .
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 matrix with has rank 3; if , its rank is 2 or less.
Now take the system with n unknowns, and form the augmented matrix . The rank test then decides everything.
- If , the equations contradict each other, so there is no solution (inconsistent).
- If , there is exactly one solution.
- If , there are infinitely many solutions, with free variables.
The homogeneous system is always consistent, because works. It has non-trivial solutions only when , which for a square matrix means . This fact returns in eigenvalues, where is exactly the condition for a non-zero eigenvector.
Worked example. For , and , row reduction gives the third row as . If there is a unique solution. If and there are infinitely many. If and 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 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 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 , where L is lower-triangular and U is upper-triangular. Then is solved in two easy passes: first by forward substitution, then 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 , the determinant also comes almost free as the product of the diagonal entries.
Worked example. Take
from Doolittle's method. Check: the second row of LU is . Also , which matches .
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 .
Rewrite that as . A non-zero X exists only when the matrix is singular, so . This is the characteristic equation, a polynomial of degree n whose roots are the eigenvalues. Put each back into to find its eigenvector.
Worked example. For ,
so or . Check with the shortcuts: is the trace (), and is det A (). For , the equation gives the eigenvector .
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.
- has the same eigenvalues as A; has ; has ; has ; has .
- 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 .
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 .
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, becomes . Multiply by and you get without any cofactors. In the same way, or 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 , a diagonal matrix of the eigenvalues. Powers then become easy, because . 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, 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 matrix, , where nullity is the dimension of the solution space of .
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 matrix, and using Cayley-Hamilton to find or a power of A.
Our practice questions (not previous-year questions).
- For what values of and does the system , , have (a) no solution, (b) a unique solution, (c) infinitely many solutions?
- 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.
- Verify the Cayley-Hamilton theorem for the matrix , and use it to find and .
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() along the first row to get , so .
- Then solve for each and write each eigenvector in its simplest form.
- Finally, check that the dot products of the three eigenvectors are zero, and that equals the trace.
Quick revision
- exists when the columns of A equal the rows of B, and in general .
- exists only when , and then .
- , and .
- Rank is the number of non-zero rows in echelon form.
- has no solution if , one solution if both equal , and infinitely many if both equal .
- has non-trivial solutions only when (square ).
- LU: solve forward, then backward; Doolittle puts 1s on L, Crout on U.
- Eigenvalues solve ; their sum is the trace and their product is det A.
- Symmetric matrices have real eigenvalues; orthogonal matrices have .
- Cayley-Hamilton gives and powers of A from the characteristic equation; .