diff --git a/Gram-matrix-parameterization.md b/Gram-matrix-parameterization.md index e8d7cfc..d1ba10b 100644 --- a/Gram-matrix-parameterization.md +++ b/Gram-matrix-parameterization.md @@ -1,12 +1,12 @@ -## Linear representation of constructions and constraints +## Linear representation of elements and constraints -### Construction elements as vectors +### Elements as vectors Take a 5d vector space $V$ with a bilinear form $(\_\!\_, \_\!\_)$ of signature $++++-$, which we'll call the *Lorentz form*. In [inversive coordinates](https://code.studioinfinity.org/glen/dyna3/src/branch/main/notes/inversive.md), points and generalized spheres are represented, respectively, by timelike and spacelike vectors in $V$. If we normalize these vectors to pseudo-length $\pm 1$, and choose a vector on the lightlike 1d subspace representing the point at infinity, a lot of the constraints we care about can be expressed by fixing the Lorentz products between vectors. ### Constraints as Gram matrix entries -The vectors $a_1, \ldots, a_n \in V$ representing the elements of our construction can be encoded in the linear map $A \colon \mathbb{R}^n \to V$ with $Ae_j = a_j$ for each of the standard basis vectors $e_1, \ldots, e_n$. We can then express constraints by fixing elements of the Gram matrix $G = A^\dagger A$, where $\dagger$ is the adjoint with respect to the inner product $\langle\_\!\_, \_\!\_\rangle$ on $\mathbb{R}^n$ and the Lorentz form. Since the inner product and the Lorentz form are both non-degenerate, the rank of $G$ matches the dimension of the span of $a_1, \ldots, a_n$. +The vectors $a_1, \ldots, a_n \in V$ representing the elements of our assembly can be encoded in the linear map $A \colon \mathbb{R}^n \to V$ with $Ae_j = a_j$ for each of the standard basis vectors $e_1, \ldots, e_n$. We can then express constraints by fixing elements of the Gram matrix $G = A^\dagger A$, where $\dagger$ is the adjoint with respect to the inner product $\langle\_\!\_, \_\!\_\rangle$ on $\mathbb{R}^n$ and the Lorentz form. Since the inner product and the Lorentz form are both non-degenerate, the rank of $G$ matches the dimension of the span of $a_1, \ldots, a_n$. The symmetric bilinear form $\langle\_\!\_, G\_\!\_\rangle$ is the pullback of the Lorentz form along $A$: \[\begin{align*} \langle\_\!\_, G\_\!\_\rangle & = \langle\_\!\_, A^\dagger A\_\!\_\rangle \\ & = (A\_\!\_, A\_\!\_). \end{align*}\] @@ -15,15 +15,15 @@ The symmetric bilinear form $\langle\_\!\_, G\_\!\_\rangle$ is the pullback of t When we choose a basis for $V$, represented as an identification $V \cong \mathbb{R}^5$, the Lorentz form gets encoded in the matrix $Q \colon \mathbb{R}^5 \to \mathbb{R}^5$ defined by the relation $(\_\!\_, \_\!\_) = \langle\_\!\_, Q\_\!\_\rangle$. Using the fact that $A^\dagger = A^\top Q$, where $^\top$ is the adjoint with respect to the inner product $\langle\_\!\_, \_\!\_\rangle$ on both $\mathbb{R}^n$ and $V \cong \mathbb{R}^5$, we can express the Gram matrix $G = A^\top Q A$ in terms of positive-signature matrix operations. This expression is convenient for programming, because linear algebra packages tend to be written for positive signature. -## Reconstructing a construction from its Gram matrix +## Reconstructing an assembly from its Gram matrix ### Reconstruction as low-rank factorization #### Overview -We saw above that when we represent constructions as linear maps $A \colon \R^n \to V$, many constraints can be expressed by fixing entries of the Gram matrix $A^\dagger A$, which can be written more conveniently as $A^\top Q A$ when we choose an identification $V \cong \R^5$. This is an example of a *low-rank factorization* problem. In this section, we'll express the problem in a way that's useful for numerical computations. +We saw above that when we represent assemblies as linear maps $A \colon \R^n \to V$, many constraints can be expressed by fixing entries of the Gram matrix $A^\dagger A$, which can be written more conveniently as $A^\top Q A$ when we choose an identification $V \cong \R^5$. This is an example of a *low-rank factorization* problem. In this section, we'll express the problem in a way that's useful for numerical computations. -We'll find a non-negative function $f$ on the space of linear maps $\mathbb{R}^n \to V$ which vanishes at the matrices representing constructions that satisfy the constraints. Finding a global minimum of the *loss function* $f$ will be equivalent to finding a construction that satisfies the constraints. The loss function will be a quadratic polynomial in matrix entries, and its first and second derivatives will be straightforward to compute using a typical linear algebra package. This makes it easy to search for minima using Newton's method with backtracking. +We'll find a non-negative function $f$ on the space of linear maps $\mathbb{R}^n \to V$ which vanishes at the matrices representing assemblies that satisfy the constraints. Finding a global minimum of the *loss function* $f$ will be equivalent to finding an assembly that satisfies the constraints. The loss function will be a quadratic polynomial in matrix entries, and its first and second derivatives will be straightforward to compute using a typical linear algebra package. This makes it easy to search for minima using Newton's method with backtracking. #### The Frobenius product @@ -34,7 +34,7 @@ For any dimensions $n$ and $m$, the inner products on $\mathbb{R}^n$ and $\mathb Consider the matrices $\mathbb{R}^n \to \mathbb{R}^n$ whose entries vanish at the indices where the Gram matrix is unconstrained. They form a subspace $C$ of the matrix space $\operatorname{End}(\mathbb{R}^n)$. Let $\mathcal{P} \colon \operatorname{End}(\mathbb{R}^n) \to C$ be the orthogonal projection with respect to the Frobenius product. The constrained entries of the Gram matrix can be expressed uniquely as a matrix $G \in C$, and the linear maps $A \colon \mathbb{R}^n \to V$ that satisfy the constraints form the zero set of the non-negative function \[ f = \|G - \mathcal{P}(A^\top Q A)\|^2\] -on $\operatorname{Hom}(\mathbb{R}^n, V)$. Finding a global minimum of the *loss function* $f$ is thus equivalent to finding a construction that satisfies the constraints. +on $\operatorname{Hom}(\mathbb{R}^n, V)$. Finding a global minimum of the *loss function* $f$ is thus equivalent to finding an assembly that satisfies the constraints. #### The first derivative of the loss function