What Is a Vector?
A vector is two things at once: an ordered list of numbers AND an arrow in space. Same object, two ways to see it.
Imagine you record three neurons while a mouse looks at a dog. You measure their firing rates:
• Neuron 1 fires at 10 Hz
• Neuron 2 fires at 50 Hz
• Neuron 3 fires at 2 Hz
You can organize this as a vector: [10, 50, 2]. Each number is one neuron — one component. Because there are 3 neurons, this is a 3-dimensional vector.
You can also draw this as an arrow in space. Imagine a 3D plot where each axis is one neuron's firing rate. The arrow points to the spot (10, 50, 2). The whole arrow describes the state of the entire population at that moment.
import numpy as np
# Three neurons firing at different rates
firing_rates = np.array([10, 50, 2]) # Hz
print(firing_rates) # [10 50 2]
print(firing_rates[0]) # 10 — neuron 1
print(firing_rates[1]) # 50 — neuron 2
print(len(firing_rates)) # 3 — dimensionalitynp.array() is how you create vectors in Python. Index with [0], [1], [2] to get individual components.
Key vocab: component = one number in the vector (= one neuron's rate). Dimensionality = how many components (= how many neurons you recorded).