← Module 01 / Getting started & notation

Lesson 01.3 · §2 Other notes

Know what kind of thing you have

Scalars, vectors, matrices, and random variables play different roles—even when all of them involve numbers.

In this lesson 4 ideas
  1. First ask: one number, a list, or a table?
  2. The source’s three conventions
  3. Turn rows into columns
  4. An easy mistake to catch early

First ask: one number, a list, or a table?

A scalar is one number, such as α=2\alpha=2. A vector in Rn\mathbb R^n contains n real components. A matrix arranges entries in rows and columns. These objects can encode the same data differently, but their shapes control which operations are defined.

KindExampleShape
Scalarα=2\alpha=2A single number
Column vectorx=[21−3]\mathbf x=\begin{bmatrix}2\\1\\-3\end{bmatrix}3×13\times1
MatrixA=[123456]\mathbf A=\begin{bmatrix}1&2&3\\4&5&6\end{bmatrix}2×32\times3
Random variableXX, the number shown on a dieA function of a random outcome, not one fixed observation

A realized value such as x=4x=4 is one observation of XX. Later, several random variables will form a random vector.

The source’s three conventions

1. Boldface identifies vectors and matrices. The source writes x\mathbf x and A\mathbf A. This includes vectors in Rn\mathbb R^n and vectors in more general vector spaces. Greek letters generally denote scalars; capital Roman letters generally denote matrices and random variables. These are conventions, not restrictions on every author’s notation.

2. Work over the reals. The source restricts attention to real values to keep the abstraction manageable. Many results can be generalized to complex values, but the notes state the real versions. This course follows that scope; complex-number extensions are not prerequisites here.

3. Vectors are columns. A vector in Rn\mathbb R^n is interpreted as an n×1n\times1 matrix. Taking its transpose is therefore well-defined and produces a 1×n1\times n row vector.

Turn rows into columns

Explore it yourself

Same entries. New addresses.

Select any entry. Its row and column swap when you transpose.

Preparing interactive controls…

A · 2 × 3

Aᵀ · 3 × 2

Entry (1, 2) → (2, 1). Value: 2.

Kronecker delta δᵢⱼ = 0, because i does not equal j.

For the example matrix, the entry 2 starts at row 1, column 2. After transposing, it sits at row 2, column 1:

A=[123456],A⊤=[142536].\mathbf A=\begin{bmatrix}1&2&3\\4&5&6\end{bmatrix},\qquad \mathbf A^\top=\begin{bmatrix}1&4\\2&5\\3&6\end{bmatrix}.

No entry changed value. Its address changed. Transposing twice returns every entry to its original address.

For a column vector,

x=[21−3]⟹x⊤=[21−3].\mathbf x=\begin{bmatrix}2\\1\\-3\end{bmatrix}\quad\Longrightarrow\quad\mathbf x^\top=\begin{bmatrix}2&1&-3\end{bmatrix}.

The experiment also displays δij\delta_{ij} for the selected address. It equals 1 only on the main diagonal. This connects the symbol dictionary to the identity matrix you will meet later.

An easy mistake to catch early

A three-entry row and a three-entry column store three numbers, but they are not the same matrix shape. A dot product x⊤x\mathbf x^\top\mathbf x has shape (1×3)(3×1)(1\times3)(3\times1) and produces a 1×11\times1 matrix, which we identify with a scalar. The outer product xx⊤\mathbf x\mathbf x^\top has shape (3×1)(1×3)(3\times1)(1\times3) and produces a 3×33\times3 matrix.

Make a prediction

If x is a column vector in ℝ⁴, what is the shape of xᵀ?