Skip to content

Syllabus · CS Computer Science and Information Technology

All topics in this subject
C programming foundations7
Arrays and pointers9
Recursion6
Probability and statistics foundations9
Database systems foundations15
Linear algebra foundations6
Computer networks foundations9
Calculus foundations6
Theory of computation foundations9
Compiler design foundations9
Linked lists, stacks and queues5
Trees, BSTs and heaps4
Graph foundations3
Algorithms foundations15
Discrete mathematics foundations18
Digital logic foundations22
Computer organization foundations12
Operating systems foundations15

Matrices: operations, transpose and inverses

Lesson 141 of 1796 minFree

Objectives, prerequisites and scope

Read matrix dimensions, compute products, distinguish identity from zero, use transpose rules and interpret an inverse. Prerequisites: arithmetic, sums and simple equations. Work over the real numbers unless a field is explicitly stated. This is the matrix foundation for the GATE 2026 CS Linear Algebra headings, not a complete linear algebra course.

1. Shape is part of the object

An m×n matrix A has m rows and n columns. Entry aᵢⱼ is in row i, column j. Equality requires identical shapes and equal corresponding entries. Addition and subtraction require equal shapes and operate entry by entry. Scalar multiplication multiplies every entry by the same number. The zero matrix has all entries zero; its shape must still be specified.

The identity Iₙ is n×n with diagonal entries one and other entries zero. For m×n A, IₘA=A=AIₙ. The identities on the two sides need not have the same size. A square matrix has m=n. A diagonal matrix has zero off-diagonal entries; upper triangular means entries below the diagonal vanish, and lower triangular means those above it vanish.

Example: A=[[1,−2,3],[0,4,5]] is 2×3. Then 2A=[[2,−4,6],[0,8,10]]. It can be added to any 2×3 matrix, but not to a 3×2 matrix even though both have six entries.

2. Matrix multiplication is a row-column operation

If A is m×n and B is n×p, AB is m×p and (AB)ᵢⱼ=Σₖ₌₁ⁿ aᵢₖbₖⱼ. Inner dimensions must match; outer dimensions survive. This rule encodes composition: if x has p coordinates, Bx has n and A(Bx) has m. Ordinary matrix multiplication is not entrywise multiplication.

Worked example: A=[[1,2],[0,1]], B=[[1,0],[3,1]]. The four dot products give AB=[[7,2],[3,1]], whereas BA=[[1,2],[3,7]]. Thus AB≠BA. Matrix multiplication is associative, (AB)C=A(BC), whenever dimensions fit, and distributes over addition. Associativity permits regrouping, not reordering.

For rectangular A of size 2×3 and B of size 3×2, AB is 2×2 while BA is 3×3. Both products exist but cannot be equal because their shapes differ. For A of size 2×3 and B of size 3×4, AB exists and BA does not.

3. Transpose and symmetry

Aᵀ exchanges rows and columns: (Aᵀ)ᵢⱼ=aⱼᵢ. Hence an m×n matrix becomes n×m. We have (Aᵀ)ᵀ=A, (A+B)ᵀ=Aᵀ+Bᵀ and (cA)ᵀ=cAᵀ. Most importantly, (AB)ᵀ=BᵀAᵀ. The order reverses because an entry of AB is a row of A dotted with a column of B.

A real square matrix is symmetric if Aᵀ=A and skew-symmetric if Aᵀ=−A. A real skew-symmetric matrix has zero diagonal because aᵢᵢ=−aᵢᵢ. Symmetric matrices need not be diagonal: [[2,3],[3,5]] is symmetric. For any real rectangular A, AᵀA is square and symmetric, since (AᵀA)ᵀ=AᵀA. It need not be invertible.

Every real square A decomposes as A=(A+Aᵀ)/2+(A−Aᵀ)/2. The first summand is symmetric, the second skew-symmetric. Example: [[1,4],[2,3]] becomes [[1,3],[3,3]]+[[0,1],[−1,0]]. This decomposition is an algebraic check on transpose signs.

4. Inverses and cancellation

An inverse of square A is a matrix A⁻¹ satisfying AA⁻¹=A⁻¹A=I. It exists only for invertible (nonsingular) matrices and is unique. A scalar reciprocal applied entry by entry is not a matrix inverse. For A=[[1,2],[0,1]], A⁻¹=[[1,−2],[0,1]]; multiplication in either order verifies the identity.

If A and B are invertible square matrices, (AB)⁻¹=B⁻¹A⁻¹. The reversed order lets adjacent factors cancel. Also (Aᵀ)⁻¹=(A⁻¹)ᵀ. The sum A+B need not be invertible even if both summands are: I+(−I)=0. There is no general rule (A+B)⁻¹=A⁻¹+B⁻¹.

If AX=AY and A is invertible, left multiplication by A⁻¹ gives X=Y. Without invertibility, cancellation is invalid. For A=[[1,0],[0,0]], x=(0,1)ᵀ is nonzero but Ax=0. Likewise, a nonzero matrix can have zero square: N=[[0,1],[0,0]] has N²=0. Therefore AB=0 does not imply A=0 or B=0.

5. Powers and a solving checklist

For square A, A⁰=I and Aᵏ is repeated multiplication for positive integer k. Negative powers require invertibility. For a diagonal D=diag(d₁,…,dₙ), Dᵏ=diag(d₁ᵏ,…,dₙᵏ) for positive k. The familiar binomial expansion (A+B)²=A²+2AB+B² requires AB=BA; in general the middle terms are AB+BA.

Before calculating, write every shape. For a product, compute one row-column dot product at a time. Check transpose and inverse factor order. Use cancellation only with a justified inverse. Do not confuse symmetric, diagonal and invertible: none of those words alone implies all the others. Later lessons establish determinant and rank tests for invertibility and show how matrices represent solution sets.

Original practice: six single-correct MCQs

These are original questions, not previous-year questions. Choose exactly one option.

LM01. A is 2×3 and B is 3×4. What is the shape of AB?

A. 2×4 B. 3×3 C. 4×2 D. AB is undefined / AB अपरिभाषित है

Answer: A

A: The inner dimensions agree; the outer dimensions are 2 and 4.

B: The contracted dimension 3 does not become the output shape.

C: The outer dimensions retain their order.

D: The inner dimensions are both 3, so multiplication is defined.

LM02. A=[[1,2],[0,1]], B=[[1,0],[3,1]]. What is the (1,1) entry of AB?

A. 1 B. 3 C. 7 D. 6

Answer: C

A: This ignores the second term in the row-column dot product.

B: This is an entry of B, not the dot product.

C: The first row times first column is 1×1+2×3=7.

D: This omits 1×1.

LM03. For compatible real matrices A and B, which identity always holds?

A. (AB)ᵀ=AᵀBᵀ B. (AB)ᵀ=BᵀAᵀ C. AB=BA D. A+B=AB

Answer: B

A: Transpose reverses the factor order; this expression may even have incompatible dimensions.

B: The (i,j) entry of the transpose is the (j,i) row-column sum of AB, giving the reversed product.

C: Matrix multiplication is generally not commutative.

D: Addition and multiplication are different operations and require different shape conditions.

LM04. A is a real skew-symmetric matrix: Aᵀ=−A. What must every diagonal entry be?

A. 1 B. −1 C. Arbitrary / मनमानी D. 0

Answer: D

A: The diagonal equation is aᵢᵢ=−aᵢᵢ, which excludes 1.

B: The same equation excludes −1.

C: The diagonal is constrained even though off-diagonal entries may vary.

D: Over the reals, 2aᵢᵢ=0 implies aᵢᵢ=0.

LM05. Let A=[[0,1],[0,0]]. Which statement is true?

A. A²=I B. A²=A C. A²=0 although A≠0 / A≠0 फिर भी A²=0 D. A is invertible / A व्युत्क्रमणीय है

Answer: C

A: Direct multiplication gives the zero matrix, not the identity.

B: The (1,2) entry changes from 1 to 0.

C: All row-column products are zero: a nonzero matrix can have zero square.

D: If an inverse existed, A²=0 would force A=0 after multiplication by it.

LM06. A and B are invertible square matrices of the same size. What is (AB)⁻¹?

A. A⁻¹B⁻¹ B. B⁻¹A⁻¹ C. A⁻¹+B⁻¹ D. AB

Answer: B

A: This order does not generally cancel adjacent factors.

B: AB(B⁻¹A⁻¹)=I and (B⁻¹A⁻¹)AB=I.

C: The inverse of a product is not a sum of inverses.

D: A product is not generally its own inverse.

Source and scope

Foundation for the official Matrices heading. Determinants, rank, eigenvalues and LU are taught separately. No publication or exhaustive exam-readiness claim.

Official GATE 2026 CS syllabus (verified 2026-10-14).

Sign in to keep your progress. Sign in