Because you've already worked with curves, you're ready to expand your understanding of limits and derivatives to vector functions. In this topic, you'll explore these concepts and discover they are incredibly simple to calculate.
Actually, you don't need to master new derivation techniques; you just need to use what you already learned. In this section, you'll also become familiar with new properties and start applying them immediately.
Limits and continuity
A vector function in is a function from into . To make things simpler, you'll be working with , but keep in mind that the results can apply to greater dimensions. The component functions of a vector function are represented by:
Now, let's apply the basic principles of calculus to vector functions. The limit of at a time is very similar your past understanding. It's the vector that gets closer to as approaches , if it exists. In particular, is said to be continuous at if .
The rigorous definition (optional)
If you are familiar with the rigorous definition of limit for real-valued functions, you might have noticed that the key concept is distance. is the limit if the difference between it and can be minimized by bringing closer to . Since you know how to calculate the distance between vectors, the definition should be straightforward:
is the limit of at if for any there is a such that assures that .
A critical feature of limits is that they can be calculated for each entry.
To be more specific, has a limit at if and only if each of its components has a limit at ; in any case, the limit can be calculated entry-wise:
Hopefully, this relaxes you. You don't have to learn new techniques to calculate the limits of vector functions. Let's take the example of a function given by:
Since the component functions are continuous, it turns out that is also continuous. As an easy example, its limit at is:
Derivatives
Vector functions represent curves in space. Similar to real-valued functions, it's intuitive to try to understand the tangent line at any point on the curve. Luckily, everything works smoothly and the derivative's definition remains almost unaltered:
How can you interpret this geometrically? You aim to find the tangent line at . At time , the curve is at . So, is a secant vector to the curve:
It seems that the scaled vector approaches the tangent vector as . Consequently, when the limit exists, is known as the tangent vector to the curve traced by at . In physics, the tangent vector is understood as the velocity vector and its length as the speed. Similarly, you can interpret , the derivative of , as the acceleration at that time.
The tangent line to the curve defined by at is the line parallel to and it passes through .
That was pretty simple, right? But there's even more, Since you can calculate the limits entry-wise, computing the derivative becomes straightforward:
In simple terms, derive each component and you're done! Let's examine one of the most well-known curves, the helix. Its parametric equations are:
Set aside the last coordinate for a moment. The first two are the parametric equations of the unit circle you are familiar with. Then, as time passes, these coordinates just rotate around this circle in a counterclockwise direction. Now let's return to the last coordinate. It's simple, as it's identical to the time . Because this coordinate indicates height in space, its parametric equation indicates that the curve increases its height uniformly while rotating on the unit circle:
As the component functions of the helix are differentiable at any point, the derivative of the curve at any time is simply:
So, at time the curve is at point
and its tangent vector is
Properties
The vector derivative seems to behave much like the ordinary derivative. This happens most of the time and it also inherits all the desirable properties that allow you to manipulate it with ease.
Take two vector functions and , a real-valued function and a number . Then, the basic properties hold:
Of course the last property is the chain rule. As an example of the fourth property consider the following functions:
Since their derivatives are
you get that:
A curious fact of vectorial functions is that when they lie in a sphere, its derivative it's perpendicular to it. In other words, if is constant for any , then . Let's discover why using the properties of the derivative!
First, note that as is constant, is also true that is constant for any time. But , so the real-valued function must be constant, and this implies that its derivative is :
On the other hand, the forth property says that:
Connecting both parts you get that:
And finally .
Applications in machine learning
Vector derivatives look a bit abstract at the beginning. Apart from geometry and physics they don't seem to have other applications, but don't judge a book by its cover. When you're specifically looking at the application of derivatives of curves, or functions from time to space, in machine learning, you're often dealing with concepts that involve the evolution of certain quantities over time and how they change. Here are some nice applications in machine learning that relate to the derivative of such curves:
-
Time-Series Analysis: In machine learning, time-series data is a sequence of data points indexed in time order. Derivatives can be used to analyze the rate of change of features over time, which can be crucial for forecasting and understanding trends and seasonality. For example, the first derivative can tell you about the trend, while the second derivative can inform you about the concavity of the time-series curve, indicating acceleration or deceleration in the trend.
-
Trajectory Optimization: In robotics and autonomous systems, machine learning models often need to predict and optimize trajectories over time. The derivative of a trajectory with respect to time gives velocity, and the second derivative gives acceleration. These derivatives are essential for planning and control algorithms that ensure smooth and efficient movements of robots or autonomous vehicles.
-
Signal Processing: Derivatives of signals with respect to time, such as in audio or other sensor data, can be used to extract features that are fed into machine learning models for classification, clustering, or anomaly detection tasks. For example, the derivative of an audio waveform can be used to identify the onset of sounds, which is useful in speech recognition and music analysis.
-
Recurrent Neural Networks (RNNs): RNNs are a class of neural networks that are explicitly designed to handle sequence data. When training RNNs, the derivatives of the loss function with respect to the elements of the sequence are computed through time, using a technique called Backpropagation Through Time (BPTT). This involves taking the derivative of curves that represent the loss as a function of network parameters at each time step.
Conclusion
Take two vectorial functions and , a real-valued function and a number .
-
The limit of a vectorial function can be calculated entry wise:
-
The derivative of at is defined as:
-
The derivative is got entry wise:
-
-