2.6.1Matrices & Determinants — Introduction

Matrix definition — rows, columns, order, elements

2,486 words11 min readdifficulty · medium

Overview

A matrix is a rectangular array of numbers arranged in rows and columns, enclosed in brackets. It's the fundamental data structure of linear algebra, letting us organize and manipulate multiple equations, transformations, and data sets simultaneously.

WHY do we need matrices? Systems of equations with multiple variables become unwieldy. A matrix packages all coefficients into one object we can work with using systematic rules. Instead of jugling 10 separate equations, we manipulate one matrix.

WHAT makes a matrix? Four components: the rectangular layout, rows (horizontal), columns (vertical), and individual entries called elements.

HOW do we describe a matrix? By its order (dimensions) and by referring to specific elements using their position.


[!definition] Matrix

A matrix is a rectangular arrangement of numbers (or expressions) in rows and columns, enclosed in square brackets [][ ] or parentheses ()( ).

General form of an m×nm \times n matrix AA: A=[a11a12a1na21a22a2nam1am2amn]A = \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{bmatrix}

Where:

  • mm = number of rows (horizontal lines)
  • nn = number of columns (vertical lines)
  • aija_{ij} = element at row ii, column jj
  • Order or dimension = m×nm \times n (read "m by n")

[!intuition] Why This Structure?

Think of a matrix as a spreadsheet or table. Each row might represent one equation in a system, each column represents a different variable. The element aija_{ij} tells you "what coefficient does variable jj have in equation ii?"

Physical intuition: A 3×33 \times 3 matrix can represent how a3D space transforms (rotation, scaling, shearing). Each column tells you where one basis vector lands after transformation.

Data intuition: A 100×5100 \times 5 matrix could store test scores for 100 students across 5 subjects. Rows = students, columns = subjects.


[!formula] Derivation: Indexing System

WHY do we use double subscripts aija_{ij}?

Starting point: We need a way to uniquely identify each number in the grid.

Step 1 — Position requires two coordinates:

  • One coordinate (like a list) isn't enough for a 2D arrangement
  • We need (row number, column number) to pinpoint any entry

Step 2 — Establish convention:

  • Let ii = row index (1st subscript)
  • Let jj = column index (2nd subscript)
  • Convention: row first, column second (alphabetical: "RC")

Step 3 — Write the element: aij=element in row i, column ja_{ij} = \text{element in row } i, \text{ column } j

WHY this order? Consistency with reading (left-to-right, then top-to-bottom). When we write matrix dimensions as m×nm \times n, mm (rows) comes before nn (columns).

Example: A=[210537]A = \begin{bmatrix} 2 & -1 & 0 \\ 5 & 3 & 7 \end{bmatrix}

  • a11=2a_{11} = 2 (row 1, column 1)
  • a12=1a_{12} = -1 (row 1, column 2)
  • a23=7a_{23} = 7 (row 2, column 3)
  • Order: 2×32 \times 3 (2 rows, 3 columns)

[!formula] Order/Dimension of a Matrix

The order of matrix AA is written as m×nm \times n where:

  • mm = number of rows
  • nn = number of columns

Derivation from scratch:

WHY define order? Two matrices can be equal only if they have the same shape AND same elements. Order captures "shape."

WHAT does order tell us? How many total elements exist: m×nm \times n elements total.

Notation rule: Am×n means A is a matrix of order m×nA_{m \times n} \text{ means } A \text{ is a matrix of order } m \times n

Special cases:

  • If m=nm = n: square matrix (order n×nn \times n or just nn)
  • If m=1m = 1: row matrix or row vector (order 1×n1 \times n)
  • If n=1n = 1: column matrix or column vector (order m×1m \times 1)

[!example] Example 1: Basic Matrix

B=[142035716]B = \begin{bmatrix} 1 & 4 & -2 \\ 0 & 3 & 5 \\ 7 & -1 & 6 \end{bmatrix}

Find: Order, b13b_{13}, b32b_{32}, b22b_{22}

Solution:

Step 1 — Count rows and columns:

  • Count horizontal lines (rows): 3
  • Count vertical lines (columns): 3
  • Order = 3×33 \times 3

WHY this step? Always determine the matrix structure before finding elements.

Step 2 — Find b13b_{13}:

  • Row 1, column 3
  • Go to 1st row: [142][1 \quad 4 \quad -2]
  • Pick 3rd element: 2-2
  • b13=2b_{13} = -2

WHY this works? The first subscript navigates vertically (choses row), second navigates horizontally (chooses column).

Step 3 — Find b32b_{32}:

  • Row 3, column 2
  • Go to 3rd row: [716][7 \quad -1 \quad 6]
  • Pick 2nd element: 1-1
  • b32=1b_{32} = -1

Step 4 — Find b22b_{22}:

  • Row 2, column 2 (diagonal element)
  • b22=3b_{22} = 3

[!example] Example 2: Rectangular Matrix

C=[53012746]C = \begin{bmatrix} 5 & -3 & 0 1 \\ 2 & 7 & -4 & 6 \end{bmatrix}

Find: Order, total elements, c14c_{14}, c23c_{23}, is it square?

Solution:

Step 1 — Order:

  • Rows: 2
  • Columns: 4
  • Order: 2×42 \times 4

Step 2 — Total elements: Total=m×n=2×4=8 elements\text{Total} = m \times n = 2 \times 4 = 8 \text{ elements}

WHY? Each of2 rows contains 4 elements.

Step 3 — c14c_{14}:

  • Row 1, column 4: c14=1c_{14} = 1

Step 4 — c23c_{23}:

  • Row 2, column 3: c23=4c_{23} = -4

Step 5 — Is it square?

  • Square requires m=nm = n
  • Here 242 \neq 4
  • Not square (rectangular)

[!example] Example 3: Row and Column Matrices

Row matrix (row vector): R=[3150]R = \begin{bmatrix} 3 & -1 & 5 & 0 \end{bmatrix}

  • Order: 1×41 \times 4
  • Only one row, four columns
  • r11=3r_{11} = 3, r14=0r_{14} = 0

Column matrix (column vector): C=[2 74]C = \begin{bmatrix} 2 \ -7 \\ 4 \end{bmatrix}

  • Order: 3×13 \times 1
  • Three rows, one column
  • c11=2c_{11} = 2, c31=4c_{31} = 4

WHY the distinction? Row and column vectors behave differently in matrix multiplication. A row vector represents a point in nn-dimensional space (horizontal), while a column vector represents the same point but written vertically (conventional in linear algebra).


[!example] Example 4: Construct Matrix from Element Formula

Problem: Construct a 3×33 \times 3 matrix AA where aij=i+2ja_{ij} = i + 2j.

Solution:

WHY this method? When given a formula, we systematically substitute each (i,j)(i,j) pair.

Step 1 — Set up structure: A=[a11a12a13a21a22a23a31a32a33]A = \begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix}

Step 2 — Calculate each element using aij=i+2ja_{ij} = i + 2j:

Row 1 (i=1i=1):

  • a11=1+2(1)=3a_{11} = 1 + 2(1) = 3
  • a12=1+2(2)=5a_{12} = 1 + 2(2) = 5
  • a13=1+2(3)=7a_{13} = 1 + 2(3) = 7

Row 2 (i=2i=2):

  • a21=2+2(1)=4a_{21} = 2 + 2(1) = 4
  • a22=2+2(2)=6a_{22} = 2 + 2(2) = 6
  • a23=2+2(3)=8a_{23} = 2 + 2(3) = 8

Row 3 (i=3i=3):

  • a31=3+2(1)=5a_{31} = 3 + 2(1) = 5
  • a32=3+2(2)=7a_{32} = 3 + 2(2) = 7
  • a33=3+2(3)=9a_{33} = 3 + 2(3) = 9

Step 3 — Write final matrix: A=[357468579]A = \begin{bmatrix} 3 & 5 & 7 \\ 4 & 6 & 8 \\ 5 & 7 & 9 \end{bmatrix}

Pattern observation: Each row increases by 1 for first element, then each element in a row increases by 2.


[!mistake] Common Mistakes

Mistake 1: Confusing Row and Column Index

Wrong thinking: "a23a_{23} means column 2, row 3"

Why it feels right: We read left-to-right naturally, and columns are horizontal on the page (like reading direction).

The reality: Convention is always row first, column second. Think "RC" (alphabetical order).

Fix: Memorize "RC" = Row then Column. Or: "Down before Across" — go down to the row, then across to the column.

Example: [123456]\begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix}

  • a23a_{23} = row 2, column 3 = 66
  • NOT row 3, column 2 (doesn't exist here!) ✗

Mistake 2: Thinking Order is Commutative

Wrong thinking: "2×32 \times 3 and 3×23 \times 2 are the same"

Why it feels right: In regular multiplication, 2×3=3×22 \times 3 = 3 \times 2. We expect order not to matter.

The reality: Matrix dimensions are NOT commutative. A 2×32 \times 3 matrix has different shape from a 3×23 \times 2 matrix.

[123456]2×3[12 3456]3×2\begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix}_{2 \times 3} \neq \begin{bmatrix} 1 & 2 \ 3 & 4 \\ 5 & 6 \end{bmatrix}_{3 \times 2}

Fix: Remember: order m×nm \times n means "mm rows stacked, nn columns wide". Different order = different shape different matrix.


Mistake 3: Starting Index from Zero

Wrong thinking: "First element is a00a_{00}" (like programming arrays)

Why it feels right: Many programming languages (C, Python, Java) index from 0.

The reality: Standard mathematical notation starts from a11a_{11} (both indices start at 1).

Fix: In pure mathematics, always use 1-based indexing unless explicitly told otherwise. When implementing in code, you'll translate: mathematical aija_{ij} becomes A[i-1][j-1] in Python.


[!recall]- Feynman Explanation (age 12)

Imagine you're organizing your trading card collection. Instead of throwing them in a pile, you make a neat grid:

  • Each row is one type (Pokemon, superheroes, sports)
  • Each column is one rarity level (common, rare, ultra-rare)

A matrix is just a fancy word for this organized grid of numbers. Each card's position has an "address" — which row (down from top) and which column (across from left).

So if you say "row 2, column 3," I know exactly which card you mean! That's what a23a_{23} does — it's the "address" of a number in the grid.

The "order" (like 2×32 \times 3) tells you the shape: 2 rows down, 3 columns across. Just like saying "my card grid is 2 tall and 3 wide!"

Why do we care? Because mathematicians love organizing stuff, and when you have big grids of numbers (like test scores for a whole class, or directions in a video game), you need a smart way to work with all of them at once. Matrices let you do that!


[!mnemonic] Remember It

"RC Car" — Row first, Column second (like RC = Remote Control)

Order chant: "Rows go DOWN like a frown, Columns CROSS like a T"

Element finding: "DOWN to your row, ACROSS to your goal"

For square vs. rectangular: "SQUARE = SAME" (same number of rows and columns)


Connections

  • Matrix Equality — two matrices are equal iff same order AND same elements
  • Types of Matrices — square, diagonal, identity, zero, row, column
  • Matrix Addition — requires same order
  • Matrix Multiplication — column count of first = row count of second
  • Transpose of Matrix — swaps rows and columns (order m×nm \times n becomes n×mn \times m)
  • Determinant — defined only for square matrices
  • System of Linear Equations — matrices encode coefficients
  • Linear Transformations — square matrices represent transformations

#flashcards/maths

What is a matrix? :: A rectangular arrangement of numbers (or expressions) in rows and columns, enclosed in brackets.

What does the order m×nm \times n of a matrix mean?
mm = number of rows, nn = number of columns (rows first, columns second).
In the element notation aija_{ij}, what does ii represent?
The row number (row index).
In the element notation aija_{ij}, what does jj represent?
The column number (column index).
How many total elements does an m×nm \times n matrix have?
m×nm \times n elements.
What is a square matrix?
A matrix where the number of rows equals the number of columns (m=nm = n).
What is a row matrix?
A matrix with only one row (order 1×n1 \times n).

What is a column matrix? :: A matrix with only one column (order m×1m \times 1).

For matrix A=[2573]A = \begin{bmatrix} 2 & 5 \\ 7 & 3 \end{bmatrix}, what is a21a_{21}?
77 (row 2, column 1).
Can a 2×32 \times 3 matrix be equal to a 3×23 \times 2 matrix?
No, they have different orders (different shapes), so they cannot be equal.
What memory trick helps remember "row before column"?
"RC" (alphabetical order, like Remote Control car) or "Down before Across".
If aij=2ija_{ij} = 2i - j, what is a32a_{32} in a 3×33 \times 3 matrix?
a32=2(3)2=62=4a_{32} = 2(3) - 2 = 6 - 2 = 4.

Concept Map

packages

arranged in

arranged in

indexed by

indexed by

combine as

combine as

convention

gives

gives

described by

models

Matrix: rectangular array

Systems of equations

Rows: horizontal, count m

Columns: vertical, count n

Row index i

Column index j

Element a_ij

Row first, column second

Order m x n

Transformations and data tables

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Matrix kya hai aur kyun zaroori hai?

Dekho, matrix ek tarah se numbers ka organized table hai, jaise tumhara timetable ya marks sheet. Agar tumhare pas bahut sare equations hain (jaise 10 equations with 10 variables), toh unhe ek-ek karke handle karna bahut mushkil ho jata hai. Matrix sabko ek sath arrange kar deta hai — ek rectangular box mein, rows aur columns ke saath.

Samjho aise: Ek matrix ko 3×4 ke order mein likha hai matlab 3 rows (horizontal lines, neeche ki taraf) aur 4 columns (vertical lines, side ki taraf). Harek number ko element kehte hain. Jaise agar hume kisi specific element ko dhoondhna hai, hum uska address use karte hain — pehle row number, phir column number. Jaise a₂₃ matlab "row 2, column 3 wala element."

Ye kyun important hai engineering aur science mein? Computer graphics mein screen pe kuch bhi dikhane ke liye matrices chahiye (rotation, scaling sabkuch matrices se hota hai). Physics mein quantum mechanics, economics mein input-output models, statistics mein data analysis — sab jagah matrices ka dhaka chalta hai.Ek baar matrix ka concept clear ho gaya, toh tumhare paas ek powerful tool aa jata hai jo complex problems ko systematically solve karta hai. Basic definition aur indexing samajh liya, toh age ke operations (addition, multiplication, determinant) easily ayenge!

Go deeper — visual, from zero

Test yourself — Matrices & Determinants — Introduction

Connections