Thinking in Dimensions
June 21, 2024 (7mo ago)
I used to think of linear algebra as just abstract math; vectors, matrices, and formulas that felt disconnected from reality. But now, as I apply them, they’ve become more than just numbers. Vectors are how I understand movement, data, and even thought. Circling back to the fundamentals, I now see how these mathematical tools shape the world around me; connecting physics, computation and the very way we process and interact with information.
Vectors
The traditional explanation for vectors is basically 'anything with magnitude and direction.' While this is true in many contexts, vectors can be understood from various perspectives depending on their application.
Physics: The Arrow in Space
Vectors are often represented as arrows pointing in space, defined by their magnitude and direction. These vectors don’t just live in two-dimensional space—they live in all dimensions, representing quantities like velocity, force, and momentum.
For instance, imagine you are pushing a box across the floor. You apply a force represented as a vector:
This vector tells you that you are applying a 5 Newton force along the x-axis. The magnitude is 5 N, and the direction is along the x-axis.
Now, picture a car moving with velocity :
This velocity vector tells you the car is moving at 10 meters per second along the x-axis. Vectors are indispensable in physics for representing how things move and interact in space.
Computer Science: Ordered Lists of Numbers
In Computer Science, vectors are often understood as ordered lists of numbers, which are crucial for representing and manipulating data in algorithms and data structures. Think of a vector like a set of neurons in the brain, where each number in the vector is like an individual neuron firing based on a certain stimulus. Just as neurons work together to process information, the numbers in a vector collectively help a machine process data.
For instance, imagine we want to represent the basic idea of someone's emotions in a vector. We could have a vector that represents happiness, sadness, and surprise, where each number in the vector represents the intensity of each emotion:
In this case:
- 0.9 represents a high intensity of happiness,
- 0.1 represents a low intensity of sadness,
- 0.5 represents a moderate intensity of surprise.
By manipulating such vectors, just like the brain processes sensory information, computers can analyze complex datasets. This helps with tasks such as pattern recognition (identifying common features in data), machine learning (training algorithms to make predictions), and data visualization (graphing and interpreting data). These vectors serve as a simple but powerful way to structure and work with data in computer science.
Mathematics: Manipulating Vectors
In mathematics, vectors are not just arrows or lists of numbers—they are tools used to perform calculations like adding, scaling, and comparing vectors.
-
Vector Addition: When you add two vectors, you simply add their corresponding components. For example, adding vectors and :
-
Scalar Multiplication: This is when you multiply a vector by a number (scalar). For example, multiplying vector by 2:
-
Dot Product: The dot product is a way to measure how much two vectors align with each other. For example, with and , the dot product is:
The dot product helps measure similarity, which is useful in areas like machine learning and physics, where understanding how vectors align is key to interpreting data or physical systems.
Space Manipulation: Navigating Space with Vectors
Vectors are essential when it comes to understanding space, whether it’s about location, movement, or forces.
For example, in 3D space, a vector like ( [3, 4, 5] ) could represent a point that’s 3 units along the x-axis, 4 along the y-axis, and 5 along the z-axis. This is how we define where something is in space.
Vectors also come into play when we need to change things around—like stretching or moving them. If you apply a scaling factor, say 2, to a vector ( [1, 1] ), you get ( [2, 2] ). This kind of transformation is used to resize or reshape objects, which happens a lot in graphics and animations.
Conceptualizing Numbers: Connecting Algebra to Geometry
At the heart of it, vectors are the link between numbers and space. The numbers inside a vector can represent how far and in which direction to move in a given space. And by doing simple math on these numbers, we can shift, rotate, or scale objects in space—something that happens regularly in game design, physics simulations, or 3D modeling.