Showing posts with label non-singular. Show all posts
Showing posts with label non-singular. Show all posts

Wednesday, 8 April 2026

Singular Versus Non-Singular Elliptic Curves

I needed to clarify the difference between singular and non-singular elliptic curves. Figure 1 shows an example of a singular elliptic curve and Figure 2 shows an example of a non-singular elliptic curve. They differ only in the constant term.


Figure 1: \(y^2=x^3-3x+2\)


Figure 2:  \(y^2=x^3-3x-2\)

I asked Gemini to clarify:

Understanding Elliptic Curves:
Singular vs. Non-Singular and the Discriminant

The difference between singular and non-singular elliptic curves comes down to two main aspects: their geometric shape (how they look) and their algebraic properties (how their roots behave). To be a formal elliptic curve, the curve must be non-singular, meaning it is completely smooth and has no sharp points or self-intersections. Let's explore exactly why this happens and how the math behind it works.

1. The Geometric Difference: Smooth vs. Broken

An elliptic curve is typically defined by the short Weierstrass equation:

$$y^2 = x^3 + ax + b$$

Visually, the distinction relies on whether you can draw a unique, straight tangent line at every single point on the curve.

  • Non-Singular (Smooth): The curve flows perfectly without breaking. Every point on the curve has exactly one clear tangent line.
  • Singular (Node): The curve loops back and intersects itself, creating a shape that looks like a little ribbon or a fish. At the exact point where the lines cross (the node), there are two different tangent lines.
  • Singular (Cusp): The curve comes to a sharp, pinching point before turning around. At this sharp tip (the cusp), the tangent line is undefined or vertical in a way that breaks the curve's smooth flow.

2. The Algebraic Difference: The Roots and the Discriminant

Mathematically, whether a curve is smooth or singular is determined by the roots of the cubic polynomial on the right side of the equation: \(f(x) = x^3 + ax + b\).

For the curve to be non-singular, \(f(x)\) must have three distinct roots. If any roots are repeated, the curve becomes singular. We measure this using the discriminant (\(\Delta\)), which checks for repeated roots without forcing us to actually factor the polynomial:

$$\Delta = -16(4a^3 + 27b^2)$$

The discriminant categorizes the curve as follows:

  1. \(\Delta \neq 0\) (Non-Singular): There are no repeated roots. The curve is valid and smooth.
  2. \(\Delta = 0\) (Singular - Node): The polynomial has one root that repeats twice.
  3. \(\Delta = 0\) and \(a=b=0\) (Singular - Cusp): The polynomial has one root that repeats three times.

3. Deriving the Discriminant

How do we know that \(4a^3 + 27b^2\) is the exact expression to check for repeated roots? It comes from a core algebraic principle: finding the exact conditions under which a polynomial and its derivative share a common root.

When a polynomial has a repeated root (creating a singular node or cusp), its graph touches the x-axis without crossing it. At that exact touching point, two things are true: the value of the function is zero, and the slope of the tangent line (the derivative) is also zero.

Let’s look strictly at the cubic part of the equation: \(f(x) = x^3 + ax + b\) where \(f(x) \equiv y \) and \( \textbf{not} \)  \(y^2\). To find where the slope is zero, we take the first derivative: \(f'(x) = 3x^2 + a\). If the curve has a repeated root, we set both equal to zero and solve the system of equations.

Step 1: Solve the derivative for \(x^2\)

$$3x^2 + a = 0 \implies x^2 = -\frac{a}{3}$$

Step 2: Substitute this into the original polynomial

We know \(f(x) = 0\). We can rewrite \(x^3\) as \(x(x^2)\) and substitute our finding:

$$x\left(-\frac{a}{3}\right) + ax + b = 0$$

Combine the \(x\) terms:

$$\frac{2a}{3}x + b = 0 \implies x = -\frac{3b}{2a}$$

Step 3: Combine everything to find the condition

Take this new expression for \(x\), square it, and set it equal to our original \(x^2\) equation:

$$\left(-\frac{3b}{2a}\right)^2 = \frac{9b^2}{4a^2}$$

$$\frac{9b^2}{4a^2} = -\frac{a}{3}$$

Cross-multiply to clear the fractions and move everything to one side:

$$27b^2 = -4a^3$$

$$4a^3 + 27b^2 = 0$$

This expression is the core polynomial discriminant. If it equals zero, the curve is singular.

4. The Mystery of the "-16"

In the standard elliptic curve discriminant formula \(\Delta = -16(4a^3 + 27b^2)\), the \(-16\) multiplier often seems mysterious because it doesn't change whether the expression equals zero or not. Its origin lies in the general Weierstrass equation:

$$y^2 + a_1xy + a_3y = x^3 + a_2x^2 + a_4x + a_6$$

When calculating the discriminant for this complex general equation (often used in cryptography over different prime bases), the result is a very long polynomial. When mathematicians apply the algebraic transformations required to squash that long equation down into the short \(y^2 = x^3 + ax + b\) format, the math naturally factors out a \(-16\). This factor is kept in the definition so that the discriminant's properties remain perfectly consistent across all fields of mathematics, regardless of which version of the equation you are using.

5. Why Does This Matter? (The Group Law)

Elliptic curves are famously used in cryptography and number theory. This utility relies on the Group Law, a geometric way to "add" two points on the curve to find a third point. The rule states that a straight line drawn through any two points on an elliptic curve will intersect the curve at exactly one other point, which is then reflected across the x-axis.

If a curve has a node or a cusp, this mathematical machinery breaks down. If your line passes through a self-intersecting node, the math cannot determine a unique intersection point, and the addition fails. Because singular curves cannot sustain this group structure, algorithms naturally reject them to prevent invalid calculations.

Wednesday, 26 November 2025

Determinants of the 3 x 3 Matrix

Today's number, \( \textbf{27996} \) that defines my diurnal age has an interesting property that qualifies it for membership in OEIS A097401: Largest achievable determinant of a 3 x 3 matrix whose elements are 9 distinct nonnegative integers chosen from the range \( 0 \dots n\). In the case of 27996, \(n = 27\). The OEIS comments state that the configuration that achieves this largest value looks like this:$$ \begin{bmatrix} n & n-5 & 1 \\ 2 & n-1 & n-3 \\ n-4 & 0 & n-2 \end{bmatrix}$$The associated determinant is given by:$$ \begin{vmatrix} n & n-5 & 1 \\ 2 & n-1 & n-3 \\ n-4 & 0 & n-2 \end{vmatrix} = 2(n^3 - 9n^2 + 34n - 42) $$So in the case of \(n=27\) we have (permalink):$$ \begin{align} \begin{bmatrix} 27 & 22 & 1 \\ 2 & 26 & 24 \\ 23 & 0 & 25 \end{bmatrix} \rightarrow \begin{vmatrix} 27 & 22 & 1 \\ 2 & 26 & 24 \\ 23 & 0 & 25 \end{vmatrix}=27996 \end{align} $$Now the minimal value of \(n\) must be 8 in order to accommodate the nine digits from 0 to 8. This gives the following configuration for the maximum value of the determinant and if we add 1 to each entry we get the configuration for the digits from 1 to 9:$$ \begin{align} \begin{bmatrix} 8 & 3 & 1 \\ 2 & 7 & 5 \\ 4 & 0 & 6\end{bmatrix} \rightarrow \begin{vmatrix} 8 & 3 & 1 \\ 2 & 7 & 5 \\ 4 & 0 & 6 \end{vmatrix}=332 \\ \\  \begin{bmatrix} 9 & 4 & 2 \\ 3 & 8 & 6 \\ 5 & 1 & 7\end{bmatrix} \rightarrow \begin{vmatrix} 9 & 4 & 2 \\ 3 & 8 & 6 \\ 5 & 1 & 7 \end{vmatrix}=412 \end{align}$$Minimum values are easily determined because there is a fundamental property of matrices stating that swapping any two rows (or columns) reverses the sign of the determinant. So the minimal values of the determinants are just the negative values of the positive determinants. The members of OEIS A097401 are:

332, 528, 796, 1148, 1596, 2152, 2828, 3636, 4588, 5696, 6972, 8428, 10076, 11928, 13996, 16292, 18828, 21616, 24668, 27996, 31612, 35528, 39756, 44308, 49196, 54432, 60028, 65996, 72348, 79096, 86252, 93828, 101836, 110288, 119196, 128572

Gemini gives the following explanation of how this maximal configuration is arrived at:

The configuration of a $3 \times 3$ matrix using the digits 1 through 9 that yields the maximum determinant results in a value of 412.

Here is the optimal matrix configuration:

$$\begin{bmatrix} 9 & 4 & 2 \\ 3 & 8 & 6 \\ 5 & 1 & 7 \end{bmatrix}$$

How to Calculate the Determinant

To understand why this specific arrangement works, we can calculate the determinant using the Rule of Sarrus, which involves summing the products of the three downward diagonals and subtracting the products of the three upward diagonals.


1. The Positive Diagonals (Maximize these):

  • $9 \times 8 \times 7 = \mathbf{504}$

  • $4 \times 6 \times 5 = \mathbf{120}$

  • $2 \times 3 \times 1 = \mathbf{6}$

  • Sum of positives: $504 + 120 + 6 = \mathbf{630}$

2. The Negative Diagonals (Minimize these):

  • $2 \times 8 \times 5 = \mathbf{80}$

  • $4 \times 3 \times 7 = \mathbf{84}$

  • $9 \times 6 \times 1 = \mathbf{54}$

  • Sum of negatives: $80 + 84 + 54 = \mathbf{218}$

3. The Final Result:

$$\text{Determinant} = 630 - 218 = \mathbf{412}$$

The Strategy Behind the Solution

To achieve this maximum value, you cannot simply place numbers randomly. You must use a Grouping Strategy to exploit the math behind determinants:

  1. Group the Numbers: Divide the digits into three tiers:

    • Large: $\{9, 8, 7\}$

    • Medium: $\{6, 5, 4\}$

    • Small: $\{3, 2, 1\}$

  2. Maximize Positive Diagonals: You want the largest numbers to multiply each other.

    • We placed the Large group $(9, 8, 7)$ on the main diagonal to get the massive product of $504$.

    • We placed the Medium group $(6, 5, 4)$ on the next positive diagonal.

    • We sacrificed the Small group $(3, 2, 1)$ on the final positive diagonal.

  3. Minimize Negative Diagonals: You want to avoid large numbers multiplying each other in the reverse direction. By carefully rotating the positions of the Medium and Small numbers, we ensured that every negative diagonal consists of a "mixed" product (one Large, one Medium, and one Small number), preventing any single negative term from becoming too large.

GoalDeterminant ValueStrategy
Maximum412Maximize main diagonal products; minimize off-diagonal products.
Minimum-412Swap two rows of the Maximum matrix.
Smallest Magnitude0Use rows that are linearly dependent (e.g., $1,2,3$ and $4,5,6$ and $7,8,9$).
The configuration that produces the determinant closest to zero is the sequential order (or any arithmetic progression), which results in a determinant of 0.

If you specifically require a non-zero (non-singular) result, the minimum possible magnitude is 1.

Here are the configurations for both scenarios:

1. The Singular Solution (Determinant = 0)

This is the absolute closest you can get to zero.

$$\begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix}$$

Why this happens:

In this matrix, the rows form an arithmetic progression (each number increases by 1).

  • Row 2 is just Row 1 with 3 added to every element.

  • Row 3 is just Row 2 with 3 added to every element.

    In linear algebra terms, these rows are linearly dependent. If you subtract Row 1 from Row 2, and Row 2 from Row 3, you get identical rows of $(3, 3, 3)$, which collapses the determinant to zero.


2. The Non-Singular Solution (Determinant $\approx 0$)

If you need the matrix to be invertible (non-zero determinant), you want to break the perfect symmetry of the zero-matrix just enough to get a value of 1 or -1 (or very close to it).

Here is a configuration that yields a determinant of -2:

$$\begin{bmatrix} 1 & 2 & 5 \\ 3 & 4 & 6 \\ 7 & 8 & 9 \end{bmatrix}$$

Calculation:

  • $1(36 - 48) - 2(27 - 42) + 5(24 - 28)$

  • $1(-12) - 2(-15) + 5(-4)$

  • $-12 + 30 - 20 = \mathbf{-2}$

(Note: It is possible to find arrangements that result in 1, but they are rare "needles in a haystack" among the 362,880 possible permutations. The value of -2 is an excellent example of a near-singular matrix.)

Summary Table

GoalDeterminantConfiguration Strategy
Absolute Closest0Use sequential numbers (1,2,3 / 4,5,6...) to create linear dependence.
Smallest Non-Zero$\pm$ 1 or 2Use the sequential matrix but swap one or two "Small" numbers with "Medium" ones to slightly break the pattern