Matrices
1. What Is a Matrix?
A matrix is a rectangular array of numbers arranged in rows and columns.
a11 a12
A=
a21 a22
Matrices are used to represent linear transformations, systems of equations, and opera-
tions acting on vectors.
They do not merely store data — they operate on vectors and other matrices.
2. Types of Matrices
• Row matrix: 1 × n
• Column matrix: n × 1
• Square matrix: n × n
• Identity matrix:
1 0
I=
0 1
The identity matrix leaves any compatible vector or matrix unchanged when multiplied.
3. Matrix Addition
Rule
Two matrices can be added only if they have the same dimensions.
A + B = [aij + bij ]
1
Example 1
1 2 5 6
A= , B=
3 4 7 8
1+5 2+6 6 8
A+B = =
3+7 4+8 10 12
4. Scalar Multiplication
If k is a scalar, then:
kA = [kaij ]
Example 2
1 −1 2 −2
2 =
0 3 0 6
Scalar multiplication rescales every element of the matrix.
5. Matrix Multiplication
Rule
If:
Am×n , Bn×p
then the product:
AB = Cm×p
Matrix multiplication is generally not commutative:
AB ̸= BA
6. Worked Example: Matrix Multiplication
1 2 2 0
A= , B =
3 4 1 2
(1)(2) + (2)(1) (1)(0) + (2)(2)
AB =
(3)(2) + (4)(1) (3)(0) + (4)(2)
4 4
AB =
10 8
2
7. Matrix Acting on a Vector
Let:
0 1 1
A= , ⃗v =
1 0 0
Then:
0 1 1 0
A⃗v = =
1 0 0 1
Matrix multiplication transforms vectors into new vectors.
8. Transpose of a Matrix
Definition
The transpose of a matrix is obtained by interchanging rows and columns.
(AT )ij = Aji
Example
1 2 3
A=
4 5 6
1 4
T
A = 2
5
3 6
9. Inverse of a 2 × 2 Matrix
Condition
A matrix has an inverse only if its determinant is non-zero.
Formula
For:
a b
A=
c d
1 d −b
A−1 =
ad − bc −c a
3
10. Worked Example: Inverse
2 1
A=
5 3
Determinant:
|A| = (2)(3) − (1)(5) = 1
−1 3 −1
A =
−5 2
Verification:
AA−1 = I