# The Slope of an Elliptic Curve (Formal Derivatives)

*Before we continue with our investigation of elliptic curves in a finite field, we need to clarify some important calculations, that will be used for adding and doubling values in a finite field, on an elliptic curve.*

### Formal Derivative

The concept of a "__formal derivative__" refers to a mathematical operation used primarily in the context of polynomials and power series. It provides a way to differentiate expressions symbolically, treating variables and coefficients purely algebraically without necessarily attributing specific numerical values or functions to them.

In its most basic form, the formal derivative of a polynomial:

*p(x) = a_n x^n + a_{n-1} x^{n-1} + ... + a_1 x + a_0*

is defined as:

*p'(x) = n a_n x^{n-1} + (n-1) a_{n-1} x^{n-2} + ... + a_1*

This operation mimics __the usual rules of differentiation__ (e.g., the power rule) but is conducted without considering the underlying __field__ or __real number__ properties of the coefficients *a_i* or the variable *x*. Instead, the focus is on manipulating __the structure of the polynomial__ itself.

The __formal derivative__ is a foundational tool in __algebra__ and __number theory__, particularly in the study of __polynomial rings__ and __fields__ (see introductory section, in this site, on __Sets, Groups, Rings, and Fields__). It allows mathematicians to explore properties such as __irreducibility__ and to construct __fields extensions__ in __algebraic number theory__.

### Formal Derivatives and Finite Fields

The __formal derivative__ is particularly valuable in contexts such as __elliptic curves over finite fields__ because it allows the computation of derivatives without invoking the concept of __limits__. This avoidance of limits is crucial because in finite fields, the usual notions of calculus, particularly those involving __limits and continuity__, do not apply due to the discrete nature of these fields.

In __classical calculus__, the derivative of a function at a point is __defined as the limit of the ratio of changes as the increment approaches zero__. This concept fundamentally relies on the properties of real numbers, specifically their ability to form __infinitesimally small quantities__. However, in a finite field, where the elements are limited and discrete, the concept of an infinitesimally small quantity does not exist, and hence, traditional definitions of derivatives via limits are not applicable.

The formal derivative sidesteps this issue by treating differentiation as a purely algebraic process:

**Algebraic Rule Applicatio**n: For a polynomial*p(x) = a_n x^n + a_{n-1} x^{n-1} + ... + a_1 x + a_0*over a finite field, the formal derivative is computed by applying algebraic rules such as the power rule. This yields*p'(x) = n a_n x^{n-1} + (n-1) a_{n-1} x^{n-2} + ... + a_1*, where each coefficient is multiplied by the exponent of the term, and the exponent is then decreased by one. This operation is purely symbolic and does not involve any infinitesimal processes or considerations of approaching zero.**Finite Field Application**: In the context of elliptic curves, which are often defined in the Weierstrass form, by equations such as*y^2 = x^3 + Ax + B*in finite fields, the formal derivative helps in computations like tangent calculations or finding slopes of lines at points on the curve. For instance, to find the slope of the tangent at a point on the curve, one would use the formal derivative of the polynomial representing the curve. Since the operations are algebraic, they remain valid in finite fields.

This capability of the formal derivative to operate within the algebraic structure of polynomials without recourse to limits makes it an indispensable tool in areas of mathematics where calculus-like operations are needed but the underlying field does not support the usual real-number-based calculus. This includes not just elliptic curves in finite fields but also other areas of algebraic geometry and number theory where the properties of polynomials and their roots are studied in discrete settings.

### Using the Formal Derivative on Elliptic Curves

The power rule is not the only rule that can be extended to finite fields, using the formal derivative.

Finding the formal derivative of an elliptic curve given in Weierstrass form involves using __partial derivatives__. To find the formal derivative at a point on this curve, we need to differentiate implicitly, since the equation involves both *x* and *y* interdependently.

### Differentiate implicitly with respect to *x*

Implicit function - given the equation (where *A* and *B* are constants):

differentiate both sides of the equation with respect to *x*. Using implicit differentiation, the derivative of *y^2* with respect to *x* is:

(applying the chain rule) - and the derivative of:

with respect to x is:

Setting the derivatives equal gives:

To find *dy/dx* (the formal derivative of the tangent line at any point on the curve), rearrange the equation:

This equation gives you the formal derivative of the tangent line at any point *(x, y)* on an elliptic curve in the Weierstrass form, provided that:

since dividing by zero is undefined.

**Note**: when defined in a Real field, as *y* approaches 0, *dy/dx* approaches infinity (and/or negative infinity) - and on the graph of an elliptic curve in the field of Reals, the smooth continuous nature of the curve means that the tangent to the curve at this point, *y = 0*, is a vertical line.

**Also note**: the equation yields two solutions, precisely because there are 2 points, each reflected across the *x-axis*, for any value of *x* on the curve, as *y^2 = (-y)^2* (when working with the Weierstrass form, as noted above).

## 留言