<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Kyle M. Douglass (Posts about mathematics)</title><link>https://kylemdouglass.com/</link><description></description><atom:link href="https://kylemdouglass.com/categories/mathematics.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2025 &lt;a href="mailto:kyle.m.douglass@gmail.com"&gt;Kyle M. Douglass&lt;/a&gt; 
&lt;a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/"&gt;
&lt;img alt="Creative Commons License BY-NC-SA"
style="border-width:0; margin-bottom:12px;"
src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png"&gt;&lt;/a&gt;</copyright><lastBuildDate>Thu, 04 Sep 2025 08:50:15 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>The Axis of Symmetry of a Parabola and the Eigenvectors of its Matrix Representation</title><link>https://kylemdouglass.com/posts/the-axis-of-symmetry-of-a-parabola-and-the-eigenvectors-of-its-matrix-representation/</link><dc:creator>Kyle M. Douglass</dc:creator><description>&lt;p&gt;The last few months I have been working on developing parametric representations of conic sections so that any arbitrary conic can be drawn to the computer screen. Besides being a fun intellectual exercise, I expect that the performance of the parametric approach should be quite good relative to any iterative method for drawing implicit representations of arbitrary conic curves because no iteration is required.&lt;/p&gt;
&lt;p&gt;The parabola in particular has proven to be trickier than I had anticipated, and it has forced me to revisit some of its basic properties.&lt;/p&gt;
&lt;h2&gt;The Setup&lt;/h2&gt;
&lt;p&gt;Consider the most general form of a conic curve, which is the implicit equation:&lt;/p&gt;
&lt;p&gt;$$
Q ( x, y ) = A x^2 + B x y + C y^2 + D x + E y + F = 0
$$&lt;/p&gt;
&lt;p&gt;For a parabola, \( B \) is dependent on the coefficients \( A \) and \( C \) via the equation \( B^2 = 4 A C \), so that the implicit equation for a parabola is&lt;/p&gt;
&lt;p&gt;$$
Q ( x, y ) = (a x + c y)^2 + D x + E y + F = 0
$$&lt;/p&gt;
&lt;p&gt;where \( a^2 = A \) and \( c^2 = C \).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://math.stackexchange.com/questions/2042028/axis-of-symmetry-for-a-general-parabola"&gt;It can be shown&lt;/a&gt; that the axis of symmetry of the parabola is the line&lt;/p&gt;
&lt;p&gt;$$
a x + c y + \frac{a D + c E}{2 \left( a^2 + c^2 \right)} = 0
$$&lt;/p&gt;
&lt;p&gt;The matrix of the quadratic form for the parabola is&lt;/p&gt;
&lt;p&gt;$$\begin{eqnarray}
A_{33} = 
\left(
  \begin{array}{cc}
    A &amp;amp; B / 2 \\
    B / 2 &amp;amp; C
  \end{array}
\right) = \left(
  \begin{array}{cc}
    a^2 &amp;amp; ac \\
    ac &amp;amp; c^2
  \end{array}
\right)
\end{eqnarray}$$&lt;/p&gt;
&lt;p&gt;\( A_{33} \) is singular and has one eigenvalue whose value is 0.&lt;/p&gt;
&lt;p&gt;In this post I show that the eigenvector of the matrix of the quadratic form of a parabola with the zero eigenvalue is parallel to the axis of symmetry.&lt;/p&gt;
&lt;h2&gt;Determine the Eigenvalues of \( A_{33} \)&lt;/h2&gt;
&lt;p&gt;The characteristic polynomial of the matrix \( A_{33} \) is&lt;/p&gt;
&lt;p&gt;$$\begin{eqnarray}
  \left( a^2 - \lambda \right) \left( c^2 - \lambda \right) - a^2 c^2 &amp;amp;=&amp;amp; 0 \\
  a^2 c^2 - \left( a^2 + c^2 \right) \lambda + \lambda^2 - a^2 c^2 &amp;amp;=&amp;amp; 0 \\
  - \left( a^2 + c^2 \right) \lambda + \lambda^2 &amp;amp;=&amp;amp; 0
\end{eqnarray}$$&lt;/p&gt;
&lt;p&gt;The solutions to the above equation are \( \lambda = \{ 0, \, a^2 + c^2 \} \).&lt;/p&gt;
&lt;h2&gt;Find the Eigenvector of the Zero Eigenvalue&lt;/h2&gt;
&lt;p&gt;The system of equations for finding the eigenvectors is&lt;/p&gt;
&lt;p&gt;$$\begin{eqnarray}
  \left( a^2 - \lambda \right) x + acy &amp;amp;=&amp;amp; 0 \\
  acx + \left( c^2 - \lambda \right) y &amp;amp;=&amp;amp; 0
\end{eqnarray}$$&lt;/p&gt;
&lt;p&gt;Solving the first equation for \( y \) gives&lt;/p&gt;
&lt;p&gt;$$
y = - \left( \frac{a^2 - \lambda}{ac} \right) x
$$&lt;/p&gt;
&lt;p&gt;Substitute in \( \lambda = 0 \) to find&lt;/p&gt;
&lt;p&gt;$$
y = - \left( \frac{a}{c} \right) x
$$&lt;/p&gt;
&lt;p&gt;The eigenvector is thus&lt;/p&gt;
&lt;p&gt;$$\begin{pmatrix}
1 \\
-c / a
\end{pmatrix}$$&lt;/p&gt;
&lt;p&gt;Recall from above that the axis of symmetry is&lt;/p&gt;
&lt;p&gt;$$
a x + c y + \frac{a D + c E}{2 \left( a^2 + c^2 \right)} = 0
$$&lt;/p&gt;
&lt;p&gt;This is a line of slope \( m = -a / c \) and is therefore parallel to the eigenvector with the zero eigenvalue.&lt;/p&gt;
&lt;h2&gt;The Tangent at the Vertex and the Eigenvector with Non-Zero Eigenvalue&lt;/h2&gt;
&lt;p&gt;The tangent to the parabola at its vertex is perpendicular to the axis of symmetry and must therefore have a slope of \( c / a \)&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="https://kylemdouglass.com/posts/the-axis-of-symmetry-of-a-parabola-and-the-eigenvectors-of-its-matrix-representation/#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;p&gt;The eigenvector with eigenvalue \( \lambda = a^2 + c^2 \) of the matrix of the quadratic form is found by substituting this value into the first equation in the system above:&lt;/p&gt;
&lt;p&gt;$$\begin{eqnarray}
  \left( a^2 - \lambda \right) x + ac y &amp;amp;=&amp;amp; 0 \\
  -c^2 x + ac y &amp;amp;=&amp;amp; 0 
\end{eqnarray}$$&lt;/p&gt;
&lt;p&gt;This gives&lt;/p&gt;
&lt;p&gt;$$
y = \left( \frac{c}{a} \right) x
$$&lt;/p&gt;
&lt;p&gt;which is a line whose slope is the negative reciprocal of the slope of the axis of symmetry. The eigenvector with non-zero eigenvalue is therefore parallel to the tangent at the vertex.&lt;/p&gt;
&lt;p&gt;For completeness, the eigenvector with non-zero eigevalue is&lt;/p&gt;
&lt;p&gt;$$\begin{pmatrix}
1 \\
a / c
\end{pmatrix}$$&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Perpendicular lines have slopes whose product is equal to -1. &lt;a class="footnote-backref" href="https://kylemdouglass.com/posts/the-axis-of-symmetry-of-a-parabola-and-the-eigenvectors-of-its-matrix-representation/#fnref:1" title="Jump back to footnote 1 in the text"&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description><category>algebraic geometry</category><category>computer graphics</category><category>mathematics</category><guid>https://kylemdouglass.com/posts/the-axis-of-symmetry-of-a-parabola-and-the-eigenvectors-of-its-matrix-representation/</guid><pubDate>Thu, 04 Sep 2025 07:20:31 GMT</pubDate></item><item><title>Completing the Square and the Normal Form of Quadrics</title><link>https://kylemdouglass.com/posts/completing-the-square-and-normal-form-quadrics/</link><dc:creator>Kyle M. Douglass</dc:creator><description>&lt;p&gt;I am working on rendering cross section views of optical systems for my ray tracer. The problem is one of finding the intersection curve between a plane (the cutting plane) and a &lt;a href="https://en.wikipedia.org/wiki/Quadric"&gt;quadric surface&lt;/a&gt; which represents an interface between two media with different refractive indexes. Quadric surfaces are important primitives for modeling optical interfaces because they represent common surface types in optics, such as spheroids and paraboloids. A pair of quadrics, or a quadric and a plane, models a common lens.&lt;/p&gt;
&lt;p&gt;In 3D, the implicit surface equation for a quadric is&lt;/p&gt;
&lt;p&gt;$$
A x^2 + B y^2 + C z^2 + D x y + E y z + F x z + G x + H y + I z + J = 0
$$&lt;/p&gt;
&lt;p&gt;Any quadric can be reduced to a so-called &lt;a href="https://en.wikipedia.org/wiki/Quadric#Euclidean_space"&gt;normal form&lt;/a&gt; that identifies its class, i.e. ellipsoid, hyperbolic paraboloid, etc. Except for paraboloids, none of the normal form equations contain linear terms in \( x \), \( y \), or \( z \).&lt;/p&gt;
&lt;p&gt;A quadric of revolution occurs when two or more of the parameters of the the quadric's normal form are equal, such as \( x^2 / R^2 + y^2 / R^2 + z^2 / R^2 = 1 \), which is the equation for a spheroid with radius parameter \( R \)&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="https://kylemdouglass.com/posts/completing-the-square-and-normal-form-quadrics/#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt;. Quadrics of revolution are the surface types most-often encountered in optics&lt;sup id="fnref:2"&gt;&lt;a class="footnote-ref" href="https://kylemdouglass.com/posts/completing-the-square-and-normal-form-quadrics/#fn:2"&gt;2&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;p&gt;The surface sag of a quadric surface is a very important quantity for ray tracing. The sag of a quadric is usually given in terms of the &lt;a href="https://en.wikipedia.org/wiki/Conic_constant"&gt;conic constant&lt;/a&gt;, \( K \). One obtains the sag by solving the following quadric equation for \( z \):&lt;/p&gt;
&lt;p&gt;$$
x^2 + y^2 - 2 R z + ( K + 1 ) z^2 = 0
$$&lt;/p&gt;
&lt;p&gt;Here, \( R \) is the radius of curvature of the surface at its apex, \( x = y = z = 0 \).&lt;/p&gt;
&lt;p&gt;At this point I asked myself how I could rewrite the above expression in its normal form, and for a while I was unable to do it. After a bit of searching on the internet, I eventually realized that the solution involves &lt;a href="https://en.wikipedia.org/wiki/Completing_the_square"&gt;completing the square&lt;/a&gt;, a topic that was not given much attention during my high school education. After this exercise, I realize now that the purpose of completing the square is to essentially &lt;strong&gt;move any linear terms of a quadratic equation into squared parantheses&lt;/strong&gt;. This allows one to then remove the linear terms entirely by applying a suitable transformation, leaving only quadratic and constant terms.&lt;/p&gt;
&lt;h2&gt;Converting the Quadric to its Normal Form&lt;/h2&gt;
&lt;p&gt;The conversion of the above equation proceeds as follows. We first factor out \( ( K + 1 ) \) from the terms involving \( z \).&lt;/p&gt;
&lt;p&gt;$$
x^2 + y^2 + ( K + 1 ) \left[ z^2 - \frac{ 2 R z }{ K + 1 }\right] = 0
$$&lt;/p&gt;
&lt;p&gt;Next, we "add zero" to the term inside the square brackets by adding \( [ 2 R / 2 ( K + 1 ) ]^2 - [ 2 R / 2 ( K + 1 ) ]^2 = [ R / ( K + 1 ) ]^2 - [ R / ( K + 1 ) ]^2 \):&lt;/p&gt;
&lt;p&gt;$$
x^2 + y^2 + ( K + 1 ) \left[ z^2 - \frac{ 2 R z }{ K + 1 } + \left( \frac{ R }{ K + 1 } \right)^2 - \left( \frac{ R }{ K + 1 } \right)^2 \right] = 0
$$&lt;/p&gt;
&lt;p&gt;We can understand this a bit more generally by considering the expression \( z^2 - a z \). Here I need to add and subtract \( ( a / 2 )^2 \). The reason is that now we can rewrite the first three terms inside the square brackets as a squared binomial:&lt;/p&gt;
&lt;p&gt;$$
x^2 + y^2 + ( K + 1 ) \left[ \left( z - \frac{ R }{ K + 1 } \right)^2 - \left( \frac{ R } { K + 1 } \right)^2 \right] = 0
$$&lt;/p&gt;
&lt;p&gt;These last two steps complete the square. To place the equation into its normal form, I apply the Euclidean transformation \( z' = z - \frac{ R }{ K + 1 } \) and carry through the \( K + 1 \).&lt;/p&gt;
&lt;p&gt;$$
x^2 + y^2 + ( K + 1 ) z^{ \prime 2 } - R^2 / ( K + 1 ) = 0
$$&lt;/p&gt;
&lt;p&gt;The above equation is &lt;em&gt;almost&lt;/em&gt; a normal form expression for a quadric. To finish the job, I would need to substiute in a specific value for the conic constant and divide through so that the constant is either -1, 0, or 1.&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;The coefficients of each term need not be equal in general. &lt;a class="footnote-backref" href="https://kylemdouglass.com/posts/completing-the-square-and-normal-form-quadrics/#fnref:1" title="Jump back to footnote 1 in the text"&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;A cylindrical lens does actually contain a quadric, but rather would consist of at least one toroidal surface. These are less common than lenses with spherical profiles, however. &lt;a class="footnote-backref" href="https://kylemdouglass.com/posts/completing-the-square-and-normal-form-quadrics/#fnref:2" title="Jump back to footnote 2 in the text"&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description><category>algebra</category><category>algebraic geometry</category><category>mathematics</category><category>ray tracing</category><guid>https://kylemdouglass.com/posts/completing-the-square-and-normal-form-quadrics/</guid><pubDate>Mon, 07 Jul 2025 06:42:35 GMT</pubDate></item></channel></rss>