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.
The key idea is that matrix multiplication is not generally commutative, but here A and B anti-commute (AB=−BA), so the cross terms cancel. Using x2=−1, we find (A+B)2=A2+B2.
We need to show that (A+B)2=A2+B2 for the given matrices, where x2=−1. The natural instinct is to expand (A+B)2=A2+AB+BA+B2. For this to equal A2+B2, we require AB+BA=0, i.e., AB=−BA. So the problem reduces to checking whether A and B anti-commute.
Let’s verify this step by step.
Write down the matrices clearly.
A=[0x−x0], B=[0110], and we are given x2=−1. Note that x is not a real number — it behaves like the imaginary unit i, but we treat it algebraically.
Method: Checking (A+B)2=A2+B2 — when do the cross terms vanish?
For matrices, (A+B)2 equals A2+B2 only when the cross terms cancel. The general method is to expand, isolate AB+BA, and use the problem's data (here a scalar condition like x2=−1) to show that sum is the zero matrix.
Steps
Step 1: Expand keeping order.
(A+B)2=A2+AB+BA+B2.
So (A+B)2=A2+B2 holds precisely when AB+BA=O (the matrices anti-commute).
Step 2: Compute the individual squares using the given constraint.
Evaluate A2 and B2 by multiplication, then substitute the given scalar relation (e.g. x2=−1) to simplify entries. …
Mistake 1: Assuming (A+B)2=A2+B2 automatically, as if 2AB never appears.
Why it's wrong: the true expansion is A2+AB+BA+B2; the identity only holds because here AB+BA=O. Correct approach: expand first and justify why the cross terms disappear.
Mistake 2: Forgetting to substitute x2=−1.
Why it's wrong: A2=[−x200−x2] simplifies to I only after using −x2=1; leaving it as −x2 gives an unfinished, wrong-looking answer. Correct approach: apply the given scalar relation to every affected entry. …
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.