4.5.6Linear Algebra (Full)

Matrices — review, operations, types

1,664 words8 min readdifficulty · medium1 backlinks

WHAT is a matrix?

WHY this object exists: A system of linear equations like 2x+3y=5xy=1\begin{aligned}2x+3y&=5\\ x-y&=1\end{aligned} has all its structure in the coefficients. Strip the variables away and you get [2311]\begin{bmatrix}2&3\\1&-1\end{bmatrix}. The matrix is the system. This compression is the entire point.


HOW operations are defined (and WHY each rule is forced)

1. Addition & scalar multiplication — entrywise

WHY same order only? A matrix is a packaged list of mnmn numbers. To add two packages you must pair up corresponding numbers; that pairing only exists when shapes match. There is no "natural" way to add a 2×32\times3 to a 3×23\times2.

2. Matrix multiplication — the non-obvious one (DERIVE it)

We do not define ABAB entrywise. Instead we force it to match composition of transformations.

Let AA act on vectors, and BB act first. We want (AB)x=A(Bx)(AB)\mathbf{x} = A(B\mathbf{x}).

Take BxB\mathbf{x}: its kk-th entry is jbkjxj\sum_j b_{kj}x_j. Now apply AA: row ii of AA dotted with the vector BxB\mathbf{x}: [A(Bx)]i=kaik(Bx)k=kaikjbkjxj=j(kaikbkj(AB)ij)xj[A(B\mathbf{x})]_i = \sum_k a_{ik}(B\mathbf{x})_k = \sum_k a_{ik}\sum_j b_{kj}x_j = \sum_j\Big(\underbrace{\sum_k a_{ik}b_{kj}}_{(AB)_{ij}}\Big)x_j

WHY inner dimensions must match (p=pp=p): the dot product needs the same number of terms in the row and the column. (m×p)(p×n)=(m×n)(m\times p)(p\times n) = (m\times n).

Figure — Matrices — review, operations, types

Key algebraic properties (and which one breaks)


Transpose


Types of square matrices


Worked examples


Common mistakes (Steel-manned)


Flashcards

What is the order of a matrix?
Number of rows × number of columns (m×nm\times n).
Define (AB)ij(AB)_{ij}.
kaikbkj\sum_{k} a_{ik}b_{kj} — row ii of AA dotted with column jj of BB.
Condition for ABAB to exist?
Columns of AA = rows of BB (inner dimensions match).
Why is matrix multiplication non-commutative?
It encodes composition of transformations; order of actions matters.
Reversal law for transpose of a product?
(AB)=BA(AB)^\top=B^\top A^\top.
Definition of symmetric matrix?
A=AA^\top=A, i.e. aij=ajia_{ij}=a_{ji}.
Definition of skew-symmetric matrix?
A=AA^\top=-A; main diagonal is all zeros.
What makes a matrix orthogonal?
AA=IA^\top A=I (preserves lengths/angles).
When is a square matrix singular?
When detA=0\det A=0 (no inverse exists).
Does AB=0AB=0 imply A=0A=0 or B=0B=0?
No — matrices have zero divisors.
How to split any square matrix into symmetric + skew parts?
A=12(A+A)+12(AA)A=\tfrac12(A+A^\top)+\tfrac12(A-A^\top).
What does the identity matrix do?
Acts as "do nothing": IA=AI=AIA=AI=A.

Recall Feynman: explain to a 12-year-old

A matrix is like a recipe table for changing arrows on graph paper. The numbers tell each arrow where to move. Adding two tables means combining recipes step-by-step (easy). But multiplying tables means "first follow recipe B, then recipe A" — and just like putting on socks then shoes, swapping the order gives a different result. That's why ABAB and BABA aren't the same. A square table that's a perfect mirror across its diagonal is symmetric; the magic "do nothing" table is the identity.

Connections

Concept Map

encoded by

strip variables

needs same order

scale every entry

forced to match

order of actions

requires

obeys

breaks

flip rows cols

Linear transformation

Matrix grid of numbers

System of linear equations

Addition entrywise

Scalar multiple

Matrix product

Composition of maps

Inner dims must match

Not commutative

Assoc and distributive

Transpose

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, ek matrix bas numbers ka ek rectangular table hai — par asli baat ye hai ki ye table ek transformation ko represent karta hai, matlab arrows ko stretch, rotate ya shear karne ka rule. Jab tum linear equations likhte ho, unke coefficients ko table mein pack kar do — bas wahi matrix hai. Isi liye matrices itni powerful hain: poora equation system ek chhote grid mein simat jaata hai.

Addition aur scalar multiply simple hai — entry-by-entry, lekin sirf jab dono ka shape (order) same ho. Multiplication thoda tricky hai aur entrywise NAHI hota. Yaad rakho: row of AA ko column of BB ke saath dot product karo, aur inner dimensions match hone chahiye — (m×p)(p×n)(m\times p)(p\times n). Iska reason ye hai ki ABAB ka matlab hai "pehle BB apply karo, phir AA" — yani composition. Isi liye ABBAAB \ne BA generally — jaise socks pehle ya shoes pehle, order matter karta hai!

Types bhi important hain exam ke liye: identity II kuch nahi badalta, symmetric matrix mirror jaisi hoti hai (A=AA^\top=A), skew-symmetric ka diagonal hamesha zero, orthogonal matrix lengths preserve karti hai (AA=IA^\top A=I), aur singular matrix wo jiska det=0\det=0 — uska inverse nahi hota. Ek pyaara trick: koi bhi square matrix ko symmetric + skew part mein tod sakte ho — 12(A+A)+12(AA)\tfrac12(A+A^\top)+\tfrac12(A-A^\top).

Sabse common galti: students sochte hain (AB)=AB(AB)^\top = A^\top B^\top — galat! Sahi hai (AB)=BA(AB)^\top=B^\top A^\top, order ulta ho jaata hai (socks-and-shoes rule). Aur AB=0AB=0 ka matlab ye nahi ki AA ya BB zero ho — matrices mein zero divisors hote hain. In do baaton ko pakka yaad rakhna.

Go deeper — visual, from zero

Test yourself — Linear Algebra (Full)

Connections