Lists : A list of length 𝑛 is an ordered collection of 𝑛 elements. Two lists are equal if and only if they have the same length and the same elements in the same order.

A vector space over the field is a set of vectors together with two operations:

  • Vector addition : Add two vectors to get another vector.
  • Scalar multiplication Multiply a vector by a real number (scalar).

Elements of a vector space are called vectors or points.

Depending on the vector space, a vector could be:

  • A column of numbers:

  • A matrix:

  • A polynomial:

  • A function:


The projection of point onto direction .

  • = The vector being analyzed (column vector)
  • = The direction or weight vector (column vector)
  • = A row vector acting on

Even though the dot product is numerically symmetric: Writing it as keeps semantic roles consistent across fields : In Machine Learning & Statistics

  • = The data / input (the object being observed)
  • = The parameter / direction / filter / weight In Geometry
  • = The vector being decomposed
  • = The reference direction

Subspace

A subspace of a vector space is a subset that is itself a vector space under the same operations. It must satisfy three conditions:

  1. Contains the origin:
  2. Closed under addition: if , then
  3. Closed under scalar multiplication: if and , then

Examples

  • In : any line or plane through the origin is a subspace
  • In : a plane not through the origin is not a subspace

A subspace always passes through the origin. If it doesn’t, it is called an affine subspace.

An affine subspace is a shifted (translated) version of a subspace. It has the form:

where is a subspace and is a fixed offset vector.


Hyperplane

A hyperplane is a flat geometric object of dimension inside an -dimensional space. It is the most natural way to β€œcut” a space into two parts with a single boundary.

Normal Form (): A normal form describes a geometric object using a vector that is **perpendicular to it.

A hyperplane in can be defined in normal form as:

(Set definition)

  • β†’ point in n-dimensional space
  • β†’ normal vector (weight vector)
  • β†’ offset (bias term)

Linear Equation Form A hyperplane is the set of all points satisfying a single linear equation:

or in vector form:

where:

  • is the normal vector
  • is a scalar constant
  • is any point on the hyperplane

The set:

describes all points whose projection onto is constant.

  • all points in share the same dot product with
  • they lie on a flat -dimensional surface
  • determines orientation
  • determines shift (offset from origin)
  • changing rotates the hyperplane
  • changing translates it

If , then:

This hyperplane passes through the origin.

A hyperplane in is defined by , where is the normal vector perpendicular to the -dimensional surface.

SpaceHyperplane
Line
Plane
-dimensional flat surface

Dividing space into two half-spaces :

A hyperplane splits into exactly two half-spaces:

β€œhalf-space” means two separated regions β€” it does not imply equal volume or measure.

Point-Directional Form (): Instead of a perpendicular line, you define the boundary by picking a starting point that sits on the boundary, and then spanning out in different directions using linearly independent vectors . Independent direction vectors are linearly independent vectors lying inside the hyperplane that span all possible directions within it.

  • means that any point on this boundary can be reached by starting at and moving along those direction vectors by some scaling factors .

Moving from to The primary goal of a linear classifier like a perceptron is to look at a new data point and decide which side of the boundary it falls on.

  • Using (Normal Form): You only have to calculate a single dot product: . If the result is positive, it belongs to one class; if negative, the other. This is incredibly fast for a computer to process.
  • Using (Point-Directional Form): To figure out which side of the boundary a point is on, you would have to solve a complex system of linear equations to find all the scaling factors for every single data point. That would be computational.

Convex Set

A set is convex if for any two points in the set, the entire line segment connecting them also lies in the set.

Formally, is convex if:

The expression is called a convex combination of and . As varies from to , it traces the straight line segment from to . The formula is just the algebraic way to write β€œa straight line segment between and

Intuition

A set is convex if you can β€œsee” every point from every other point without leaving the set β€” no dents, holes, or concavities.

The function is convex if and only if the line segment connecting any two points on its graph lies above or on the graph itself. A function is convex if it is shaped like a right-side-up bowl : if you pick two points on the curve and draw a straight line (a secant line) between them, the actual curve of the function must sag below (or equal to) that straight line.

Jensen’s Inequality base :
Let where the domain is a convex set, For any and any :

Non convex :


LinearΒ functionsΒ areΒ bothΒ convexΒ andΒ concave

Linearity β‡’ Both Convex and Concave

Consider the affine function:

A function is convex if for all and :

LHS :

RHS :

The function is:

  • convex
  • concave

linear/affine functions commute with convex combinations, so they induce zero curvature and generate convex (and concave) structure simultaneously.


Half-spaces

A half-space is one side of a hyperplane in an n-dimensional space.

Formally, a (closed) half-space is:

where:

  • ,

The hyperplane boundary is:

  • it has a flat boundary (hyperplane)
  • it does not curve inward or outward
  • it splits space into exactly two parts

There is also the open half-space:

Half-spaces are always convex sets.

A half-space is defined as:

( = Positive class region)

(The argument works identically for .)

Proof

Take any two points . By definition:

Now take any convex combination with . We need to show , i.e., .

Since and , and , , :

Therefore , so .

The proof works because the dot product is a linear function, and linear functions preserve convex combinations:

A half-space is just the sublevel (or superlevel) set of a linear function and sublevel sets of linear (and more generally, convex) functions are always convex. If two points satisfy a linear inequality, every convex combination also satisfies it

Any convex polyhedron = intersection of finitely many half-spaces


A hyperplane can be written as:

Since both half-spaces are convex, and the intersection of convex sets is always convex, a hyperplane is also convex.

The intersection of any collection of convex sets is convex.

Any region defined by a finite number of linear inequalities (a polyhedron) is convex, since it is an intersection of half-spaces.

Any convex set can be written as the intersection of (possibly infinitely many) half-spaces.

A fundamental structural result in convex geometry states:

Each constraint: defines a half-space, i.e. one side of a hyperplane.

(a) Polyhedron (finite case)

If is finite:

This is a polyhedron. A convex polyhedron is mathematically defined as the intersection of a finite number of half-spaces.

(b) Euclidean ball (infinite case)

A ball: intersection of all tangent half-spaces.

Convex sets are exactly those regions that can be described entirely by linear inequalities.


Convex Hull The convex hull is the smallest convex shape that encloses all points.


Norm A norm is a function such that the following hold for all and :

  • (i) Positivity: if and only if .
  • (ii) Homogeneity: .
  • (iii) Triangle inequality: .

We call the tuple a normed space.

Common norms

Norms

For , we denote:

For , we denote:

The Norm ()

  • Manhattan Distance or Taxicab Norm.
    • A way of measuring distance where you can only move along grid lines. In a city with a grid layout (like Manhattan), you can’t cut diagonally through buildings. You have to go along the streets, some blocks east/west, some blocks north/south.
  • (the sum of absolute values).
  • Sparsity / Feature Selection (Lasso Regularization): In machine learning, using an penalty forces unimportant model weights to become exactly zero. This effectively selects the most important features.
  • Robustness to Outliers: loss (Mean Absolute Error) is less sensitive to extreme outliers than loss.

The Norm ()

  • Euclidean Distance.
  • .
  • Used for:
    • Weight Decay (Ridge Regularization / L2): In machine learning, it penalizes large weights to prevent overfitting, keeping the model stable and smooth.
    • Optimization (Mean Squared Error): Most machine learning optimization algorithms prefer because its derivative is mathematically clean and continuous everywhere.

The Norm ()

  • Chebyshev Distance or Maximum Norm.
  • .
  • Used for :
    • Adversarial Machine Learning: Often used to define a β€œbudget” for an attacker trying to fool a model (e.g., β€œyou can change any pixel in this image, but no single pixel can change by more than ”).
    • Worst-case Analysis: It helps evaluate systems where you only care about the single largest error or deviation.

Example : Let , and:

  • norm (Manhattan distance):

  • norm (Ordinary Euclidean length):

  • norm (Maximum/Chebyshev norm):

The exact same vector has different β€œlengths” depending entirely on the norm you choose to measure it with.

Example : A unit circle is defined as the set of all points that are exactly a distance of away from the origin .

Because the norm is how we measure β€œdistance,” changing the norm fundamentally changes what points are considered β€œ1 unit away” from the center.

  • Under the norm, a unit circle is a perfect standard circle.
  • Under the norm, a unit circle looks like a tilted diamond.
  • Under the norm, a unit circle is a square.

Matrix Norms

Consider the space of matrices, that is, . Every matrix can be identified with a linear function via

The following norms are frequently used on :

  • Frobenius norm: Measures the overall size of a matrix.

A matrix is a function that transforms vectors: It takes an input vector and produces:

  • Induced norms: For every pair of norms on and on , we can define the induced norm:

    An induced norm measures the maximum possible β€œstretching factor” that the matrix can apply to any vector .

  • Common Matrix Norms

    • Maximum absolute column sum (-norm): Take the largest absolute column sum.
    • Maximum absolute row sum (-norm): Take the largest absolute row sum. Column 1 sum: Column 2 sum:

    Row 1 sum: Row 2 sum:

    • Spectral norm (-norm | Maximum Euclidean stretching): The maximum amount by which the matrix stretches a vector in the Euclidean norm. It is computed using the square root of the largest eigenvalue of .

      where denotes the largest eigenvalue.

Example: A Simple Stretching Matrix

Vector 1: Pointing along the -axis

								 $v = \begin{pmatrix} 1 \\ 0 \end{pmatrix}$
  • Original length:

  • Multiply by :

  • New length:

  • Stretching factor: Vector 2: Pointing along the -axis

      							 $v = \begin{pmatrix} 0 \\ 1 \end{pmatrix}$
    
  • Original length:

  • Multiply by :

  • New length:

  • Stretching factor:

Vector 3: Pointing diagonally

								 $v = \begin{pmatrix} 1 \\ 1 \end{pmatrix}$
  • Original length:

  • Multiply by :

  • New length:

  • Stretching factor:

The maximum stretching factor is 2.

Instead of testing infinitely many vectors to find which one stretches the most, linear algebra guarantees that the maximum stretch factor is always:

The eigenvalues () of this diagonal matrix are simply its diagonal entries: and .

The largest eigenvalue is . Placed back into our formula:

The notation tells you:

We are measuring how much stretches vectors, where the input vector’s original length is measured with norm , and the resulting output vector’s length is measured with norm .

For example, suppose is a matrix.

  • The input vector has 100 dimensions. We might choose to measure its length using the norm (Manhattan distance). So we use .
  • The output vector has only 3 dimensions. We might choose to measure its length using the standard norm (Euclidean distance). So we use .

Because is the maximum stretching factor, for every non-zero vector we have:

Example : with Euclidean norm ()

  • Input length:
  • Output vector:
  • Output length: if is shortened simply to:

Bounding Errors & The Condition Number

However, our measurements for are rarely perfect. Suppose there is some noise or measurement error , which causes an error in our calculated solution . The actual system we solve is:

How much does the error in our input () blow up in our output ()? We can use induced matrix norms to find out.

  1. Because and , the error:
  2. Taking the norm on both sides and using the property of induced norms ():
  3. Similarly, taking the norm of our original system gives:
  4. Now, we multiply these two inequalities together to look at the relative error (the size of the error compared to the size of the actual vector): The Condition Number The term is the condition number of a matrix, denoted by :
  • If is small (close to 1): The matrix is β€œwell-conditioned.” A small error in your data will result in a small error in your solution .
  • If is large (e.g., ): The matrix is β€œill-conditioned.” Even a tiny fluctuation in your input data can completely ruin your output solution.

Norms for functions

is a vector space where the β€œvectors” themselves are actually functions:

All functions whose -norm is finite (function doesn’t blow up to infinity when you integrate it). For , the norm of a function is defined as:

Example: Computing the Norm Let’s find the β€œlength” of the linear function over the domain under the norm:

The Infinity Norm () When , the norm is defined using the supremum ():

The norm is simply the highest absolute peak the function reaches anywhere on its domain . (For well-behaved continuous functions, the supremum is just the maximum value).

Example: over the domain . Looking across the entire interval, the absolute value reaches its highest point at the boundaries and : is the absolute maximum value the function achieves on this interval