JEE Mains Maths · Matrices

Matrix Algebra, Types & Operations

The core operations on matrices — order and equality, adding and scalar-multiplying, multiplying by the row-by-column rule, transposing, and counting matrices — all governed by conformability and the fact that AB is generally not BA.

Why this matters

Twelve PYQs, every one MODERATE — this is the operations layer the whole Matrices chapter is built on, and JEE Mains tests it every year. Questions solve for entries by equating matrices, extract a column by hitting a matrix with a basis vector, use the [1,1,1]·B·[1,1,1] sum-of-entries trick, force a matrix to be scalar from a transpose relation, count singular matrices from a value set, and lean on the fact that AB = O with A, B nonzero forces both to be singular. Master the six concepts below and these become fast, reliable marks.

Concept 1 of 6

Order, equality, linear combinations, and trace

Intuition

A matrix's order is (rows × columns), read rows-first, and it decides which matrices can be added or multiplied. Two matrices are equal only when they have the same order AND every corresponding entry matches — so a matrix equation is really a bundle of ordinary scalar equations. When you are given two linear combinations like A+2BA+2B and 2AB2A-B, treat them as simultaneous equations in the 'unknowns' AA and BB and eliminate one.

Definition

A matrix of order m×nm\times n has mm rows and nn columns.

  • Equality: A=BA=B iff same order and aij=bija_{ij}=b_{ij} for all i,ji,j.
  • Addition / scalar: both are entrywise, so addition needs matching order and kAkA scales every entry by kk.
  • Linear systems: from pA+qBpA+qB and rA+sBrA+sB solve for AA and BB exactly as you would for two numbers — combine to cancel one matrix.
  • Trace: tr(A)=a11+a22++ann\operatorname{tr}(A)=a_{11}+a_{22}+\cdots+a_{nn} is the sum of the main-diagonal entries (square matrices only).

Trace (sum of the diagonal)

tr(A)=i=1naii\operatorname{tr}(A)=\sum_{i=1}^{n} a_{ii}

Worked example

If A+B=(5328)A+B=\begin{pmatrix}5&3\\2&8\end{pmatrix} and AB=(1102)A-B=\begin{pmatrix}1&1\\0&2\end{pmatrix}, find tr(A)+tr(B)\operatorname{tr}(A)+\operatorname{tr}(B).
Practice this conceptself-check · 4 quick reps

From the bank · past-year question

Example 1MatricesMODERATE
Let A+2B=[120633531]A + 2B =\begin{bmatrix} 1 & 2 & 0 \\ 6 & - 3 & 3 \\ - 5 & 3 & 1 \end{bmatrix} and 2AB=[215216012]2A - B =\begin{bmatrix} 2 & - 1 & 5 \\ 2 & - 1 & 6 \\ 0 & 1 & 2 \end{bmatrix}. If Tr(A)Tr(A) denotes the sum of all diagonal elements of the matrix A, then Tr(A)Tr(B)Tr(A) - Tr(B) has value equal to

[Q78 · Paper 9 · 2021]

Trace is the DIAGONAL sum, not the sum of all entries

tr(A)\operatorname{tr}(A) adds only a11,a22,,anna_{11},a_{22},\dots,a_{nn} — the main diagonal. Students who total every entry of the matrix get the wrong number. Only the diagonal counts, and only square matrices have a trace at all.

Concept 2 of 6

Matrix multiplication: conformability and the row-by-column rule

Intuition

To form ABAB, the inner dimensions must match: an m×nm\times n times an n×pn\times p gives an m×pm\times p. Each entry of the product is a **row of AA dotted with a column of BB**. Two hitting tricks fall straight out of this rule: multiplying a matrix by a standard basis column eje_j picks out its jj-th column, and [1 1 ]M[1 1 ]T[1\ 1\ \cdots]\,M\,[1\ 1\ \cdots]^{T} adds up all the entries of MM.

Definition

The product Am×nBn×p=(AB)m×pA_{m\times n}B_{n\times p}=(AB)_{m\times p} exists only when AA's column count equals BB's row count, with entry (AB)ij=kaikbkj(AB)_{ij}=\sum_k a_{ik}b_{kj}.

  • Column extraction: AejA\,e_j is the jj-th column of AA (where eje_j is the column with 1 in position jj, 0 elsewhere).
  • Sum of all entries: [1  1]B[1  1]T[1\ \cdots\ 1]\,B\,[1\ \cdots\ 1]^{T} equals the total of every entry of BB.
  • Not commutative: ABBAAB\neq BA in general, and one of them may not even be defined.

Row-by-column entry rule

(AB)ij=kaikbkj(AB)_{ij}=\sum_{k} a_{ik}\,b_{kj}

Worked example

Compute ABAB where A=(2103)A=\begin{pmatrix}2&1\\0&3\end{pmatrix} and B=(1421)B=\begin{pmatrix}1&4\\2&1\end{pmatrix}.
Practice this conceptself-check · 4 quick reps

From the bank · past-year question

Example 2MatricesMODERATE
Let A=[111]A =\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix} and B=[92102112122132142152162172]B =\begin{bmatrix} 9^{2} & -10^{2} & 11^{2} \\ 12^{2} & 13^{2} & -14^{2} \\ -15^{2} & 16^{2} & 17^{2} \end{bmatrix}, then the value of ABAA^{'}BA is:

[Q153 · 26 July 2022 · 2022]

Matrix multiplication is NOT commutative — ABBAAB\neq BA

Order matters: ABAB and BABA are generally different matrices, and one may be undefined while the other exists. Never swap factors inside a product. If a question defines ABAB, compute ABAB — reaching for BABA is the classic slip.

Concept 3 of 6

Transpose and the reversal law

Intuition

The transpose ATA^{T} (also written AA') flips rows into columns. Its rules distribute cleanly over sums and scalars, but the product reverses order: (AB)T=BTAT(AB)^{T}=B^{T}A^{T}. A powerful exam move is to transpose both sides of a matrix equation — a relation like AT=αA+IA^{T}=\alpha A+I can then be forced to make AA a scalar multiple of the identity.

Definition

(AT)ij=aji(A^{T})_{ij}=a_{ji}, so an m×nm\times n matrix transposes to n×mn\times m. Rules:

  • Self-inverse: (AT)T=A(A^{T})^{T}=A
  • Sum / scalar: (A+B)T=AT+BT(A+B)^{T}=A^{T}+B^{T}, (kA)T=kAT(kA)^{T}=kA^{T}
  • Reversal: (AB)T=BTAT(AB)^{T}=B^{T}A^{T}
  • Symmetric / skew: AT=AA^{T}=A (symmetric) or AT=AA^{T}=-A (skew — its diagonal is all zeros).

To exploit a transpose relation, transpose the whole equation and substitute back.

Transpose rules

(AB)T=BTAT(AT)T=A(AB)^{T}=B^{T}A^{T}\qquad (A^{T})^{T}=A

Worked example

For A=(1201)A=\begin{pmatrix}1&2\\0&1\end{pmatrix} and B=(1031)B=\begin{pmatrix}1&0\\3&1\end{pmatrix}, verify (AB)T=BTAT(AB)^{T}=B^{T}A^{T}.
Practice this conceptself-check · 4 quick reps

From the bank · past-year question

Example 3MatricesMODERATE
Let AA be a 2×22 \times 2 matrix with real entries such that A=αA+IA^{'}= \alpha A + I, where αR{1,1}\mathbf{\alpha \in R - \{ - 1,1\}}. If det\det (A2A)=4\left( A^{2}- A \right)= 4, then the sum of all possible values of α\alpha is equal to

[Q76 · 11 April 2023 · 2023]

(AB)T=BTAT(AB)^{T}=B^{T}A^{T} — the order REVERSES

The transpose of a product flips the factors: (AB)T=BTAT(AB)^{T}=B^{T}A^{T}, never ATBTA^{T}B^{T}. Sum and scalar transposes keep their order, so only the PRODUCT reverses. Writing ATBTA^{T}B^{T} is the trap answer.

Concept 4 of 6

Non-commutativity, zero divisors, and commuting matrices

Intuition

Matrices look like numbers but break number-algebra because ABBAAB\neq BA. Two big consequences: (A+B)2(A+B)^{2} does not simplify to A2+2AB+B2A^{2}+2AB+B^{2}, and AB=OAB=O does not force AA or BB to be zero — matrices have zero divisors. If two nonzero matrices multiply to OO, both must be singular. Commuting matrices (AB=BAAB=BA) are the special case where the number-rules come back.

Definition

Because multiplication does not commute:

  • (A+B)2=A2+AB+BA+B2(A+B)^{2}=A^{2}+AB+BA+B^{2} — the middle collapses to 2AB2AB only when AB=BAAB=BA.
  • (A+B)(AB)=A2AB+BAB2(A+B)(A-B)=A^{2}-AB+BA-B^{2}, which equals A2B2A^{2}-B^{2} only when A,BA,B commute.
  • Zero divisors: AB=OAB=O is possible with AOA\neq O and BOB\neq O. If both are nonzero n×nn\times n and AB=OAB=O, then detA=0\det A=0 and detB=0\det B=0 (both singular), so AX=0AX=0 has non-trivial (infinitely many) solutions.
  • Commuting count: requiring AB=BAAB=BA for a fixed AA imposes linear constraints on BB's entries; the free entries then range over the allowed value set.

Non-commutative square expansion

(A+B)2=A2+AB+BA+B2(A+B)^{2}=A^{2}+AB+BA+B^{2}

Worked example

Find two nonzero 2×22\times2 matrices A,BA,B whose product ABAB is the zero matrix.
Practice this conceptself-check · 4 quick reps

From the bank · past-year question

Example 4MatricesMODERATE
Let AA and BB be two 3×33 \times 3 non-zero real matrices such that ABAB is a zero matrix. Then

[Q63 · 29 July 2022 · 2022]

AB=OAB=O does NOT force A=OA=O or B=OB=O

Unlike numbers, matrices have zero divisors: two nonzero matrices can multiply to OO (e.g. (1000)(0001)=O\begin{pmatrix}1&0\\0&0\end{pmatrix}\begin{pmatrix}0&0\\0&1\end{pmatrix}=O). You may not 'cancel' a matrix. When A,BA,B are nonzero with AB=OAB=O, the correct conclusion is that both are singular (det=0\det=0).

Don't import a2b2=(a+b)(ab)a^{2}-b^{2}=(a+b)(a-b) into matrices

Every number identity that secretly uses commutativity can fail for matrices: (A+B)(AB)(A+B)(A-B), (A+B)2(A+B)^{2}, and (AB)2=A2B2(AB)^{2}=A^{2}B^{2} all break unless AB=BAAB=BA. An option that quietly assumes one of these is almost always the trap.

Concept 5 of 6

Elementary row operations

Intuition

There are exactly three elementary row operations: swap two rows, scale a row by a nonzero constant, and add a multiple of one row to another. To decide whether a target matrix is reachable in a single operation, compare it row-by-row to the original and check whether the difference is exactly one of these three moves.

Definition

The three elementary row operations on a matrix are:

  • Interchange: RiRjR_i\leftrightarrow R_j (changes two rows).
  • Scaling: RikRiR_i\to kR_i with k0k\neq0 (changes one row).
  • Row addition: RiRi+kRjR_i\to R_i+kR_j (changes one row, using a multiple of another).

A matrix is obtainable in one operation iff at most the changed row(s) differ from the original by exactly one of these patterns. To test a 'row-addition' candidate, solve for the multiplier kk on one entry and check it is consistent on the rest of the row.

The three operations

RiRjRikRi (k0)RiRi+kRjR_i\leftrightarrow R_j\qquad R_i\to kR_i\ (k\neq0)\qquad R_i\to R_i+kR_j

Worked example

Starting from (2143)\begin{pmatrix}2&1\\4&3\end{pmatrix}, which single row operation produces (2101)\begin{pmatrix}2&1\\0&1\end{pmatrix}?
Practice this conceptself-check · 4 quick reps

From the bank · past-year question

Example 5MatricesMODERATE
Which of the following matrices can NOT be obtained from the matrix [1211]\begin{bmatrix} - 1 & 2 \\ 1 & - 1 \end{bmatrix} by a single elementary row operation?

[Q152 · 29 July 2022 · 2022]

Concept 6 of 6

Counting matrices

Intuition

If each of the mnmn entries can independently take one of kk values, there are kmnk^{mn} matrices — a plain product rule. Two flavoured counts recur in JEE: counting singular 2×22\times2 matrices uses the condition ad=bcad=bc (group by the common product value), and counting via tr(ATA)=i,jaij2\operatorname{tr}(A^{T}A)=\sum_{i,j}a_{ij}^{2} turns a trace condition into 'how many entries are nonzero'.

Definition

  • Free-choice count: an m×nm\times n matrix with each entry from a kk-element set gives kmnk^{mn} matrices.
  • **Singular 2×22\times2:** det=adbc=0    ad=bc\det=ad-bc=0\iff ad=bc. Count ordered pairs by product: if npn_p pairs from the set have product pp, the number of singular matrices is pnp2\sum_p n_p^{2}.
  • Trace bridge: tr(ATA)=i,jaij2\operatorname{tr}(A^{T}A)=\sum_{i,j}a_{ij}^{2}. Over entries in {1,0,1}\{-1,0,1\} each square is 00 or 11, so the trace simply counts the nonzero entries — choose their positions, then their signs.

Counting bridges

#=kmntr(ATA)=i,jaij2\#=k^{mn}\qquad \operatorname{tr}(A^{T}A)=\sum_{i,j}a_{ij}^{2}

Worked example

How many singular 2×22\times2 matrices have every entry from {1,2,4}\{1,2,4\}? (Singular means ad=bcad=bc.)
Practice this conceptself-check · 4 quick reps

From the bank · past-year question

Example 6MatricesMODERATE
The number of singular matrices of order 2 , whose elements are from the set {2,3,6,9}\{ 2,3,6,9\} is.

[Q74 · 7 Apr 2025 · 2025]

Summary — formulas & gotchas at a glance

A revision cheat-sheet for the formulas and gotchas above. Click any concept name to jump back to its full explanation.

Formulas (6)

Watch out for (5)

Drill every past-year question on this subtopic

12 questions from the bank — paginated, with cart and Word-export support.