{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Polynomial Invariants\n",
"\n",
"The goal of these notes is to work through several examples of polynomial\n",
"invariants, constructed from the symmetries of platonic solids.\n",
"\n",
"After building up some preliminary results for the tetrahedron and octahedron,\n",
"corresponding expressions for the icosahedron and dodecahedron are constructed\n",
"using the former results as building blocks."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Preliminaries\n",
"\n",
"Rotation (in three dimensions) of the vector ${\\bf r}$ about the direction $\\hat{\\bf n}$ by an angle $\\theta$:\n",
"\n",
"$$\n",
"{\\bf r}' = {\\bf r}\\,\\cos\\theta + ({\\bf r}\\cdot\\hat{\\bf n}) \\hat{\\bf n}\\, (1 - \\cos\\theta) - {\\bf r} \\times \\hat{\\bf n} \\, \\sin\\theta\n",
"$$\n",
"\n",
"or, in components,\n",
"\n",
"$$\n",
"\\begin{align*}\n",
"r'^i &= \\left[{\\delta^i}_j\\,\\cos\\theta + n^in_j\\,(1-\\cos\\theta)-{\\epsilon^i}_{jk}\\,n^k\\,\\sin\\theta\\right] r^j \\\\\n",
":&= {\\mathcal O^i}_j\\,r^j \\,.\n",
"\\end{align*}\n",
"$$\n",
"\n",
"Introducing the variables \n",
"\n",
"$$\n",
"a_i = n_i\\,\\sin\\left(\\theta/2\\right) \\,,\\quad d:= \\cos\\left(\\theta /2\\right) \\,,\n",
"$$\n",
"\n",
"we see the rotation matrix ${{\\mathcal O}^i}_j$ can be rewritten as follows:\n",
"\n",
"$$\n",
"{{\\mathcal O}^i}_j = \\left(2\\,d^2 -1\\right){\\delta^i}_j+ 2\\left( a^i\\,a_j - {\\epsilon^i}_{jk}\\,a^k\\,d\\right) \\,.\n",
"$$\n",
"(Recall that $\\cos\\theta = 2\\,\\cos^2\\left(\\theta/2\\right) -1 = 1-2\\,\\sin^2\\left(\\theta/2\\right)$ and that $\\sin\\theta = 2\\,\\sin\\left(\\theta/2\\right)\\,\\cos\\left(\\theta/2\\right)$.)\n",
"\n",
"The orthogonality of ${\\mathcal O}$ can be verified by computing ${\\mathcal O_k}^i\\,{\\mathcal O^k}_j$ using the expression above, which gives\n",
"\n",
"$$\n",
"{({\\mathcal O}^T {\\mathcal O})^i}_j = {\\delta^i}_j + 4\\left(d^2 + {\\bf a}^2 -1\\right)\\left(d^2 \\,{\\delta^i}_j + \n",
"a^ia_j\\right) = {\\delta^i}_j\n",
"$$\n",
"where the second equality follows from the definition of ${\\bf a}$ and $d$, along with the trig identity $\\sin^2\\left(\\theta/2\\right) + \\cos^2\\left(\\theta/2\\right) = 1$ which enforces the constraint\n",
"\n",
"$$\n",
"{\\bf a}^2 + d^2 = 1 \\,.\n",
"$$"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"# Imports\n",
"from functools import reduce\n",
"from sympy import I, Matrix, conjugate, expand, simplify, sqrt, symbols"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/latex": [
"$\\displaystyle \\left[\\begin{matrix}1 & 0 & 0\\\\0 & 1 & 0\\\\0 & 0 & 1\\end{matrix}\\right]$"
],
"text/plain": [
"Matrix([\n",
"[1, 0, 0],\n",
"[0, 1, 0],\n",
"[0, 0, 1]])"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Check of the above:\n",
"a1, b1, c1, d1 = symbols(\"a1 b1 c1 d1\")\n",
"\n",
"\n",
"def o_mat(a, b, c, d):\n",
" return Matrix(\n",
" [\n",
" [2 * d**2 - 1 + 2 * a**2, 2 * (a * b - c * d), 2 * (a * c + b * d)],\n",
" [2 * (a * b + c * d), 2 * d**2 - 1 + 2 * b**2, 2 * (b * c - a * d)],\n",
" [2 * (a * c - b * d), 2 * (b * c + a * d), 2 * d**2 - 1 + 2 * c**2],\n",
" ]\n",
" )\n",
"\n",
"\n",
"O1 = o_mat(a1, b1, c1, d1)\n",
"expand((O1 * O1.transpose()).subs(d1, sqrt(1 - a1**2 - b1**2 - c1**2)))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Two such rotations can be composed as follows:\n",
"\n",
"$$\n",
"\n",
"{\\mathcal O}_C := {\\mathcal O}_B \\cdot {\\mathcal O}_A\n",
"\n",
"$$\n",
"\n",
"where, if ${\\mathcal O}_A = {\\mathcal O}_A({\\bf a}_A, d_A)$ and ${\\mathcal O}_B = {\\cal\n",
"O}_B({\\bf a}_B, d_B)$ then ${\\mathcal O}_C = {\\mathcal O}_C({\\bf a}_C, d_C)$ with\n",
"\n",
"$$\n",
"\n",
"\\begin{align*}\n",
"a_{1C} &= a_{1A} d_B + a_{1B} d_A - a_{2A} a_{3B} + a_{2B} a_{3A} \\\\\n",
"a_{2C} &= a_{2A} d_B + a_{2B} d_A - a_{3A} a_{1B} + a_{3B} a_{1A} \\\\\n",
"a_{3C} &= a_{3A} d_B + a_{3B} d_A - a_{1A} a_{2B} + a_{1B} a_{2A} \\\\\n",
"d_C &= -a_{1A} a_{1B} - a_{2A} a_{2B} - a_{3A} a_{3B} + d_A d_B \\,.\n",
"\\end{align*}\n",
"\n",
"$$"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/latex": [
"$\\displaystyle \\left[\\begin{matrix}0 & 0 & 0\\\\0 & 0 & 0\\\\0 & 0 & 0\\end{matrix}\\right]$"
],
"text/plain": [
"Matrix([\n",
"[0, 0, 0],\n",
"[0, 0, 0],\n",
"[0, 0, 0]])"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Check of the above:\n",
"a2, b2, c2, d2 = symbols(\"a2 b2 c2 d2\")\n",
"O2 = o_mat(a2, b2, c2, d2)\n",
"\n",
"expand(\n",
" (\n",
" O2 * O1\n",
" - o_mat(\n",
" a1 * d2 + a2 * d1 - b1 * c2 + b2 * c1,\n",
" b1 * d2 + b2 * d1 - c1 * a2 + c2 * a1,\n",
" c1 * d2 + c2 * d1 - a1 * b2 + a2 * b1,\n",
" -a1 * a2 - b1 * b2 - c1 * c2 + d1 * d2,\n",
" )\n",
" )\n",
" .subs(d1, sqrt(1 - a1**2 - b1**2 - c1**2))\n",
" .subs(d2, sqrt(1 - a2**2 - b2**2 - c2**2))\n",
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Stereographic Projection\n",
"\n",
"In what follows, it's helpful to map the rotations on the sphere to the complex\n",
"plane, by performing an equatorial spherical projection from the point where\n",
"$\\hat{\\bf n} = (0, 0, 1)$ down onto the complex plane. Denoting a general point\n",
"on the unit sphere as $\\hat{\\bf r} = (\\xi,\\eta,\\zeta)$ in the general case, and\n",
"writing $z = x + iy$ with real and imaginary axes parallel to the $(\\xi \\eta)$\n",
"plane, we find (using similar triangles) that\n",
"\n",
"$$\n",
"z = x + i\\, y = \\frac{\\xi +i\\,\\eta}{1-\\zeta} \\,.\n",
"$$\n",
"\n",
"Inverting, we find\n",
"\n",
"$$ \n",
"\n",
"\\xi = \\frac{z + \\bar{z}}r \\,,\\quad \\eta = \\frac{i(\\bar{z} - z)}r \\,,\\quad\n",
"\\zeta = \\frac{z\\bar{z} -1}r \n",
"\n",
"$$\n",
"\n",
"where we define $r := 1 + z\\bar{z}$."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"Rotations about the $\\zeta$-axis are particularly simple in this representation,\n",
"as they correspond to multiplying $z$ by a pure phase:\n",
"\n",
"$$ \n",
"\n",
"z \\to z' = e^{i\\theta} \\, z \\quad\\leftrightarrow\\quad \\begin{array}{cc}\\xi' &=\n",
"\\xi\\,\\cos\\theta\n",
"- \\eta\\,\\sin\\theta\\\\\n",
"\\eta' &= \\xi\\,\\sin\\theta + \\eta\\,\\cos\\theta\n",
"\\end{array}\\,. \n",
"\n",
"$$\n",
"\n",
"If we wish to write an arbitrary rotation of a point on the sphere about some\n",
"direction specified by $\\hat{\\bf n}$, $\\theta$ (or, equivalently, ${\\bf a}$,\n",
"$d$), we can leverage the simplicity of the above by noting that the rotation\n",
"leaves the antipodal points $z_1=0$, $z_2=\\infty$ fixed, and that a more general\n",
"rotation about the direction $\\hat{\\bf n}$ should do the same for the points\n",
"\n",
"$$\n",
"\n",
"z_1 = \\frac{n_1+i\\,n_2}{1-n_3} \\,,\\quad z_2 = \\frac{-n_1-i\\,n_2}{1+n_3} \\,,\n",
"\n",
"$$\n",
"\n",
"which satisfy the antipodal relation $z_1\\,\\bar z_2 = -1$, as well as the\n",
"following other useful relations:\n",
"\n",
"$$\n",
"\n",
"\\tfrac{z_1 + z_2}{z_1 - z_2} = n_3 \\,,\\quad \\tfrac{2 z_1 z_2}{z_2 - z_1} = n_1 +\n",
"i\\,n_2 \\,,\\quad \\frac2{z_1 - z_2} = n_1 -i\\,n_2\\,.\n",
"\n",
"$$"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"# Check of the above\n",
"n1, n2, n3 = symbols(\"n1 n2 n3\", real=True)\n",
"z1 = (n1 + I * n2) / (1 - n3)\n",
"z1A = (-n1 - I * n2) / (1 + n3)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/latex": [
"$\\displaystyle -1$"
],
"text/plain": [
"-1"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"simplify((z1 * conjugate(z1A)).subs(n3, sqrt(1 - n1**2 - n2**2)))"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/latex": [
"$\\displaystyle n_{3}$"
],
"text/plain": [
"n3"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"simplify((z1 + z1A) / (z1 - z1A))"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"text/latex": [
"$\\displaystyle n_{1} + i n_{2}$"
],
"text/plain": [
"n1 + I*n2"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"simplify((2 * z1 * z1A) / (z1A - z1))"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/latex": [
"$\\displaystyle n_{1} - i n_{2}$"
],
"text/plain": [
"n1 - I*n2"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"simplify((2 / (z1 - z1A)).subs(n3, sqrt(1 - n1**2 - n2**2)))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"As such, the rotation leaving such points fixed is\n",
"\n",
"$$\n",
"\n",
"\\frac{z'-z_2}{z'-z_1} = e^{i\\theta} \\,\\frac{z-z_2}{z-z_1} \\,.\n",
"\n",
"$$\n",
"\n",
"Solving for $z'$, the above general rotation can be expressed as\n",
"\n",
"$$\n",
"\\begin{aligned} \n",
"\n",
"z \\to z' &= \\frac{z\\left[(z_1 - z_2)\\cos(\\theta/2) + i\n",
"(z_1+z_2)\\,\\sin(\\theta/2)\\right]-2i\\sin(\\theta/2)z_1 z_2}{2z\\,i\\sin(\\theta/2) +\n",
"\\left[(z_1 - z_2)\\cos(\\theta/2)-i(z_1+z_2)\\sin(\\theta/2)\\right]} \\\\\n",
"&= \\frac{(d+i\\,a_3)z - (a_2-i\\,a_1)}{(a_2+i\\,a_1)z + (d-i\\,a_3)}\n",
"\n",
"\\end{aligned}\n",
"\n",
"$$\n",
"\n",
"where we make use of the notation introduced above which interrelates\n",
"$\\{\\hat{\\bf n}, \\theta\\}$ with $\\{{\\bf a}, d\\}$. (The above can be readily\n",
"checked by substituting $\\hat {\\bf r}' =(\\xi',\\eta',\\zeta') = {\\mathcal O} \\cdot\n",
"\\hat{\\bf r}$ into the expression $z' = (\\xi' + i\\,\\eta')/(1-\\zeta')$.)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Fractionalized Coordinates\n",
"\n",
"Lastly, to re-interpret the above transformation in the complex plane as a\n",
"homogeneous one, it is conventional to write $z$ in terms of its numerator and\n",
"denominator in projective coordinates:\n",
"\n",
"$$\n",
"\n",
"z = \\frac uv \\,.\n",
"\n",
"$$\n",
"\n",
"In terms of $u$, $v$, the transformation above is given by\n",
"\n",
"$$\n",
"\n",
"\\begin{align*}\n",
"u' &= (d+i\\,a_3)u - (a_2-i\\,a_1)v \\\\\n",
"v' &= (a_2+i\\,a_1)u + (d-i\\,a_3) v \\,.\n",
"\\end{align*}\n",
"\n",
"$$\n",
"\n",
"In this space, the rotations described above are a subgroup of $\\mathbb{GL}(2,\n",
"\\mathbb{C})$ where the operator \n",
"\n",
"$$\n",
"\n",
"{\\mathcal O} = \\begin{pmatrix} A & B \\\\ C & D\\end{pmatrix} \\quad\\textrm{such that}\\quad\n",
"\\begin{pmatrix}u' \\\\ v'\\end{pmatrix} = \\mathcal O \\begin{pmatrix}u \\\\ v\\end{pmatrix}\n",
"\n",
"$$\n",
"\n",
"satisfies ${\\rm det}\\, {\\mathcal O} = 1$, $D = A^*$, $B = -C^*$. The inverse of such\n",
"a transformation is given by\n",
"\n",
"$$\n",
"\n",
"{\\mathcal O}^{-1} = \\begin{pmatrix} D & -B \\\\ -C & A\\end{pmatrix} \\,.\n",
"\n",
"$$"
]
}
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
}
},
"nbformat": 4,
"nbformat_minor": 2
}