Matrix equality, addition, scalar multiplication, and matrix multiplication — definitions, worked examples, and the transpose rule (AB)ᵀ = BᵀAᵀ.
1.2 Operations with Matrices
Definition 1.5 (Equality): Matrices A and B are equal if they have equal size and if their corresponding elements are equal — i.e., A = B if both are m×n and aik = bik for all i = 1,…,m and k = 1,…,n.
Matrix Addition
Definition 1.6: Let A and B be m×n matrices. The sum A + B is a new m×n matrix whose (i,k) entry is aik + bik.
Example 1.3:
Matrix addition is commutative: A + B = B + A
Matrix addition is associative: (A + B) + C = A + (B + C)
Scalar Multiplication
Definition 1.7: The product λA is obtained by multiplying every element of A by the scalar λ.
Example 1.4:
The difference A − B = A + (−1)B. Example 1.6:
Matrix Multiplication
Definition 1.8: Let A be m×n and B be n×p. The product AB is a new m×p matrix C = AB, whose (i,k) entry is:
cik = ai1b1k + ai2b2k + … + ainbnk = Σj=1..n aijbjk
Dimension rule:
A (m × n)
×
B (n × p)
=
C (m × p)
← inner dims must match
Example 1.7: Row × Column
Example 1.8: Row × Matrix
BA does not exist here: (3×2)(1×3) — inner dims 2 ≠ 1. Generally AB ≠ BA.
Example 1.9: Associativity — (CA)B = C(AB)
Order of multiplication matters: CAB ≠ ACB or any other rearrangement.
Transpose of a Product
(AB)T = BT AT
Example 1.10: Verify (AB)T = BTAT for:
Compatibility Summary
(2×3)(3×4) → valid → result 2×4
(1×3)(3×2) → valid → result 1×2
(2×3)(4×3) → INVALID
(3×2)(1×3) → INVALID