May 2025
Intermediate to advanced
730 pages
20h 14m
English
Now that we understand the geometric structure of vector spaces, it’s time to put the theory into practice once again. In this chapter, we’ll take a hands-on look at norms, inner products, and NumPy array operations in general. Most importantly, we’ll also meet matrices for the first time.
The last time we translated theory to code, we left off at finding an ideal representation for vectors: NumPy arrays. NumPy is built for linear algebra and handles computations much faster than the vanilla Python objects.
So, let’s initialize two NumPy arrays to play around with!
import numpy as np
x = np.array([1.8, -4.5, 9.2, 7.3])
y = np.array([-5.2, -1.1, 0.7, 5.1])
In linear algebra, and in most of machine learning, ...
Read now
Unlock full access