How do you add and multiply matrices?
Answer in short
Same-order matrices are added entry by entry; kA multiplies every entry by k. AB exists only when A has as many columns as B has rows; each entry of AB is a row of A times a column of B, added up. AB need not equal BA. If AB = BA = I, B is the inverse of A.
Stuck on a question? Take a photo and Lagnever AI explains it step by step. Try it for 7 days for ₹2. Get it on Google Play
How the matrices are written here. A matrix is typed row by row: commas separate the entries of a row and semicolons separate the rows, so [1, 2; 3, 4] has rows 1, 2 and 3, 4, and [40; 10] is a column.
How do you add two matrices?
Two matrices can be added only when they have the same order. Add the entries in matching places: if A = [aij] and B = [bij] are both m × n, then A + B = [aij + bij], also m × n. For A = [1, 2; 3, 4] and B = [5, −1; 0, 2]:
A + B = [1 + 5, 2 − 1; 3 + 0, 4 + 2] = [6, 1; 3, 6]
A 2 × 2 matrix and a 2 × 3 matrix cannot be added at all.
How do you multiply a matrix by a number?
A number, called a scalar here, multiplies every entry: kA = [k aij]. So 3A = [3, 6; 9, 12]. The negative of A is −A = (−1)A = [−1, −2; −3, −4], and the difference is A − B = A + (−1)B = [−4, 3; 3, 2].
These operations follow the rules of ordinary numbers, for matrices of the same order and scalars k, l:
- A + B = B + A and (A + B) + C = A + (B + C);
- A + O = A, so the zero matrix is the additive identity, and A + (−A) = O;
- k(A + B) = kA + kB and (k + l)A = kA + lA.
So matrix equations can be solved as usual. From 2X + [1, 3; 0, −2] = [5, 1; 4, 6], subtract to get 2X = [4, −2; 4, 8], then halve: X = [2, −1; 2, 4].
How do you multiply two matrices?
The product AB is defined only when the number of columns of A equals the number of rows of B. If A is m × n and B is n × p, then AB is m × p. A quick check: write the orders side by side, (m × n)(n × p). The inner numbers must match, and the outer ones give the order of the answer.
To get the (i, k)th entry of AB, take row i of A and column k of B, multiply their entries in pairs and add. For A = [1, 2; 3, 4] (2 × 2) and B = [2, 0, 1; 1, 3, −1] (2 × 3), AB is 2 × 3:
AB = [1 × 2 + 2 × 1, 1 × 0 + 2 × 3, 1 × 1 + 2 × (−1); 3 × 2 + 4 × 1, 3 × 0 + 4 × 3, 3 × 1 + 4 × (−1)] = [4, 6, −1; 10, 12, −1]
Here BA does not exist: B has 3 columns, while A has only 2 rows.
Bills work the same way. Priya buys 3 notebooks and 2 pens, Arjun 1 notebook and 4 pens, at ₹40 a notebook and ₹10 a pen: [3, 2; 1, 4][40; 10] = [140; 80], so Priya pays ₹140 and Arjun ₹80.
Is AB the same as BA?
Not in general. For P = [1, 1; 0, 1] and Q = [1, 0; 1, 1], both products exist, but PQ = [2, 1; 1, 1] and QP = [1, 1; 1, 2]. Another surprise: [1, 1; 1, 1][1, −1; −1, 1] = O, so a product can be the zero matrix when neither factor is.
The rules that do hold, whenever both sides are defined:
- associative: (AB)C = A(BC);
- distributive: A(B + C) = AB + AC and (A + B)C = AC + BC;
- identity: IA = AI = A for every square matrix A, with I of the same order.
What is the inverse of a matrix?
A square matrix A of order m is invertible if there is a square matrix B of the same order with AB = BA = I. Such a B is called the inverse of A, written A⁻¹, and A is also the inverse of B. For A = [3, 1; 5, 2] and B = [2, −1; −5, 3], both products give I = [1, 0; 0, 1], so B = A⁻¹.
Three facts follow from the definition:
- Only square matrices can have inverses, because AB and BA must both exist and be equal.
- An inverse is unique: if B and C are both inverses of A, then B = BI = B(AC) = (BA)C = IC = C.
- If A and B are invertible and of the same order, then (AB)⁻¹ = B⁻¹A⁻¹. Think of socks and shoes: you put socks on first, so you take shoes off first.
Read next: symmetric and skew symmetric matrices, types of matrices and the NCERT solutions.
Practice
-
If A = [1, 2; 3, 4], then 2A − I equals:
Show answer
Answer: (a) [1, 4; 6, 7]
-
A is 3 × 2 and B is 2 × 3. Which statement is true?
Show answer
Answer: (b) AB is 3 × 3 and BA is 2 × 2
-
[2, 1; 1, 1] has inverse:
Show answer
Answer: (a) [1, −1; −1, 2]
-
Find [1, 2; 3, 4][5, 6; 7, 8].
Show answer
Answer: Row 1 × column 1: 1 × 5 + 2 × 7 = 19; row 1 × column 2: 1 × 6 + 2 × 8 = 22; row 2 × column 1: 3 × 5 + 4 × 7 = 43; row 2 × column 2: 3 × 6 + 4 × 8 = 50. So the product is [19, 22; 43, 50].
-
Find X if 2X + [1, 3; 0, −2] = [5, 1; 4, 6].
Show answer
Answer: 2X = [5, 1; 4, 6] − [1, 3; 0, −2] = [4, −2; 4, 8], so X = (1/2)[4, −2; 4, 8] = [2, −1; 2, 4].
Questions students ask
When can two matrices be multiplied?
AB can be found only when the number of columns of A equals the number of rows of B. If A is m × n and B is n × p, AB has order m × p. BA may still be undefined: it needs p = m.
Why is AB not equal to BA?
AB pairs the rows of A with the columns of B, while BA pairs the rows of B with the columns of A, so the sums are different. For P = [1, 1; 0, 1] and Q = [1, 0; 1, 1], PQ = [2, 1; 1, 1] but QP = [1, 1; 1, 2]. Some pairs do commute, such as two diagonal matrices of the same order.
Can the product of two non-zero matrices be the zero matrix?
Yes. [1, 1; 1, 1][1, −1; −1, 1] = [0, 0; 0, 0], although neither matrix is O. This is one way matrices differ from numbers, where ab = 0 forces a = 0 or b = 0.
Does every square matrix have an inverse?
No. A square matrix A has an inverse only if some B gives AB = BA = I. For example, [1, 2; 2, 4] has none: each column of any product [1, 2; 2, 4]B has its second entry equal to twice its first, so the product can never be I. Chapter 4 gives a test with determinants.
Stuck on a question?
Take a photo and Lagnever AI explains it step by step. Try it for 7 days for ₹2.
Get it on Google Play Open in browser
For parents: after the trial, the plan renews monthly by UPI or card autopay. You can cancel anytime in the app.