3 ms·
Most of the time, the objects you are actually interested on are not NxM grids of numbers, but linear functions. For simplicity, I will assume we are working wi
by gizmo686 5y ago
Most of the time, the objects you are actually interested on are not NxM grids of numbers, but linear functions. For simplicity, I will assume we are working with real numbers.
Suppose you have two linear functions:
f :: R3 -> R3
h :: R3 -> R2
and a point:
x :: R3
The first problem you have if you want to work with these functions is how to represent them. As it turns out, assuming you have a set of basis vectors, any linear function Rn -> Rm can be represented by exactly n * m real numbers. Further, if we arrange these numbers in a grid it is easy to fill in the grid if you know how the function acts on the basis vectors, and it is easy to read off how the function acts on the basis vectors from the grid.
Similarly, a point in Rn can be represented by exactly n real numbers. Again, this representation depends on a choice of basis vectors.
For simplicity, let [?] represent the matrix representation of ?.
The second problem you want to tackle is how to compute function application y = f(x). Given the representations defined above, y is the point in R3 that is represented by the result of the matrix multiplication [f][x].
The third problem you want to solve is how to compute the function composition g = f∘h. Again, g is the function given by the matrix representation [g] = [f][h]