~/writing/math-foundations-for-reasoning-models $ ls
Vectors as Data
Scalar
A scalar is a single value used to measure amount, size, weight, or intensity.
~/writing/math-foundations-for-reasoning-models $ cat topic.md
Scalar
Definition
A scalar is a single value.
Examples:
5
-2
0.75
100
A scalar can represent one measurable quantity:
age = 30
price = 12
temperature = 70
count = 5
Scalar = one value.
Why Scalars Matter
Scalars are the simplest numerical objects.
They answer questions like:
How many?
How much?
How large?
How strong?
Examples:
5 items
3 steps
0.8 probability
12 dollars
A scalar captures one quantity at a time.
Scalar vs Symbol
A symbol is a mark.
A scalar is a value represented by a mark.
Example:
"5" = symbol
5 = scalar value
The written symbol "5" is not the quantity itself.
It is the representation of a scalar.
Symbols represent values. Scalars are one kind of value.
Scalar vs Vector
A scalar has one value.
A vector has multiple values arranged together.
Example:
Scalar: 5
Vector: [5, 2, 9]
The scalar 5 describes one quantity.
The vector [5, 2, 9] describes three quantities as one object.
Scalar = one number. Vector = ordered collection of numbers.
Scalars Can Scale
A scalar can multiply another value.
Example:
3 * 5 = 15
Here, 3 changes the size of 5.
The same idea will later apply to vectors:
3 * [2, 4] = [6, 12]
The scalar changes the size of each component.
A scalar can act as a size-changing factor.
Scalars In Computation
Scalars can be:
- inputs
- outputs
- stored values
- rule parameters
Example:
Input: 5
Rule: add 2
Output: 7
Each value is a scalar.
Scalar computation is computation over single values.
Why This Comes Before Vectors
Vectors are built from scalars.
Example:
[2, 4, 6]
This vector contains three scalar values:
2
4
6
Before understanding vectors as structured data, the basic unit has to be clear.
Scalars are the numerical parts that vectors organize.
Final Summary
- A scalar is a single value.
- Scalars measure one quantity.
- A symbol can represent a scalar.
- A vector is made from multiple scalars.
- Scalars can scale other values.
- Scalars can appear as inputs, outputs, memory, or rule parameters.
~/writing/math-foundations-for-reasoning-models $ open
Continue the series.
Vector