Definition
- A set is a collection of (mathematical) elements.
- Sets are typically denoted by uppercase italic letters, such as and .
- Sets are a cornerstone of all mathematics, for example to define functions and probability distributions.
Discrete and continuous sets
A discrete set is a set of countable elements. We denote the discrete elements by .
Example
– (non-negative integers up to )
– (arbitrary elements)
– (d-dimensional binary space)
A continuous set is a set of connected (uncountable) numbers.
Example
– (all real numbers between 2 and 11)
– (the real line)
– (d-dimensional hypercube)
Conditioning a set
We can condition within a set by using : or |.
Example
The probability -simplex, which we use to define a discrete probability distribution over categories, is given by:
This means that in this space is a vector of length , consisting of entries between 0 and 1, with the restriction that the vector sums to 1.
Cardinality and dimensionality
We need to distinguish the cardinality and dimensionality of a set:
- The cardinality (size) counts the number of elements in a set, for which we write .
- The dimensionality counts the number of dimensions in the set/space , for which we write .
Example
– The discrete set has cardinality and dimensionality .
– The discrete space has cardinality and dimensionality .
Cartesian product
We can combine two sets/spaces by taking the Cartesian product, denoted by , which consist of all the possible combinations of elements in the first and second set:
We can also combine discrete and continuous spaces through Cartesian products.
Example
– Assume and . Then the Cartesian product .
– Assume and . Then the Cartesian product .