WEEK 2
Matrix Algebra: Determinants, Inverses & Applications
+ Graph Theory, Social Networks & Null Space
✎ Contents
1. Matrix Inversion — determinants, cofactors, the adjugate formula
2. Lecture 7 — Solving Ax = b, and MIMO wireless systems
3. Lecture 8 — Circuit analysis (KVL) and traffic-flow networks
4. Lecture 9 — Graph theory: adjacency matrices, walks, tournaments
5. Lecture 10 — Finding influential nodes; applications recap
6. Null Space — definition, subspace proof, Rank–Nullity theorem
7. Q&A — every activity question, NPTEL exam style
1
Matrix Inversion
Mat. Inverse
→ Determinants
The determinant, written |A|, is defined only for a square (n×n) matrix — it has no meaning for a
non-square matrix.
2×2 case
a b
A= c d
|A| = ad − bc
General n×n case — cofactor expansion
For a bigger square matrix, expand along any row (row 1 shown here). Each term is an entry times its
cofactor:
|A| = a11C11 + a12C12 + ··· + a1nC1n
The cofactor of entry aij is Cij = (−1)^(i+j)·Mij, where Mij (the minor) is the determinant of the smaller
matrix left after deleting row i and column j from A. The (−1)^(i+j) just alternates the sign in a
checkerboard pattern.
Worked example — 3×3 determinant
1 2 3
A= 0 1 4
5 6 0
Expanding along row 1:
|A| = 1(1·0−4·6) − 2(0·0−4·5) + 3(0·6−1·5)
= 1(−24) − 2(−20) + 3(−5) = −24+40−15 = 1
✎ Check
|A| = 1 ≠ 0, so A is invertible. (Expanding along a different row or column always gives the same value — a
good way to double-check your arithmetic.)
→ The matrix inverse
For a square matrix A, the inverse A⁻¹ (if it exists) is the unique matrix satisfying:
2
A⁻¹A = AA⁻¹ = I
If A⁻¹ exists, A is called invertible (non-singular).
Mat. Inverse
If A⁻¹ does not exist, A is called singular.
A square matrix is invertible ⇔ |A| ≠ 0, and singular ⇔ |A| = 0.
Formula: inverse via the adjugate
A⁻¹ = adj(A) / |A|
adj(A), the adjugate, is the transpose of the cofactor matrix: adj(A) = C^T, where C is the matrix whose (i,j)
entry is the cofactor Cij.
Continuing the worked example
Working out every cofactor of A gives the cofactor matrix C; transposing it gives adj(A):
-24 20 -5
C= 18 -15 4
5 -4 1
-24 18 5
adj(A) = 20 -15 -4
-5 4 1
Since |A| = 1 here, A⁻¹ = adj(A) exactly:
-24 18 5
A⁻¹ = 20 -15 -4
-5 4 1
✎ Verify
Multiplying A by this A⁻¹ gives the identity matrix I — always worth checking, since it catches arithmetic
slips
instantly.
3
Lecture 7 — Applications of the Matrix Inverse
→ 1. Solving systems of linear equations
Lec 7 Apps
A system of n equations in n unknowns, e.g. a11x1+a12x2+···+a1nxn = b1, and so on down to row n, is "linear"
because every unknown appears only to the power 1 (no x², no xy). Written compactly as a single matrix
equation:
Ax=b
If A is invertible, multiplying both sides on the left by A⁻¹ solves directly for x:
x = A⁻¹ b
Worked example
Reusing A from the previous section, solve Ax = b for b = (6, 5, 11):
1 2 3 x1 6
0 1 4 x2 5
A x = b
5 6 0 x3 11
Using x = A⁻¹b with the inverse found earlier:
1 -24 18 5 6
1 20 -15 -4 5
x = A⁻¹ b
1 -5 4 1 11
✎ Check
x1=x2=x3=1. Quick check back in the original equations: 1(1)+2(1)+3(1)=6 ✓, 0+1(1)+4(1)=5 ✓,
5(1)+6(1)+0=11 ✓
→ 2. Practical application — MIMO wireless (4G/5G/WiFi)
MIMO = Multiple Input, Multiple Output. Using several antennas at both transmitter and receiver is what
lets 4G/5G/WiFi reach very high data rates.
4
Tx1 Rx1
Lec 7 Apps
Tx2 Rx2
Channel H
Every Tx antenna reaches every Rx antenna — one channel coefficient hij per pair
Collecting every channel coefficient hij (between Tx antenna j and Rx antenna i) into a matrix gives the
channel matrix H, and the system model is:
y=Hx+n
y = received signal vector, x = transmitted signal vector
H = channel matrix, size nr×nt (receivers × transmitters)
n = noise vector
The maximum number of independent data streams that can be sent at once is:
max streams = min(nt, nr)
Sending several independent streams together like this is called spatial multiplexing — the technique behind
very high MIMO data rates. At the receiver, if H is square and invertible, a "zero-forcing" receiver recovers
the transmitted signal by simply inverting the channel (ignoring the noise term for the estimate):
x_hat = H⁻¹ y
5
Lecture 8 — Circuits & Traffic Flow
Lec 8 Apps
→ 1. Circuit analysis — mesh analysis
Ohm’s law: V = IR. Kirchhoff’s Voltage Law (KVL): the sum of voltage drops around any closed loop is zero.
Writing one KVL equation per loop, in terms of the unknown mesh currents, gives a linear system — solvable
with exactly the same Ax=b method as Lecture 7.
3Ω 2Ω
I1 2Ω I2
11V 2V
Loop 1 (current I1) carries its own 3Ω resistor plus the shared 2Ω, driven by an 11V source. Loop 2 (current
I2) carries its own 2Ω plus the same shared 2Ω, driven by a 2V source. Applying KVL to each loop:
5I1 − 2I2 = 11 −2I1 + 4I2 = 2
In matrix form R·I = V, solved just like any Ax=b system:
5 -2 I1 11
R -2 4 I I2 = V 2
I = R⁻¹V ⇒ I1 = 3A, I2 = 2A
→ 2. Traffic flow networks
The same idea models one-way street networks: at every intersection, traffic in must equal traffic out. This
is exactly Kirchhoff’s Current Law, but for cars instead of charge.
6
500 300
x1
A B
Lec 8 Apps
x4 x2
D C
x3
400 200
Four intersections A→B→C→D→A, with internal flows x1..x4 and the external counts shown above.
Conservation
of flow at each node gives:
At A: x1 − x4 = 500
At B: x1 − x2 = 300
At C: x3 − x2 = 200
At D: x3 − x4 = 400
Only 3 of these 4 equations are independent (total flow into the network always equals total flow out), so
one variable is free. Taking x4 = t as the free variable:
x1=500+t, x2=200+t, x3=400+t, x4=t (t ≥ 0)
✎ Note
Traffic (and circuit) problems are often under-determined like this — infinitely many valid flow patterns,
differing only by how much flow "circulates" freely around the loop.
7
Lecture 9 — Graph Theory & Social Networks
Graph Theory
→ Directed graphs as social networks
A graph can represent a social network: each node Pi is a person, and a directed edge Pi→Pj means Pi
influences, or is followed by, Pj (e.g. on a platform like Twitter, P5→P2 would mean P2 follows P5).
Adjacency matrix
For a graph with n nodes, the adjacency matrix M is n×n:
Mij = 1 if there is a directed edge Pi→Pj, else 0
Example
P1
P2 P4
P3
Edges: P1→P2, P1→P3, P2→P3, P3→P1, P4→P1, P4→P2
0 1 1 0
0 0 1 0
M= 1 0 0 0
1 1 0 0
rows/columns in order P1, P2, P3, P4
→ Powers of M count walks
[M^r]ij = the number of walks of length exactly r (r steps) from Pi to Pj. Squaring M gives every 2-step
connection:
1 0 1 0
1 0 0 0
M² = 0 1 1 0
0 1 2 0
8
✎ Reading an entry
[M²] row P4, column P3 = 2: there are 2 walks of length 2 from P4 to P3, namely P4→P1→P3 and
Graph Theory
P4→P2→P3.
→ Dominance graphs (tournaments)
If, for every pair Pi, Pj, there is an edge in exactly one direction (never both, never neither), the graph is a
dominance graph — also called a tournament, or round-robin tournament (everyone played everyone once;
Pi→Pj means "Pi beat Pj").
P1
P2 P4
P3
A 4-player round robin: P1 beat everyone; P4 beat no one
9
Lecture 10 — Finding Influential Nodes
→ Who is most influential?
Influence
Direct connections (M) capture 1-step influence; M² adds every 2-step (indirect) influence. Adding them,
M+M², gives a total "reach" score — the row with the largest sum belongs to the most influential node.
Continuing the network from Lecture 9:
1 1 2 0
1 0 1 0
M+M² = 1 1 1 0
1 2 2 0
Row sums: P1 → 4, P2 → 2, P3 → 3, P4 → 5.
✎ Result
P4 has the largest row sum (5), so it is the most influential node — even though nobody follows P4 back! Row
sums measure outward reach/influence, not popularity (that would be the column sums instead).
→ Why this matters — recap
Applying graph theory to networks is, underneath, all linear algebra:
Linear algebra represents a graph as matrices, making it possible to analyse very large networks
computationally.
The adjacency matrix encodes every connection between nodes.
Matrix powers find shortest paths and test connectivity between nodes.
Row/column sums (and variants) identify the most influential nodes.
This is exactly how platforms like Facebook, Instagram and Twitter study relationships and
information flow at scale.
10
Null Space
→ Definition
Null Space
For an m×n matrix A, the null space (or kernel) of A is the set of every vector x solving Ax=0:
N(A) = { x : Ax = 0 }
N(A) is always a subspace
Take any x1, x2 ∈ N(A), so Ax1=0 and Ax2=0. For any scalars α, β:
A(αx1+βx2) = αAx1+βAx2 = α·0+β·0 = 0
So αx1+βx2 ∈ N(A) too — the null space is closed under linear combinations, which makes it a subspace.
(It
always contains at least the zero vector, since A·0=0.)
→ Trivial vs. non-trivial null space
Trivial: N(A) = {0} — contains only the zero vector.
Non-trivial: N(A) contains at least one non-zero vector.
Invertible ⇒ trivial null space
Claim: if A is invertible, N(A)={0}. Proof by contradiction — suppose Ax=0 for some x≠0:
A⁻¹(Ax) = A⁻¹0 ⇒ x = 0
That contradicts x≠0, so no non-zero solution can exist: the only solution to Ax=0 is x=0, i.e. N(A)={0}.
(The converse holds too — a singular matrix always has a non-trivial null space.)
→ Worked example — finding a basis for N(A)
1 1 1 1 1
A= 1 2 3 4 5
Row reduce (R2→R2−R1, then R1→R1−R2) to reach reduced row-echelon form:
1 0 -1 -2 -3
0 1 2 3 4
Reading off equations and solving the pivot variables x1, x2 in terms of the free variables x3, x4, x5:
x1 = x3+2x4+3x5, x2 = −2x3−3x4−4x5
Let x3=s, x4=t, x5=u. Every solution is a combination of 3 basis vectors:
11
1 2 3
-2 -3 -4
Null Space
v1 1 v2 0 v3 0
0 1 0
0 0 1
So N(A) = { s·v1 + t·v2 + u·v3 : s,t,u ∈ ℝ }, and {v1,v2,v3} is a basis for N(A).
Rank–Nullity Theorem
nullity(A) = dimension of N(A) = number of basis vectors = 3
rank(A) = number of pivots in row-echelon form = 2
rank(A) + nullity(A) = 2+3 = 5 = n (number of columns of A)
12
Activity — Q&A
All activity questions from this week’s notes, NPTEL exam style.
From: Matrix Inversion
Q&A
Q1 Can we calculate the determinant of a non-square matrix?
No. The determinant is defined only for square (n×n) matrices.
Cofactor expansion works by repeatedly deleting one row and one column to form smaller square minors
— that recursive structure only makes sense if the matrix is square to begin with.
Q2 Can we compute the inverse of a non-square matrix?
Not in the ordinary sense — the standard inverse (satisfying AA⁻¹=A⁻¹A=I) exists only for square
matrices.
For non-square (or singular) matrices, a generalised pseudo-inverse can still be computed — e.g. the
Moore–Penrose pseudo-inverse A⁺=(A^TA)⁻¹A^T for a full column-rank matrix.
Q3 What is the left / right inverse of a matrix?
A left inverse L satisfies LA=I; a right inverse R satisfies AR=I.
A tall, full column-rank matrix may have a left inverse.
A wide, full row-rank matrix may have a right inverse.
Only a square, invertible matrix has both — and then they coincide: L=R=A⁻¹.
From: Graph Theory
Q4 What do you mean by an "influential node"?
A node that has a strong impact on the rest of the network, typically because it connects to many
important nodes or lies on many communication paths.
Example: a celebrity with millions of followers on a platform like Instagram or Twitter is a classic
influential node.
Q5 How do we construct an adjacency matrix from a graph?
Rows and columns both represent the graph’s vertices.
If there is a directed edge from vertex i to vertex j, write 1 in position (i,j); otherwise write 0.
From: Null Space
Q6 How do we define the null space of a matrix?
N(A) = {x : Ax=0} — the set of every vector x satisfying Ax=0. Also called the kernel of A.
Q7 What do you mean by a trivial null space?
Trivial: N(A) contains only the zero vector, N(A)={0}.
Non-trivial: N(A) contains at least one non-zero vector.
13
Q8 What is the dimension of the null space called?
The nullity of A. By the Rank–Nullity Theorem, rank(A)+nullity(A)=n, the number of columns of A.
Q9 What is the null space of an invertible matrix?
Q&A
Just the trivial one: N(A)={0}.
Since A⁻¹ exists, Ax=0 forces x=A⁻¹(Ax)=A⁻¹0=0 — so x=0 is the only solution.
14