Q.In a legislative assembly election, a political group hired a public relations firm to promote its candidate in three ways: telephone, house calls, and letters. The cost per contact (in paise) is given in matrix A as A=4010050 (Telephone, Housecall, Letter — Cost per contact). The number of contacts of each type made in two cities X and Y is given by B=[100030005001000500010000] (rows X, Y; columns Telephone, Housecall, Letter). Find the total amount spent by the group in the two cities X and Y.
Matrix Multiplication Compatibility: The Inner-Dimensions Rule
You cannot multiply just any two matrices. Multiplication is defined only when their sizes line up in a specific way, and this compatibility check is always the very first step of any product.
The Idea: A Row Meets a Column
When you multiply A by B, you take each row of A and pair it against each column of B, multiply corresponding entries, and add. For that pairing to work, a row of A must have exactly as many entries as a column of B.
Note
Think of a handshake: each finger of one hand must meet a finger of the other. If one hand has 4 fingers and the other has 3, the handshake fails.
The Precise Statement
Let A be m×n and B be p×q.
A×B is defined if and only if n=p — the number of columns of A equals the number of rows of B. The product C=AB then has order m×q.
Writing the sizes side by side, (m×n)(p×q), the inner numbers (n,p) must match; the outer numbers (m,q) give the result's shape.
Why the Rule Exists
Each entry of the product is
cij=∑k=1naikbkj.
Here k runs over the columns of A (up to n) and the rows of B (up to p). If n=p, the sum runs out of matching terms and is meaningless — that is exactly why compatibility demands n=p.
Watch out
Even when both AB and BA are defined, they usually differ. For A of order 2×3 and B of order 3×2, AB is 2×2 but BA is 3×3 — different sizes entirely. Matrix multiplication is not commutative.
Concept: Matrix Multiplication Compatibility — the number of columns in the first matrix must equal the number of rows in the second. Here, B is 2×3 and A is 3×1, so BA is defined and gives a 2×1 result (total cost per city).
Step 1: Write B (contacts per city) and A (cost per contact in paise).
B=[100030005001000500010000],
A=4010050.
Step 2: Multiply BA:
For city X (row 1): (1000×40)+(500×100)+(5000×50)=40000+50000+250000=340000 paise. …
Why it's wrong: with A a 3×1 column and B a 2×3 counts matrix, only BA (2×1) is defined for a per-city total. Correct approach: check inner dimensions before multiplying.
Mistake 2: Forgetting the paise-to-rupee conversion.
Why it's wrong: costs are in paise, so the raw product is in paise; totals must be divided by 100 for rupees. Correct approach: convert at the end, consistently. …
The expression A2+B(A+B) simplifies to (A+B)2−AB by using the distributive property of matrix multiplication. We calculate (A+B)2 and then subtract AB to find the result 431646623.
The core idea here is to simplify the given expression A2+B(A+B) using the properties of matrix algebra, specifically the distributive property of matrix multiplication over addition. We are given A+B and AB, so we should try to express the target expression in terms of these known quantities.
First, let's expand B(A+B):
B(A+B)=BA+B2
So, the expression we need to evaluate becomes:
A2+B(A+B)=A2+BA+B2
Now, let's recall the expansion of (A+B)2 for matrices:
For matrices A and B, (A+B)2=(A+B)(A+B)=A(A+B)+B(A+B)=A2+AB+BA+B2.
Watch out
It is crucial to remember that matrix multiplication is generally not commutative, meaning AB=BA. Therefore, (A+B)2 is not equal to A2+2AB+B2 unless AB=BA.
Comparing the expression we need, A2+BA+B2, with the expansion of (A+B)2, which is A2+AB+BA+B2, we can see a direct relationship.
If we subtract AB from (A+B)2, we get:
(A+B)2−AB=(A2+AB+BA+B2)−AB
=A2+(AB−AB)+BA+B2
=A2+0+BA+B2
=A2+BA+B2
This shows that A2+B(A+B)=(A+B)2−AB. This simplification is key because we are given A+B and AB directly.