1 - Matrix Review

Updated 4 Oct 2026

Matrix Review and Notation

  • Definition: A matrix is a rectangular array of (real/complex) numbers
    • Example: A=[10−30−21/4]A = \begin{bmatrix} 1 & 0 & -3 \\ 0 & -2 & 1/4 \end{bmatrix}
  • Terminology:
    • Each number is called an entry or element
    • R\mathbb{R} denotes the set of real numbers
    • Rm×n\mathbb{R}^{m \times n} denotes the set of all matrices with real entries having mm rows and nn columns
      • Called mm-by-nn matrices or m×nm \times n matrices
    • Example: Matrix AA above is a 2-by-3 matrix (A∈R2×3A \in \mathbb{R}^{2 \times 3})

Matrix Notations

Using example: A=[10−30−21/4]A = \begin{bmatrix} 1 & 0 & -3 \\ 0 & -2 & 1/4 \end{bmatrix}

  • Matrix Naming:
    • Matrices are usually denoted by capital letters (AA, BB, CC, etc.)
    • Corresponding lower case letter with subscript ijij denotes the (i,j)(i,j) entry
  • Entry Notation:
    • a13=−3a_{13} = -3
    • a22=−2a_{22} = -2
    • Can also use [A]ij[A]_{ij} or A(i,j)A(i,j)
  • Row and Column Notation:
    • ai∙a_{i\bullet} denotes the iith row of AA
      • Example: a1∙=[10−3]a_{1\bullet} = \begin{bmatrix} 1 & 0 & -3 \end{bmatrix}
    • a∙ja_{\bullet j} denotes the jjth column of AA
      • Example: a∙2=[0−2]a_{\bullet 2} = \begin{bmatrix} 0 \\ -2 \end{bmatrix}

Matrix Operations

Addition

  • Rule: If AA and BB are mm-by-nn matrices, C=A+BC = A + B is a mm-by-nn matrix with cij=aij+bijc_{ij} = a_{ij} + b_{ij}
  • Example: [10−30−21]+[−212021]=[−11−1002]\begin{bmatrix} 1 & 0 & -3 \\ 0 & -2 & 1 \end{bmatrix} + \begin{bmatrix} -2 & 1 & 2 \\ 0 & 2 & 1 \end{bmatrix} = \begin{bmatrix} -1 & 1 & -1 \\ 0 & 0 & 2 \end{bmatrix}

Subtraction

  • Rule: If AA and BB are mm-by-nn matrices, C=A−BC = A - B is a mm-by-nn matrix with cij=aij−bijc_{ij} = a_{ij} - b_{ij}
  • Example: [10−30−21]−[−212021]=[3−1−50−40]\begin{bmatrix} 1 & 0 & -3 \\ 0 & -2 & 1 \end{bmatrix} - \begin{bmatrix} -2 & 1 & 2 \\ 0 & 2 & 1 \end{bmatrix} = \begin{bmatrix} 3 & -1 & -5 \\ 0 & -4 & 0 \end{bmatrix}

Scalar-Matrix Multiplication

  • Rule: If AA is a matrix and α\alpha is a scalar, then C=αAC = \alpha A has entries cij=αaijc_{ij} = \alpha a_{ij}
  • Example: 2[123456]=[24681012]2 \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix} = \begin{bmatrix} 2 & 4 & 6 \\ 8 & 10 & 12 \end{bmatrix}

Matrix-Matrix Multiplication

อันนี้ก็เป็นการคูณ Matrix ธรรมดาเนอะ ก็ตบ ๆ เอาได้เลย!!

  • Rule: If AA is a mm-by-pp matrix and BB is a pp-by-nn matrix, C=ABC = AB is a mm-by-nn matrix with: cij=∑k=1paikbkjc_{ij} = \sum_{k=1}^{p} a_{ik}b_{kj}
  • Example 1: [2−135]⋅[012−2]=[2(0)+(−1)22(1)+(−1)(−2)3(0)+5(2)3(1)+5(−2)]=[−2410−7]\begin{bmatrix} 2 & -1 \\ 3 & 5 \end{bmatrix} \cdot \begin{bmatrix} 0 & 1 \\ 2 & -2 \end{bmatrix} = \begin{bmatrix} 2(0) + (-1)2 & 2(1) + (-1)(-2) \\ 3(0) + 5(2) & 3(1) + 5(-2) \end{bmatrix} = \begin{bmatrix} -2 & 4 \\ 10 & -7 \end{bmatrix}
  • Example 2: [012−2]⋅[2−135]=[0(2)+1(3)0(−1)+1(5)2(2)+(−2)(3)2(−1)+(−2)(5)]=[35−2−12]\begin{bmatrix} 0 & 1 \\ 2 & -2 \end{bmatrix} \cdot \begin{bmatrix} 2 & -1 \\ 3 & 5 \end{bmatrix} = \begin{bmatrix} 0(2) + 1(3) & 0(-1) + 1(5) \\ 2(2) + (-2)(3) & 2(-1) + (-2)(5) \end{bmatrix} = \begin{bmatrix} 3 & 5 \\ -2 & -12 \end{bmatrix}
  • Important Note: AB≠BAAB \neq BA in general

Transpose

  • Definition: If AA is mm-by-nn, then its transpose (denoted ATA^T) is a nn-by-mm matrix with aijT=ajia_{ij}^T = a_{ji}
  • Example: [123456]T=[142536]\begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix}^T = \begin{bmatrix} 1 & 4 \\ 2 & 5 \\ 3 & 6 \end{bmatrix}
  • Properties:
    • (A+B)T=AT+BT(A + B)^T = A^T + B^T
    • (A−B)T=AT−BT(A - B)^T = A^T - B^T
    • (AB)T=BTAT(AB)^T = B^T A^T
    • (ABC)T=CTBTAT(ABC)^T = C^T B^T A^T

Identity Matrix and Inverse

Identity Matrix

  • Definition: An identity matrix InI_n is a nn-by-nn matrix (square matrix) whose diagonal entries are 1 and nondiagonal entries are 0
  • Example: I4=[1000010000100001]I_4 = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}
  • Note: The subscript nn is usually omitted if its dimension can be inferred

Inverse

  • Definition: If AA is nn-by-nn, its inverse (denoted A−1A^{-1}) is a nn-by-nn matrix satisfying: AA−1=IAA^{-1} = I
  • Important: Some matrices do not have inverses

Linear Independence and Rank

Linear Independence

  • Definition: Vectors v1,v2,…,vmv_1, v_2, \ldots, v_m are said to be linearly independent if: c1v1+c2v2+⋯+cmvm=0c_1v_1 + c_2v_2 + \cdots + c_mv_m = 0 if and only if c1=c2=⋯=cm=0c_1 = c_2 = \cdots = c_m = 0 (scalar)

  • Linear Dependence: Otherwise, they are called linearly dependent

    • If v1,…,vmv_1, \ldots, v_m are linearly dependent, then there are scalars c1,…,cmc_1, \ldots, c_m, not all zeros at the same time, such that: c1v1+c2v2+⋯+cmvm=0c_1v_1 + c_2v_2 + \cdots + c_mv_m = 0

Rank

Nonsingular vs Singular Matrices

  • Visit 03 Determinants
  • Nonsingular Matrix: A nn-by-nn matrix AA is said to be nonsingular if it satisfies any one of the following equivalent conditions:
    • AA has an inverse
    • det⁡(A)≠0\det(A) \neq 0
    • rank(A)=n\text{rank}(A) = n
    • For any vector z≠0z \neq 0, Az≠0Az \neq 0
  • Singular Matrix: Otherwise, the matrix is singular

Orthogonal Matrices

  • Definition: The matrix Q∈Rn×nQ \in \mathbb{R}^{n \times n} is said to be orthogonal if: QTQ=QQT=IQ^TQ = QQ^T = I
  • Examples of Orthogonal Matrices:
    • II (Identity matrix)
    • [0.80.6−0.60.8]\begin{bmatrix} 0.8 & 0.6 \\ -0.6 & 0.8 \end{bmatrix}
    • [cos⁡θsin⁡θ−sin⁡θcos⁡θ]\begin{bmatrix} \cos\theta & \sin\theta \\ -\sin\theta & \cos\theta \end{bmatrix} for any θ\theta