Lecture-1: Introduction to Matrices

Lecture-1: Introduction to Matrices

1. Definition

A matrix is a rectangular array of numbers arranged in rows and columns. It is denoted usually by capital letters like \(A, B, C\).

Matrices provide a compact way to organize data and perform algebraic operations systematically. They are widely used in engineering, physics, computer science, and economics.

2. Mathematical Form & Order

A general matrix of order \(m \times n\):

\[ A_{m \times n} = \begin{bmatrix} a_{11} & a_{12} & \dots & a_{1n} \\ a_{21} & a_{22} & \dots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \dots & a_{mn} \end{bmatrix} \]

Here, \(m\) represents the number of rows, and \(n\) represents the number of columns. Each element in the matrix is written as \(a_{ij}\), where \(i\) is the row index and \(j\) is the column index.

Example: A 2x3 matrix:
\[ B = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix} \]

Notice that this example has 2 rows and 3 columns, so we call it a matrix of order \(2 \times 3\).

3. Types of Matrices

Matrices are classified into different types based on their structure, size, and arrangement of elements. Each type has unique properties that make it useful in solving mathematical and real-world problems.

  1. Square Matrix: A matrix with equal number of rows and columns. Important because determinants and eigenvalues are only defined for square matrices.
    Formula: \(n \times n\).
    Example: \(\begin{bmatrix}1&2\\3&4\end{bmatrix}\)
  2. Rectangular Matrix: A matrix where rows ≠ columns. Often used to represent datasets where rows = observations and columns = variables.
    Example: \(\begin{bmatrix}1&2&3\\4&5&6\end{bmatrix}\)
  3. Diagonal Matrix: Only diagonal elements are non-zero. Useful in simplifying multiplication and powers of matrices.
    Example: \(\begin{bmatrix}2&0&0\\0&3&0\\0&0&4\end{bmatrix}\)
  4. Scalar Matrix: A diagonal matrix with identical diagonal elements. Acts like scaling when multiplied with another matrix.
    Example: \(\begin{bmatrix}5&0\\0&5\end{bmatrix}\)
  5. Identity Matrix: Diagonal entries are all 1. It plays the same role as number 1 in multiplication: \(AI = IA = A\).
    Example: \(I = \begin{bmatrix}1&0&0\\0&1&0\\0&0&1\end{bmatrix}\)
  6. Zero Matrix: All entries are zero. Acts like zero in addition: \(A+0=A\).
    Example: \(\begin{bmatrix}0&0\\0&0\end{bmatrix}\)
  7. Row Matrix: Only one row. Useful to represent a single observation or data record.
    Example: \(\begin{bmatrix}1&2&3&4\end{bmatrix}\)
  8. Column Matrix: Only one column. Often used to represent vectors in physics and mathematics.
    Example: \(\begin{bmatrix}1\\2\\3\\4\end{bmatrix}\)
  9. Symmetric Matrix: A square matrix where \(A = A^T\). Common in statistics (covariance matrices) and optimization problems.
    Example: \(\begin{bmatrix}1&2\\2&3\end{bmatrix}\)
  10. Skew-Symmetric Matrix: A square matrix where \(A^T = -A\). Diagonal entries are always zero; important in linear algebra and physics.
    Example: \(\begin{bmatrix}0&-2\\2&0\end{bmatrix}\)
  11. Upper Triangular Matrix: All elements below diagonal are zero. Useful in solving linear equations by back-substitution.
    Example: \(\begin{bmatrix}1&2&3\\0&4&5\\0&0&6\end{bmatrix}\)
  12. Lower Triangular Matrix: All elements above diagonal are zero. Used in forward substitution methods.
    Example: \(\begin{bmatrix}1&0&0\\2&3&0\\4&5&6\end{bmatrix}\)
  13. Transpose: Formed by interchanging rows and columns. Essential in defining symmetric and orthogonal matrices.
    Example: \(\begin{bmatrix}1&2\\3&4\end{bmatrix}^T = \begin{bmatrix}1&3\\2&4\end{bmatrix}\)
  14. Trace: The sum of diagonal elements of a square matrix. Often appears in eigenvalue problems and matrix invariants.
    Example: \(Tr(A) = 1+4 = 5\) for \(\begin{bmatrix}1&2\\3&4\end{bmatrix}\)
  15. Orthogonal Matrix: A square matrix with \(A^TA = I\). Represents rotation or reflection in geometry.
    Example: \(\begin{bmatrix}0&1\\-1&0\end{bmatrix}\)
  16. Singular Matrix: A square matrix with \(\det(A) = 0\). It does not have an inverse.
    Example: \(\det \begin{bmatrix}2&4\\1&2\end{bmatrix} = 0\)
  17. Non-Singular Matrix: A square matrix with \(\det(A) \neq 0\). It has an inverse.
    Example: \(\det \begin{bmatrix}1&2\\3&4\end{bmatrix} = -2\)
  18. Idempotent Matrix: Satisfies \(A^2 = A\). Used in statistics for projection matrices.
    Example: \(\begin{bmatrix}1&0\\0&0\end{bmatrix}\)
  19. Nilpotent Matrix: Some power of the matrix is zero (\(A^k=0\)). Important in advanced linear algebra concepts.
    Example: \(\begin{bmatrix}0&1\\0&0\end{bmatrix}^2 = 0\)
  20. Involutory Matrix: A square matrix with \(A^2=I\). Acts as its own inverse.
    Example: \(\begin{bmatrix}0&1\\1&0\end{bmatrix}\)

4. Basic Operations in

Matrix operations such as addition, subtraction, and multiplication are fundamental. These can even be carried out in Excel or any programming language for practical applications.

Addition Example:
\[ A = \begin{bmatrix}1&2\\3&4\end{bmatrix}, \; B = \begin{bmatrix}5&6\\7&8\end{bmatrix} \]
\[ A+B = \begin{bmatrix}6&8\\10&12\end{bmatrix} \]
Subtraction Example:
\[ A-B = \begin{bmatrix}-4&-4\\-4&-4\end{bmatrix} \]
Multiplication Example:
\[ A \times B = \begin{bmatrix}1&2\\3&4\end{bmatrix} \times \begin{bmatrix}5&6\\7&8\end{bmatrix} = \begin{bmatrix}19&22\\43&50\end{bmatrix} \]

Notice that multiplication is not element-wise but involves row-by-column operations. Matrix multiplication is not commutative, i.e., \(AB \neq BA\) in general.

4. Determinant of a Matrix

The determinant is a scalar value that can be computed from a square matrix. It provides important information about the matrix, such as whether it is invertible and the scaling factor of the linear transformation it represents.

Properties:

Formula for a 2×2 matrix:

For \[ A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} \], \[ \det(A) = ad - bc \]

Example: \[ \det\begin{bmatrix} 3 & 2 \\ 1 & 4 \end{bmatrix} = (3)(4) - (2)(1) = 12 - 2 = 10 \]

Formula for a 3×3 matrix:

For \[ A = \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix} \], \[ \det(A) = a(ei - fh) - b(di - fg) + c(dh - eg) \]

Example: \[ \det\begin{bmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 5 & 6 & 0 \end{bmatrix} \] = \(1(1\cdot0 - 4\cdot6) - 2(0\cdot0 - 4\cdot5) + 3(0\cdot6 - 1\cdot5)\) = \(1(-24) - 2(-20) + 3(-5)\) = \(-24 + 40 - 15 = 1\).

5. Inverse of a Matrix

The inverse of a square matrix \(A\) is another matrix, denoted as \(A^{-1}\), such that:

\[ A \cdot A^{-1} = A^{-1} \cdot A = I \]

where \(I\) is the identity matrix. A matrix is invertible only if \(\det(A) \neq 0\).

Formula for 2×2 matrix:

For \[ A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} \], If \(\det(A) \neq 0\), then \[ A^{-1} = \frac{1}{ad - bc} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} \]

Example: \[ A = \begin{bmatrix} 3 & 2 \\ 1 & 4 \end{bmatrix}, \quad \det(A) = 10 \] \[ A^{-1} = \frac{1}{10} \begin{bmatrix} 4 & -2 \\ -1 & 3 \end{bmatrix} \] \[ = \begin{bmatrix} 0.4 & -0.2 \\ -0.1 & 0.3 \end{bmatrix} \]

General method (Adjoint method for n×n):

  1. Find the determinant of the matrix.
  2. Compute the matrix of minors.
  3. Convert it into a matrix of cofactors.
  4. Take the transpose (adjoint).
  5. Divide the adjoint by the determinant: \[ A^{-1} = \frac{\text{Adj}(A)}{\det(A)} \]

Example: Inverse of a 3×3 Matrix

Let \[ A = \begin{bmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 5 & 6 & 0 \end{bmatrix} \]

Step 1: Find the determinant

\[ \det(A) = 1(1 \cdot 0 - 4 \cdot 6) - 2(0 \cdot 0 - 4 \cdot 5) + 3(0 \cdot 6 - 1 \cdot 5) \] = \(1(-24) - 2(-20) + 3(-5)\) = \(-24 + 40 - 15 = 1\).

Since det(A) = 1 ≠ 0, the matrix is invertible.

Step 2: Compute minors & cofactors

Minor of each element → then apply signs (\((-1)^{i+j}\)) to get cofactors.

Cofactor matrix of A = \[ C = \begin{bmatrix} (1\cdot0 - 4\cdot6) & -(0\cdot0 - 4\cdot5) & (0\cdot6 - 1\cdot5) \\ -(2\cdot0 - 3\cdot6) & (1\cdot0 - 3\cdot5) & -(1\cdot6 - 2\cdot5) \\ (2\cdot4 - 3\cdot1) & -(1\cdot4 - 3\cdot0) & (1\cdot1 - 2\cdot0) \end{bmatrix} \]

Simplifying: \[ C = \begin{bmatrix} -24 & 20 & -5 \\ 18 & -14 & 4 \\ 5 & -4 & 1 \end{bmatrix} \]

Step 3: Take transpose (Adjoint)

\[ \text{Adj}(A) = C^T = \begin{bmatrix} -24 & 18 & 5 \\ 20 & -14 & -4 \\ -5 & 4 & 1 \end{bmatrix} \]

Step 4: Divide by determinant

Since det(A) = 1, \[ A^{-1} = \frac{1}{1} \cdot \text{Adj}(A) = \begin{bmatrix} -24 & 18 & 5 \\ 20 & -14 & -4 \\ -5 & 4 & 1 \end{bmatrix} \]

Final Answer: \[ A^{-1} = \begin{bmatrix} -24 & 18 & 5 \\ 20 & -14 & -4 \\ -5 & 4 & 1 \end{bmatrix} \]

6. Interactive Calculator

Below is an interactive calculator where you can input matrices and perform operations such as addition, subtraction, multiplication, determinant, and adjoint.

Matrix A
Matrix B
Result

7. Applications

Matrices have vast applications in real-world problems. Some of the most common are listed below:

8. Video

© 2025 | Designed by Dr. Surnam Narendra