<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Analogical Engine</title>
	<atom:link href="http://analogical-engine.com/wordpress/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://analogical-engine.com/wordpress</link>
	<description>A math and haskell blog</description>
	<lastBuildDate>Fri, 03 Sep 2010 04:56:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Matrices and Determinants</title>
		<link>http://analogical-engine.com/wordpress/?p=519</link>
		<comments>http://analogical-engine.com/wordpress/?p=519#comments</comments>
		<pubDate>Thu, 02 Sep 2010 08:37:46 +0000</pubDate>
		<dc:creator>Robin</dc:creator>
				<category><![CDATA[Robin]]></category>

		<guid isPermaLink="false">http://analogical-engine.com/wordpress/?p=519</guid>
		<description><![CDATA[Let  denote an invertible  matrix, and let  denote its inverse.
Suppose that we are given a column vector  and that we wish to solve the equation  for the unknown vector .
Since  is invertible with inverse , this is equivalent to:

In co-ordinates:

This would be great if we had a nice expression [...]]]></description>
			<content:encoded><![CDATA[<p>Let <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_a8a36b86d245c75ec4b10560a67d8b0a.png"  class="tex" align="absmiddle" title="\textstyle \mathbf{A}"/> denote an invertible <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_1077d168bfce02996f08041b62210f9c.png"  class="tex" align="absmiddle" title="\textstyle n \times n"/> matrix, and let <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_cd4c6752ad4658e5a006b8c841afc1a7.png"  class="tex" align="absmiddle" title="\textstyle \mathbf{B}"/> denote its inverse.<br />
Suppose that we are given a column vector <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_4172af815921cb0ad447077477bb4b2a.png"  class="tex" align="absmiddle" title="\textstyle \mathbf{y}"/> and that we wish to solve the equation <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_a04ea2926736b028ade9c3329ce1f662.png"  class="tex" align="absmiddle" title="\textstyle \mathbf{A} \mathbf{x} = \mathbf{y}"/> for the unknown vector <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_454f589db729ecde5b17d277cc9e6ac1.png"  class="tex" align="absmiddle" title="\textstyle \mathbf{x}"/>.</p>
<p>Since <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_a8a36b86d245c75ec4b10560a67d8b0a.png"  class="tex" align="absmiddle" title="\textstyle \mathbf{A}"/> is invertible with inverse <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_cd4c6752ad4658e5a006b8c841afc1a7.png"  class="tex" align="absmiddle" title="\textstyle \mathbf{B}"/>, this is equivalent to:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_91f6e762b545be5fdf7d9bb48aa09009.png"  class="tex" align="absmiddle" title=" \mathbf{x} = \mathbf{B} \, \mathbf{y} " /></center><br />
In co-ordinates:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_1ba8659ac42d49c75c3a60fd3bc4685d.png"  class="tex" align="absmiddle" title=" x_k = \sum_j b_{kj} \, y_j " /></center><br />
This would be great if we had a nice expression for the inverse of a matrix.</p>
<p>Now, let <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_660e0c890ce56967405cb36f21dcee62.png"  class="tex" align="absmiddle" title="\textstyle \{ \mathbf{c_1}, \mathbf{c_2}, \ldots \mathbf{c_n} \}"/> denote the columns of <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_a8a36b86d245c75ec4b10560a67d8b0a.png"  class="tex" align="absmiddle" title="\textstyle \mathbf{A}"/>.<br />
That is:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_15094984b5459d47ead931ebec676ea6.png"  class="tex" align="absmiddle" title=" \mathbf{c_k} = \begin{bmatrix} a_{1k} \\ a_{2k}  \\ \cdots \\ a_{nk}  \end{bmatrix}  " /></center><br />
If <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_2e88b63d41a16d2bb7194a76e9e2ac00.png"  class="tex" align="absmiddle" title="\textstyle \{\mathbf{e_1}, \mathbf{e_2}, \ldots, \mathbf{e_n}\}"/> denotes the standard basis then:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_01ed5de944eb93389c96ec67d485b246.png"  class="tex" align="absmiddle" title=" \mathbf{c_k} = \mathbf{A} \, \mathbf{e_k} " /></center><br />
That is, the columns of the matrix <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_a8a36b86d245c75ec4b10560a67d8b0a.png"  class="tex" align="absmiddle" title="\textstyle \mathbf{A}"/> are the images of the standard basis vectors.</p>
<p>Another way of looking at the problem is as follows. By definition, we have:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_c1dc07646045e5e8b737d3c45ab719d1.png"  class="tex" align="absmiddle" title=" \mathbf{y} = y_1 \mathbf{e_1} + y_2 \mathbf{e_2} + \cdots + y_n \mathbf{e_n} " /></center><br />
To solve the equation <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_a04ea2926736b028ade9c3329ce1f662.png"  class="tex" align="absmiddle" title="\textstyle \mathbf{A} \mathbf{x} = \mathbf{y}"/> for <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_902af0c8c0f6d2420d0758ae016cdae6.png"  class="tex" align="absmiddle" title="\textstyle x"/> we must find unknowns <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_fe3516d5b77094861d2e7e532b281d0d.png"  class="tex" align="absmiddle" title="\textstyle \{x_1, x_2, \ldots, x_n \}"/> such that:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_520571d09c49b5774c3c4532fc7a999c.png"  class="tex" align="absmiddle" title=" \mathbf{y} = x_1 \mathbf{c_1} + x_2 \mathbf{c_2} + \cdots x_n \mathbf{c_n} " /></center></p>
<p>In other words, we are trying to find the co-ordinates of the vector <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_4172af815921cb0ad447077477bb4b2a.png"  class="tex" align="absmiddle" title="\textstyle \mathbf{y}"/> in terms of a new basis.</p>
<p>Recalling now that the determinant is multi-linear and anti-symmetric, consider the expression:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_8d75a9b87f350df8b65557f0064fa76f.png"  class="tex" align="absmiddle" title="<br />
\det  \left [ \begin{array}{c|c|c|c|c|c|c} \mathbf{c_1} &amp; \ldots &amp; \mathbf{c_{i-1}} &amp; \mathbf{y} &amp; \mathbf{c_{i+1}} &amp; \ldots &amp; \mathbf{c_n} \end{array} \right ] \\<br />
= \det  \left [ \begin{array}{c|c|c|c|c|c|c} \mathbf{c_1} &amp; \ldots &amp; \mathbf{c_{i-1}} &amp; \sum_k x_k \, \mathbf{c_k} &amp; \mathbf{c_{i+1}} &amp; \ldots &amp; \mathbf{c_n} \end{array} \right ]<br />
" /></center><br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_aecfc3bbe6d11fc9dfdfeaee944045b8.png"  class="tex" align="absmiddle" title="<br />
= \sum_k x_k  \det  \left [ \begin{array}{c|c|c|c|c|c|c} \mathbf{c_1} &amp; \ldots &amp; \mathbf{c_{i-1}} &amp; \mathbf{c_k} &amp; \mathbf{c_{i+1}} &amp; \ldots &amp; \mathbf{c_n} \end{array} \right ]<br />
" /></center><br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_b1808719b8cbb544d873d7546bb53d66.png"  class="tex" align="absmiddle" title="<br />
= x_i \det \mathbf{A}<br />
" /></center></p>
<p>Let us now rewrite the equation <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_20cb1dc71539b8fcaee907abe1a5ba55.png"  class="tex" align="absmiddle" title="\textstyle \mathbf{Ax} = \mathbf{y}"/> as the following &#8220;formal&#8221; determinant <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_46ba8c5d27a21b5b73b8f121bab67478.png"  class="tex" align="absmiddle" title="\textstyle \mathbf{F}"/>, which has entries in the first row the standard basis vectors, and additional &#8220;projective symbol&#8221; <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_b13f008a34144f2dae3c587ce58bc312.png"  class="tex" align="absmiddle" title="\textstyle \mathbf{z}"/>:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_39dd19b4e1f8371c64ee537915a2da20.png"  class="tex" align="absmiddle" title=" \mathbf{F} = \det \left [ \begin{array}{c:c:c:c|c} \mathbf{e_1} &amp; \mathbf{e_2} &amp; \cdots &amp; \mathbf{e_n} &amp; \mathbf{z} \\<br />
\hline<br />
a_{11} &amp; a_{12} &amp; . &amp; a_{1n} &amp; y_1 \\<br />
a_{21} &amp; a_{22} &amp; . &amp; a_{2n} &amp; y_2 \\<br />
. &amp; . &amp; . &amp; . &amp; . \\<br />
a_{n1} &amp; a_{n2} &amp; . &amp; a_{nn} &amp; y_n \\<br />
\end{array} \right ] " /></center></p>
<p>Expanding along the top row, whilst making use of the previous remark (and being careful with the signs), we get:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_031b149720f543cb76610c09b7dcccbf.png"  class="tex" align="absmiddle" title="<br />
= \sum_k (-1)^{k+1} \det \left [ \begin{array}{c|c|c|c|c|c|c} \mathbf{c_1} &amp; \ldots &amp; \mathbf{c_{k-1}} &amp; \mathbf{c_{k+1}} &amp; \ldots &amp; \mathbf{c_n} &amp; \mathbf{y} \end{array} \right ]\mathbf{e_k} + (-1)^{n+1}\det \mathbf{A} \, \mathbf{z}<br />
" /></center><br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_d1990e37cfe87e32897203c936d15b70.png"  class="tex" align="absmiddle" title="= (-1)^{n+1} \sum_k \det \left [ \begin{array}{c|c|c|c|c|c|c} \mathbf{c_1} &amp; \ldots &amp; \mathbf{c_{k-1}} &amp; \mathbf{y}&amp; \mathbf{c_{k+1}} &amp; \ldots &amp; \mathbf{c_n}  \end{array} \right ]\mathbf{e_k} + (-1)^{n+1}\det \mathbf{A} \, \mathbf{z}<br />
" /></center><br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_9fc0ab159e29798f48ce9d80c568ba96.png"  class="tex" align="absmiddle" title="= (-1)^{n+1} \sum_k x_k \det(\mathbf{A}) \mathbf{e_k} + (-1)^{n+1}\det \mathbf{A} \, \mathbf{z}<br />
" /></center><br />
which after &#8220;deprojectivizing&#8221; gives us exactly the vector <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_454f589db729ecde5b17d277cc9e6ac1.png"  class="tex" align="absmiddle" title="\textstyle \mathbf{x}"/> which we were searching for. </p>
<p>Next, by expanding <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_6a8e7996758f33f35cd3dfa11d0a23ad.png"  class="tex" align="absmiddle" title="\textstyle \det \left [ \begin{array}{c|c|c|c|c|c|c} \mathbf{c_1} &amp; \ldots &amp; \mathbf{c_{k-1}} &amp; \mathbf{y}&amp; \mathbf{c_{k+1}} &amp; \ldots &amp; \mathbf{c_n}  \end{array} \right ]"/> along the <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_a73c0468d1a75e62937f3584d3c8f9dc.png"  class="tex" align="absmiddle" title="\textstyle k"/>-th column, we obtain:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_0579cd2030c2c1c923bf0584899c21fa.png"  class="tex" align="absmiddle" title="x_k = \sum_i (-1)^{i+k} y_i \mathbf{A_{ik}} " /></center><br />
where <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_b344dde6cc74406aaecea4f5a913921a.png"  class="tex" align="absmiddle" title="\textstyle \mathbf{A_{rc}}"/> denotes the determinant of the minor obtained from <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_a8a36b86d245c75ec4b10560a67d8b0a.png"  class="tex" align="absmiddle" title="\textstyle \mathbf{A}"/> by removing the <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_26d7cc6fb84986e4f3e88a49ec0cd3ce.png"  class="tex" align="absmiddle" title="\textstyle r"/>-th row and the <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_9703681c7f7276e704bfa3e7ab57776d.png"  class="tex" align="absmiddle" title="\textstyle c"/>-th column. From which we recover the well-known formula for the inverse of a matrix:</p>
<p><center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_5b4848a78ceb283d9d2f127ebfe4ca26.png"  class="tex" align="absmiddle" title=" \mathbf{A^{-1}} = \left (\frac{(-1)^{i+j}\mathbf{A_{ji}}}{\mathbf{\det(A)}} \right )_{i,j=1 \ldots n} " /></center></p>
]]></content:encoded>
			<wfw:commentRss>http://analogical-engine.com/wordpress/?feed=rss2&amp;p=519</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Special Relativity and Hyperbolae</title>
		<link>http://analogical-engine.com/wordpress/?p=510</link>
		<comments>http://analogical-engine.com/wordpress/?p=510#comments</comments>
		<pubDate>Fri, 27 Aug 2010 09:46:48 +0000</pubDate>
		<dc:creator>Robin</dc:creator>
				<category><![CDATA[Robin]]></category>

		<guid isPermaLink="false">http://analogical-engine.com/wordpress/?p=510</guid>
		<description><![CDATA[The matrix for the Lorenz Transformation, in one space dimension and one time dimension (with ) is given by:

I shan&#8217;t derive this matrix from the &#8220;principle of relativity&#8221; which states that the laws of physics are identical in all inertial frames of reference, for this has been done very well elsewhere, and is not the [...]]]></description>
			<content:encoded><![CDATA[<p>The matrix for the Lorenz Transformation, in one space dimension and one time dimension (with <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_c5ad2a2df22accd24f9bd271422cd3a3.png"  class="tex" align="absmiddle" title="\textstyle c=1"/>) is given by:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_fa7116039919ab6afd7b02827b6e2c07.png"  class="tex" align="absmiddle" title=" L_v = \left (  \begin{array}{cc} \frac{1}{\sqrt{1 - v^2}} &amp; \frac{v}{\sqrt{1 - v^2}} \\ \frac{v}{\sqrt{1 - v^2}} &amp; \frac{1}{\sqrt{1 - v^2}} \end{array}\right ) " /></center></p>
<p>I shan&#8217;t derive this matrix from the &#8220;principle of relativity&#8221; which states that the laws of physics are identical in all inertial frames of reference, for this has been done very well elsewhere, and is not the purpose of this post.</p>
<p>Let us return instead to our good friend, the two by two rotation matrix, in order to make a few observations:</p>
<p><center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_8e909f1e9a96a3d28cd80852e9b68472.png"  class="tex" align="absmiddle" title=" R_\theta = \left ( \begin{array}{cc} \cos(\theta) &amp; - \sin(\theta) \\ \sin(\theta) &amp; \cos(\theta) \end{array}\right )" /></center></p>
<p>Consider a right angled triangle with sides lengths <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_a7ad1d6aefffa48b9d709397066fa26c.png"  class="tex" align="absmiddle" title="\textstyle 1"/>, <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_902af0c8c0f6d2420d0758ae016cdae6.png"  class="tex" align="absmiddle" title="\textstyle x"/> and <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_f68cfb76ba5c31d63082d1f165cc32ff.png"  class="tex" align="absmiddle" title="\textstyle \sqrt{1+x^2}"/>. If you remember the definition of your basic trigonometric functions, as well as Pythagorus&#8217; theorem, then you will &#8220;see&#8221; that we have:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_4837419209c68aeeb12d580113a06ee1.png"  class="tex" align="absmiddle" title="<br />
\cos(\arctan(x)) = \frac{1}{\sqrt{1 + x^2}}<br />
" /></center><br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_ca90638c102b8b96065fd9db7dc24f76.png"  class="tex" align="absmiddle" title="<br />
\sin(\arctan(x)) = \frac{x}{\sqrt{1 + x^2}}<br />
" /></center></p>
<p>This gives us the following alternative parameterization for the rotation matrices, where <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_7bd8999fc84276a5459dae4f310c5c76.png"  class="tex" align="absmiddle" title="\textstyle v = \tan(\theta)"/>:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_e7d48b223fe6274b4775eee51281bb4e.png"  class="tex" align="absmiddle" title=" R_v = \left (  \begin{array}{cc} \frac{1}{\sqrt{1 + v^2}} &amp; \frac{-v}{\sqrt{1 + v^2}} \\ \frac{v}{\sqrt{1 + v^2}} &amp; \frac{1}{\sqrt{1 + v^2}} \end{array}\right ) " /></center><br />
It looks rather like the Lorenz transformation, doesn&#8217;t it? Though not quite.</p>
<p>If you recall now the definition of the hyperbolic trigonometric functions, you will &#8220;see&#8221; that <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_5ecf4d9b0baf6fb0ce4ce96475dbc0b6.png"  class="tex" align="absmiddle" title="\textstyle \cos(i x) = \cosh(x)"/> and <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_d6245252fcf3c0fdcf9b393d2f77d168.png"  class="tex" align="absmiddle" title="\textstyle \sin(i x) = i \sin(x)"/>, and as a consequence, we have:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_26013ad42b2f43451520b1d961de6fd3.png"  class="tex" align="absmiddle" title="<br />
\cosh(\tanh^{-1}(x))  = \frac{1}{\sqrt{1-x^2}} \\<br />
" /></center><br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_114952ec8d0b39397498c6ec3922b92c.png"  class="tex" align="absmiddle" title="<br />
\sinh(\tanh^{-1}(x))  = \frac{x}{\sqrt{1-x^2}}<br />
" /></center></p>
<p>This in turn gives us an alternative parameterization for the Lorenz Transformation, where <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_05e9f2375371043133e9b6792af1eca9.png"  class="tex" align="absmiddle" title="\textstyle v = \tan(\phi)"/>:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_68dd3657998211cf4bca04655a8dd2ed.png"  class="tex" align="absmiddle" title="L_\phi = \left ( \begin{array}{cc} \cosh(\phi) &amp; \sinh(\phi) \\ \sinh(\phi) &amp; \cosh(\phi) \end{array}\right )" /></center></p>
<p>The upshot of this is that if you are willing to work over <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_13294f3420f06a745fb6ed147290ae11.png"  class="tex" align="absmiddle" title="\textstyle \mathbb{C}"/> rather than over <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_172ede9afb99e2d99596ac03ad392623.png"  class="tex" align="absmiddle" title="\textstyle \mathbb{R}"/>, and to think of your space dimension as purely real, and your time dimension as purely imaginary, then applying a &#8220;Lorenz boost&#8221; to your frame of reference is equivalent to rotating through an imaginary angle.</p>
<p><center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_d70feb9c76f98eadf52a871e34437966.png"  class="tex" align="absmiddle" title="<br />
\left ( \begin{array}{cc} \cos(i \theta) &amp; - \sin(i \theta) \\ \sin(i \theta) &amp; \cos(i \theta) \end{array}\right )<br />
\left ( \begin{array}{c} x \\ i t \end{array} \right )  =<br />
\left ( \begin{array}{c} x \cos(i \theta) - i t \sin(i \theta) \\<br />
x \sin(i \theta) + i t \cos(i \theta) \end{array} \right )<br />
" /></center><br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_b1591e2227c4a6feb77992f4aeedc514.png"  class="tex" align="absmiddle" title="<br />
= \left ( \begin{array}{c} x \cosh(\theta) + t \sinh(\theta) \\<br />
i(x \sinh(\theta) + t \cosh(\theta)) \end{array} \right )<br />
" /></center></p>
<p>In the same way that a regular rotation maps circles to circles in two space dimensions, a &#8220;hyperbolic rotation&#8221; sends hyperbolae to hyperbolae in one space dimension and one time dimension. The following mathematica code will let you play around with this idea.</p>
<pre>

points = {{1, 0}, {2, 0}, {3, 0}, {4, 0}};

A[theta_] := {{Cos[theta], -Sin[theta]}, {Sin[theta], Cos[theta]}};
B[v_] := {{1/Sqrt[1 - v^2], v/Sqrt[1 - v^2]}, {v/Sqrt[1 - v^2],
    1/Sqrt[1 - v^2]}};

Plot[y /. Table[Solve[x^2 + y^2 == k^2, y], {k, 5}], {x, -5, 5},
  PlotRange -> {-5, 5}, AspectRatio -> 1];
Manipulate[
 Show[%, ListPlot[points . A[theta], PlotStyle -> PointSize[0.025],
   PlotRange -> {{-5, 5}, {-5, 5}}, AxesOrigin -> {0, 0},
   AspectRatio -> 1]], {{theta, 0}, -Pi, Pi}]

Plot[y /. Table[Solve[x^2 - y^2 == k^2, y], {k, 0, 8}], {x, -10, 10},
  PlotRange -> {-10, 10}, AspectRatio -> 1];
Manipulate[
 Show[%, ListPlot[points . B[theta], PlotStyle -> PointSize[0.025],
   PlotRange -> {{-5, 5}, {-5, 5}}, AxesOrigin -> {0, 0},
   AspectRatio -> 1]], {{theta, 0}, -0.9, 0.9}]
</pre>
<p>Since a particle moving at the speed of light is represented in this picture by the degenerate hyperbola which form the asymptotes of the rest of the family, it is clear now why the speed of light is constant in all inertial frames of reference.</p>
<p>But what&#8217;s really going on here? Let <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_334683435e2029fd139fea61402bd257.png"  class="tex" align="absmiddle" title="\textstyle A"/> be the matrix representing a Minkowski bilinear form with one space dimension and one time dimension:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_d12b9f274845635d64298d3c08388ef3.png"  class="tex" align="absmiddle" title=" A = \left ( \begin{array}{cc} 1 &amp; 0 \\ 0 &amp; -1 \end{array} \right ) " /></center><br />
Then any matrix <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_0a76b55ddf84640d7dfe9adc0373a994.png"  class="tex" align="absmiddle" title="\textstyle M"/> of the form:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_e445f1f1ae27ca68f012d04e05cd46d0.png"  class="tex" align="absmiddle" title=" M = \frac{1}{\sqrt{1 - v^2}} \left (  \begin{array}{cc} 1 &amp; v \\ v &amp; 1 \end{array}\right ) " /></center><br />
will have the property that:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_e6f3f65fb2801d9dc10486f3f4f6291e.png"  class="tex" align="absmiddle" title=" M^T A M = A " /></center></p>
<p>Compare this to the Euclidean case, in which the bilinear form is represented by the identity matrix. Now we have that any matrix of the form:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_493b70daee1dd62b03c8de7aa1ba154f.png"  class="tex" align="absmiddle" title=" N = \left ( \begin{array}{cc} \cos(\theta) &amp; - \sin(\theta) \\ \sin(\theta) &amp; \cos(\theta) \end{array}\right )" /></center><br />
has the property that:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_3228a154acab9a7023ec0d51fd48e767.png"  class="tex" align="absmiddle" title=" N^T I N = I " /></center></p>
<p>In co-ordinates, if <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_dc82410ac281f99f608b2199b5320898.png"  class="tex" align="absmiddle" title="\textstyle v_1 = (x_1, y_1)"/> and <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_05f442a1efeb456ad99b971916758a54.png"  class="tex" align="absmiddle" title="\textstyle v_2 = (x_2, y_2)"/> represent two different particles in two dimensional space, then the Euclidean inner product is usually represented as:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_c5bf4bde0b85ac10037f194c5ae53985.png"  class="tex" align="absmiddle" title=" \langle v_1, v_2 \rangle = x_1 x_2 + y_1 y_2 " /></center></p>
<p>In the Minkowski picture, where time is imaginary, a &#8220;point&#8221; represents a particle located at a given position in one dimensional space, at a given time. The &#8220;inner product&#8221; of two &#8220;points&#8221; <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_01d5c730f9b34b3dee37b2153a2f6d9e.png"  class="tex" align="absmiddle" title="\textstyle p_1 = (x_1, i t_1)"/> and <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_0c90f1f4934cd8324ed8b83e1fdc6fcc.png"  class="tex" align="absmiddle" title="\textstyle p_2 = (x_2, i t_2)"/> is given by:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_cab87d198627ec59ae10ecefea4387da.png"  class="tex" align="absmiddle" title=" \langle p_1, p_2 \rangle = x_1 x_2 + i^2 t_1 t_2 = x_1 x_2 - t_1 t_2 " /></center></p>
]]></content:encoded>
			<wfw:commentRss>http://analogical-engine.com/wordpress/?feed=rss2&amp;p=510</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Conic Sections and Projective Space</title>
		<link>http://analogical-engine.com/wordpress/?p=497</link>
		<comments>http://analogical-engine.com/wordpress/?p=497#comments</comments>
		<pubDate>Fri, 20 Aug 2010 08:07:05 +0000</pubDate>
		<dc:creator>Robin</dc:creator>
				<category><![CDATA[Robin]]></category>

		<guid isPermaLink="false">http://analogical-engine.com/wordpress/?p=497</guid>
		<description><![CDATA[I&#8217;m sure you&#8217;ve all seen the equation of a circle before:

You&#8217;ve probably also seen the equation of a hyperbola:

Or perhaps you&#8217;re more familliar with seeing the asymptotes at 45 degree angles to the co-ordinate axes, as in:

All these are special cases of the most general quadratic equation, which can be written in the following projective [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sure you&#8217;ve all seen the equation of a circle before:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_a1af88bf615cef7714d92ef22248eaa4.png"  class="tex" align="absmiddle" title=" x^2 + y^2 = 1" /></center><br />
You&#8217;ve probably also seen the equation of a hyperbola:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_312979e90466acda744b680d27d28518.png"  class="tex" align="absmiddle" title=" xy = 1" /></center><br />
Or perhaps you&#8217;re more familliar with seeing the asymptotes at 45 degree angles to the co-ordinate axes, as in:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_0a1e68e6676b94bf54e79e1b999c12b7.png"  class="tex" align="absmiddle" title=" x^2 - y^2 = 1" /></center></p>
<p>All these are special cases of the most general quadratic equation, which can be written in the following projective form:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_15324bb5fdcd8022b29e22fb4a7017c2.png"  class="tex" align="absmiddle" title="<br />
\left [ \begin{array}{ccc}x &amp; y &amp; 1 \end{array} \right ]<br />
\left [ \begin{array}{ccc} a_{11} &amp; a_{12} &amp; a_{13} \\<br />
a_{12} &amp; a_{22} &amp; a_{23} \\ a_{13} &amp; a_{23} &amp; a_{33} \end{array} \right]<br />
\left [ \begin{array}{c} x \\ y \\ 1\end{array} \right]<br />
=0<br />
" /></center></p>
<p>Note that the <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_cfef4dae7cdb082d6d9989a80fe59f20.png"  class="tex" align="absmiddle" title="\textstyle 3"/> by <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_cfef4dae7cdb082d6d9989a80fe59f20.png"  class="tex" align="absmiddle" title="\textstyle 3"/> matrix in the middle is symmetric. As an example, the Family of circles centered at the origin, with radius <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_974e0463130e5947611ae15b86c3d5ee.png"  class="tex" align="absmiddle" title="\textstyle R"/> are associated to the family of matrices of the form:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_3e53f7bb57358c4f66c7649ba807e65a.png"  class="tex" align="absmiddle" title=" A_R = \left [ \begin{array}{ccc}<br />
1 &amp; 0 &amp; 0 \\ 0 &amp; 1 &amp; 0 \\ 0 &amp; 1 &amp; -R^2 \end{array} \right] " /></center></p>
<p>The first form of the hyperbola, with asymptotes parallel to the co-ordinate axes, corresponds to the matrix:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_e292dcf7ab54995fdcc7678eb0271611.png"  class="tex" align="absmiddle" title=" A_R = \left [ \begin{array}{ccc}<br />
0 &amp; 1/\sqrt 2 &amp; 0 \\ 1/\sqrt 2 &amp; 0 &amp; 0 \\ 0 &amp; 1 &amp; -1 \end{array} \right] " /></center><br />
while the second hyperbola, with asymptotes at 45 degrees, corresponds to the matrix:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_b7d15d372c54b3ce4e446b0f37365820.png"  class="tex" align="absmiddle" title=" A_R = \left [ \begin{array}{ccc}<br />
1 &amp; 0 &amp; 0 \\ 0 &amp; -1 &amp; 0 \\ 0 &amp; 1 &amp; -1 \end{array} \right] " /></center></p>
<p>More generally, the matrix associated to a hyperbola whose axes have been tilded by an angle of <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_249a6ec9781319f963006534aa9b5763.png"  class="tex" align="absmiddle" title="\textstyle \theta"/> clockwise from the diagonal is:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_8199036b2e389f50e3964c5e9248394a.png"  class="tex" align="absmiddle" title="<br />
\left(<br />
\begin{array}{ccc}<br />
 \cos (\theta ) &amp; \sin (\theta ) &amp; 0 \\<br />
 -\sin (\theta ) &amp; \cos (\theta ) &amp; 0 \\<br />
 0 &amp; 0 &amp; 1<br />
\end{array}<br />
\right)<br />
\left(<br />
\begin{array}{ccc}<br />
 1 &amp; 0 &amp; 0 \\<br />
 0 &amp; -1 &amp; 0  \\<br />
 0 &amp; 0 &amp; -1<br />
\end{array}<br />
\right)<br />
\left(<br />
\begin{array}{ccc}<br />
 \cos (\theta ) &amp; -\sin (\theta ) &amp; 0 \\<br />
 \sin (\theta ) &amp; \cos (\theta ) &amp; 0 \\<br />
 0 &amp; 0 &amp; 1<br />
\end{array}<br />
\right)<br />
" /></center><br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_0f033f7e147d8b31a305807cbd2d09e8.png"  class="tex" align="absmiddle" title="<br />
=\left(<br />
\begin{array}{ccc}<br />
 \cos ^2(\theta )-\sin ^2(\theta ) &amp; -2 \cos (\theta ) \sin<br />
   (\theta ) &amp; 0 \\<br />
 -2 \cos (\theta ) \sin (\theta ) &amp; \sin ^2(\theta )-\cos<br />
   ^2(\theta ) &amp; 0 \\<br />
 0 &amp; 0 &amp; -1<br />
\end{array}<br />
\right) \\<br />
" /></center><br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_cf91c55879dbe4503a7787ff5ab98c48.png"  class="tex" align="absmiddle" title=" = \left(<br />
\begin{array}{ccc}<br />
 \cos (2 \theta ) &amp; -\sin (2 \theta ) &amp; 0 \\<br />
 -\sin (2 \theta ) &amp; -\cos (2 \theta ) &amp; 0 \\<br />
 0 &amp; 0 &amp; -1<br />
\end{array}<br />
\right)<br />
" /></center></p>
<p>The following mathematica code will let you play around with these rotations.</p>
<pre>
   v = Transpose[{{x, y, 1}}];
   similtude[A_, M_] := Transpose[M].A.M
   equation[A_] := Solve[similtude[A, v][[1]][[1]] == 0, y]

   R[theta_] := {{Cos[theta], -Sin[theta], 0},
                 {Sin[theta], Cos[theta], 0},
                 {0, 0, 1}};
   H = {{1,0,0},{0,-1,0},{0,0,-1}}
   W[theta_] := similtude[H, R[theta]]

   Manipulate[
     Plot[Evaluate[y /. equation[W[theta]]], {x, -4, 4},
       PlotRange -> {{-4, 4}, {-4, 4}},
       AspectRatio -> 1],
   {{theta, 0}, -Pi, Pi}]
</pre>
<p>A few remarks about the code. In Mathematica square brackets are reserved for passing arguments into functions, curly brackets for defining lists, and normal round brackets for grouping terms in algebraic expressions. </p>
<p>Double square backets are used for indexing elements of a list. Matrices are represented as lists of list.  The first list is the first row, the second list is the second row, etc&#8230;</p>
<p>The matrix multiplication operator is simply a dot. When defining your own functions, the variables which can be passed into a function must be followed by an underscore. </p>
<p>The built in functions, <tt>Transpose</tt> and <tt>Solve</tt> do more or less what you would expect. The only subtlety is that the output of <tt>Solve</tt> is a <em>transformation rule</em>. The <tt>/.</tt> notation replaces the left hand side with the right hand side in the transformation rule.</p>
<p>The built in function <tt>Plot</tt> is responnsible for drawing static plots. Leaving a parameter free (in this case the angle <tt>theta</tt>) and wrapping it inside the <tt>Manipulate</tt> command allows you to vary the parameter with the mouse and view the resulting animation. </p>
<p>Recall that translation can be thought of an operation in projective space represented by the matrix:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_57e79103952806eb504d57c0d7b007e1.png"  class="tex" align="absmiddle" title=" T_{a,b} = \left [ \begin{array}{ccc}<br />
1 &amp; 0 &amp; a \\ 0 &amp; 1 &amp; b \\ 0 &amp; 0 &amp; 1<br />
\end{array}\right ] " /></center></p>
<p>Now, starting from the matrix for a circle of radius one, centered at the origin:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_d3a0b3c14e5e61a0a146fe70a7af0d65.png"  class="tex" align="absmiddle" title=" A = \left [ \begin{array}{ccc}<br />
1 &amp; 0 &amp; 0 \\ 0 &amp; 1 &amp; 0 \\ 0 &amp; 0 &amp; -1 \end{array} \right] " /></center><br />
and applying the following similarity transform:</p>
<p><center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_c601066c9dce3503d0c4762f3435940e.png"  class="tex" align="absmiddle" title="<br />
\left [ \begin{array}{ccc}<br />
1 &amp; 0 &amp; 0 \\ 0 &amp; 1 &amp; 0 \\ -a &amp; -b &amp; 1<br />
\end{array}\right ]<br />
\left [ \begin{array}{ccc}<br />
1 &amp; 0 &amp; 0 \\ 0 &amp; 1 &amp; 0 \\ 0 &amp; 0 &amp; -1 \end{array} \right]<br />
\left [ \begin{array}{ccc} 1 &amp; 0 &amp; -a \\<br />
0 &amp; 1 &amp; -b \\ 0 &amp; 0 &amp; 1 \end{array} \right]<br />
" /></center><br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_7b6226d4f321ac5e0fd692913b639312.png"  class="tex" align="absmiddle" title=" = \left [ \begin{array}{ccc} 1 &amp; 0 &amp; -a \\<br />
0 &amp; 1 &amp; -b \\ -a &amp; -b &amp; -1+a^2+b^2 \end{array} \right] " /></center><br />
We obtain the matrix for a circle of radius one, centered at the point <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_dd8cee86595367b201967f19388ea8c4.png"  class="tex" align="absmiddle" title="\textstyle (a,b)"/>. The following code will let you play around with this:</p>
<pre>
  T[a_, b_] = {{1, 0, -a}, {0, 1, -b}, {0, 0, 1}};
  CC = {{1,0,0},{0,1,0},{0,0,-1}}
  M[a_, b_] := similtude[C, T[a, b]]
  Manipulate[
    Plot[Evaluate[y /. equation[CC]], {x, -2, 2},
      PlotRange -> {{-2, 2}, {-2, 2}}, AspectRatio -> 1],
  {{a, 0}, -1, 1}, {{b, 0}, -1, 1}]
</pre>
<p>Now for the fun part. Let us define the following &#8220;projective rotation&#8221;<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_f8de22bafd6347d28eb1089bb7d33531.png"  class="tex" align="absmiddle" title="<br />
\left(<br />
\begin{array}{ccc}<br />
 \cos (\theta ) &amp; 0 &amp; -\sin (\theta ) \\<br />
 0 &amp; 1 &amp; 0 \\<br />
 \sin (\theta ) &amp; 0 &amp; \cos (\theta )<br />
\end{array}<br />
\right)<br />
" /></center></p>
<p>Using this, we can smoothly deform a circle into a hyperbola. Check it out:</p>
<pre>
   P[theta_] := {{Cos[theta], 0, -Sin[theta]}, {0, 1, 0},
                 {Sin[theta], 0, Cos[theta]}};
   S[theta_] := similtude[CC, P[theta]]

   Manipulate[
     Plot[Evaluate[y /. equation[S[theta]]], {x, -10, 10},
       PlotRange -> {{-10, 10}, {-10, 10}},
       AspectRatio -> 1],
   {{theta, 0}, -Pi, Pi}]
</pre>
<p>But what&#8217;s really going on here geometrically? The following three dimensional quadratic equation describes a mathematical cone (which is more like a pair of icecream cones, touching at their tips):<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_cddcc7321f2b5864afcfd65f537311da.png"  class="tex" align="absmiddle" title="<br />
\left [ \begin{array}{ccc}x &amp; y &amp; z \end{array} \right ]<br />
\left [ \begin{array}{ccc} 1 &amp; 0 &amp; 0 \\<br />
0 &amp; 1 &amp; 0 \\ 0 &amp; 0 &amp; -1 \end{array} \right]<br />
\left [ \begin{array}{c} x \\ y \\ z\end{array} \right]<br />
=0<br />
" /></center></p>
<p>By setting <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_8f34ffc8d291ab7e98c7b9d22d8a1901.png"  class="tex" align="absmiddle" title="\textstyle z=1"/> we are effectively taking the intersection with a plane. As you may know, all quadrics can be obtained by intersecting a cone with some given plane (hence the term conic section). The <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_8f34ffc8d291ab7e98c7b9d22d8a1901.png"  class="tex" align="absmiddle" title="\textstyle z=1"/> plane gives a circle, while the <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_ceb2873bb1a7194eadebcbc4f18cedcb.png"  class="tex" align="absmiddle" title="\textstyle x=1"/> plane gives a hyperbola. Our &#8220;projective rotation&#8221; smoothly rotates the <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_8b9ecb7cb61a65a78326afff6f6e8fea.png"  class="tex" align="absmiddle" title="\textstyle z"/> axis to the <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_902af0c8c0f6d2420d0758ae016cdae6.png"  class="tex" align="absmiddle" title="\textstyle x"/> axis.</p>
]]></content:encoded>
			<wfw:commentRss>http://analogical-engine.com/wordpress/?feed=rss2&amp;p=497</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Translations as Projective Transformations</title>
		<link>http://analogical-engine.com/wordpress/?p=463</link>
		<comments>http://analogical-engine.com/wordpress/?p=463#comments</comments>
		<pubDate>Wed, 11 Aug 2010 18:03:55 +0000</pubDate>
		<dc:creator>Robin</dc:creator>
				<category><![CDATA[Robin]]></category>

		<guid isPermaLink="false">http://analogical-engine.com/wordpress/?p=463</guid>
		<description><![CDATA[You probably already know that in two dimensional space, the geometric act of rotating a vector through a given angle can be represented algebraically by the matrix:

You might have also asked yourself &#8220;What about translation?&#8221; That&#8217;s a nice geometric operation, how can we represent it algebraically in terms of matrices? 
The problem with translation is [...]]]></description>
			<content:encoded><![CDATA[<p>You probably already know that in two dimensional space, the geometric act of rotating a vector through a given angle can be represented algebraically by the matrix:</p>
<p><center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_8e98baaacd3e09cba6e7e2238baa6418.png"  class="tex" align="absmiddle" title=" R_{\theta} = \left [ \begin{array}{cc} \cos(\theta) &amp;amp; -\sin(\theta) \\ \sin(\theta) &amp;amp; \cos(\theta) \end{array} \right ] " /></center></p>
<p>You might have also asked yourself &#8220;What about translation?&#8221; That&#8217;s a nice geometric operation, how can we represent it algebraically in terms of matrices? </p>
<p>The problem with translation is that it doesn&#8217;t preserve the origin, and is thus not a linear transformation. It is however a <em>projective transformation</em>, and so by working in projective space it is still possible to think of translations in terms of matrix operations. This is a common trick used in computer graphics packages such as openGL.</p>
<p>There are many different ways to think about two dimensional projective space. Geometrically it is the set of lines in three dimensional space which pass through the origin. Topologically its the two dimensional sphere with antipodal points identified. Think of the fact that a line through the origin in <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_6d70801d717fb3ff972f9c86f078b0dd.png"  class="tex" align="absmiddle" title="\textstyle \mathbb{R}^3"/> intersects the unit sphere in exactly two points. </p>
<p>Algebraically, it is the set of triples <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_f53fa04fd7efaedcf91c73a1119acc42.png"  class="tex" align="absmiddle" title="\textstyle [x:y:z]"/> under the equivalence relation <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_1eb80ee3eb663d6c724b57dc12d693ea.png"  class="tex" align="absmiddle" title="\textstyle [\lambda x: \lambda y: \lambda z] \sim [x:y:z]"/> for all <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_d3d853c4a00dba6587c3a5ef954aa9ca.png"  class="tex" align="absmiddle" title="\textstyle \lambda \neq 0"/>.</p>
<p>Another useful way to think about projective two-space is as regular two dimensional space with an additional &#8220;circle* at infinity&#8221;, that is an additional point at infinity for every possible direction which you might head out in from the origin. Imagine the hyperplane <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_8f34ffc8d291ab7e98c7b9d22d8a1901.png"  class="tex" align="absmiddle" title="\textstyle z=1"/> sitting inside <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_6d70801d717fb3ff972f9c86f078b0dd.png"  class="tex" align="absmiddle" title="\textstyle \mathbb{R}^3"/> and notice how any line passing through the origin, which does not lie in the two dimensional subspace spanned by the <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_902af0c8c0f6d2420d0758ae016cdae6.png"  class="tex" align="absmiddle" title="\textstyle x"/> and <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_4fc81c1b0515abbab26d0c3788903f84.png"  class="tex" align="absmiddle" title="\textstyle y"/> directions, intersects this plane in exactly one point.</p>
<p>Working with the algebraic definition, a two dimensional <em> projective transformation</em> is just a <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_cfef4dae7cdb082d6d9989a80fe59f20.png"  class="tex" align="absmiddle" title="\textstyle 3"/> by <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_cfef4dae7cdb082d6d9989a80fe59f20.png"  class="tex" align="absmiddle" title="\textstyle 3"/> matrix acting on projective co-ordinates. The equivalence relation on the underlying projective space implies that two matrices which differ only by a scalar multiple represent the same projective transformation.  </p>
<p>Suppose that we want to send the arbitrary point <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_4696ca2211e49bb96a9dd67b9392257b.png"  class="tex" align="absmiddle" title="\textstyle (x,y)"/> to the new point <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_e799d26fda468c1b66669580566e4d1c.png"  class="tex" align="absmiddle" title="\textstyle (x + 3, y-2)"/> which is shifted across two steps and down three steps. </p>
<p>The first step is to embed the two dimensional plane, which we are really interested in, into the somewhat more abstract and difficult to understand two dimensional projective space, where we are going to perform our transformation. This is accomplished by the map:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_6b54204fa8d7e122406fb7f2fc18b866.png"  class="tex" align="absmiddle" title=" (x,y) \mapsto [x:y:1] " /></center></p>
<p>The &#8220;inverse&#8221; of this embedding is the map:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_20a5c9ef12d7a07976c9e2f01e0faea6.png"  class="tex" align="absmiddle" title=" [x:y:z] \mapsto (x/z, y/z) " /></center><br />
I say &#8220;inverse&#8221; in inverted commas, because this map is not defined everywhere. In particular its not defined when <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_bdb434601a4c6c556a3a2c189af78eb3.png"  class="tex" align="absmiddle" title="\textstyle z=0"/>.</p>
<p>Alternatively, if you have trouble visualizing projective space, just imagine embedding <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_017721952ae0ac7b7cf1ddcc43e0defe.png"  class="tex" align="absmiddle" title="\textstyle \mathbb{R}^2"/> into <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_6d70801d717fb3ff972f9c86f078b0dd.png"  class="tex" align="absmiddle" title="\textstyle \mathbb{R}^3"/> as the hyperplane given by the equation <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_8f34ffc8d291ab7e98c7b9d22d8a1901.png"  class="tex" align="absmiddle" title="\textstyle z=1"/>. The only thing we&#8217;re really missing in this picture is the &#8220;circle at infinity&#8221; which will be important later when we consider quadrics, but does not really matter just now while we are only concerned with translation operators (which send infinity to infinity anyhow). </p>
<p>Consider now the following projective transformation:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_1f023805ffb30a7b2beecc91bafe33f9.png"  class="tex" align="absmiddle" title=" M = \left [ \begin{array}{ccc} 1 &amp;amp; 0  &amp;amp; 2 \\ 0  &amp;amp; 1  &amp;amp; -3 \\ 0  &amp;amp; 0  &amp;amp; 1 \end{array} \right ] " /></center><br />
(or if you prefer, just think of it as a regular three dimensional transformation, which happens to map the hyperplane <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_8f34ffc8d291ab7e98c7b9d22d8a1901.png"  class="tex" align="absmiddle" title="\textstyle z=1"/> back to itself)</p>
<p>If we apply this to the image of our point under our funny embedding, then we get:</p>
<p><center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_afdec3824d0a9f02f3b9dcebe58779a2.png"  class="tex" align="absmiddle" title=" \left [ \begin{array}{ccc} 1  &amp;amp; 0 &amp;amp; 2 \\ 0  &amp;amp; 1  &amp;amp; -3 \\ 0  &amp;amp; 0  &amp;amp; 1 \end{array} \right ] \left [ \begin{array}{c} x \\ y \\ 1 \end{array} \right ] =<br />
\left [ \begin{array}{c} x + 2 \\ y - 3 \\ 1 \end{array} \right ]<br />
 " /></center></p>
<p>Et Voila! After taking the inverse of the embedding, this is exactly the image of the point that we were looking for.</p>
<p>* As correctly pointed out by Cale Gibbard, its not actually a circle at infinity, but a projective line. If two people head out in opposite directions along the <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_4ea3f9726d1e2aafbf5c644d530fc4a4.png"  class="tex" align="absmiddle" title="\textstyle x,y"/> plane they will reach the same point at infinity.</p>
]]></content:encoded>
			<wfw:commentRss>http://analogical-engine.com/wordpress/?feed=rss2&amp;p=463</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back from the Dead</title>
		<link>http://analogical-engine.com/wordpress/?p=454</link>
		<comments>http://analogical-engine.com/wordpress/?p=454#comments</comments>
		<pubDate>Thu, 05 Aug 2010 20:41:25 +0000</pubDate>
		<dc:creator>Robin</dc:creator>
				<category><![CDATA[Robin]]></category>

		<guid isPermaLink="false">http://analogical-engine.com/wordpress/?p=454</guid>
		<description><![CDATA[This blog has been dead for some time, but since I am now officially on the job market, I have decided to re-open it. I plan to post something new at least once a week.
]]></description>
			<content:encoded><![CDATA[<p>This blog has been dead for some time, but since I am now officially on the job market, I have decided to re-open it. I plan to post something new at least once a week.</p>
]]></content:encoded>
			<wfw:commentRss>http://analogical-engine.com/wordpress/?feed=rss2&amp;p=454</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Data Mining</title>
		<link>http://analogical-engine.com/wordpress/?p=450</link>
		<comments>http://analogical-engine.com/wordpress/?p=450#comments</comments>
		<pubDate>Wed, 27 Jan 2010 22:42:49 +0000</pubDate>
		<dc:creator>Robin</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[Robin]]></category>

		<guid isPermaLink="false">http://analogical-engine.com/wordpress/?p=450</guid>
		<description><![CDATA[For anybody who is interested, here are two online video lecture series from Stanford University:
Statistical Aspects of Data Mining
Machine Learning
Also, the data set for the netflix prize.
]]></description>
			<content:encoded><![CDATA[<p>For anybody who is interested, here are two online video lecture series from Stanford University:</p>
<p><a href="http://www.youtube.com/watch?v=zRsMEl6PHhM">Statistical Aspects of Data Mining</a></p>
<p><a href="http://www.youtube.com/watch?v=UzxYlbK2c7E">Machine Learning</a></p>
<p>Also, the <a href="http://archive.ics.uci.edu/ml/datasets/Netflix+Prize">data set</a> for the <a href="http://www.netflixprize.com/">netflix prize</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://analogical-engine.com/wordpress/?feed=rss2&amp;p=450</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why&#8217;s (poignant) guide to Ruby</title>
		<link>http://analogical-engine.com/wordpress/?p=448</link>
		<comments>http://analogical-engine.com/wordpress/?p=448#comments</comments>
		<pubDate>Thu, 21 Jan 2010 15:36:20 +0000</pubDate>
		<dc:creator>Robin</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[Robin]]></category>

		<guid isPermaLink="false">http://analogical-engine.com/wordpress/?p=448</guid>
		<description><![CDATA[Despite numerous other unfinished projects, I have decided to learn Ruby. 
Regardless of whether you have any actual interest in learning Ruby or not, if your laughing muscles need a work out, may I recommend:
Why&#8217;s (poignant) guide to Ruby
It even has a soundtrack.
]]></description>
			<content:encoded><![CDATA[<p>Despite numerous other unfinished projects, I have decided to learn Ruby. </p>
<p>Regardless of whether you have any actual interest in learning Ruby or not, if your laughing muscles need a work out, may I recommend:</p>
<p><a href="http://mislav.uniqpath.com/poignant-guide/">Why&#8217;s (poignant) guide to Ruby</a></p>
<p>It even has a soundtrack.</p>
]]></content:encoded>
			<wfw:commentRss>http://analogical-engine.com/wordpress/?feed=rss2&amp;p=448</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inversions in permutations and words</title>
		<link>http://analogical-engine.com/wordpress/?p=431</link>
		<comments>http://analogical-engine.com/wordpress/?p=431#comments</comments>
		<pubDate>Sat, 09 Jan 2010 00:30:50 +0000</pubDate>
		<dc:creator>Cale</dc:creator>
				<category><![CDATA[Cale]]></category>

		<guid isPermaLink="false">http://analogical-engine.com/wordpress/?p=431</guid>
		<description><![CDATA[An inversion in a permutation  is a pair  of indices such that
 but . Let  denote the total number of inversions of . One can uniquely record a permutation  by recording, for each  the number of inversions , which will be a number from  to . One can recover [...]]]></description>
			<content:encoded><![CDATA[<p>An <em>inversion</em> in a permutation <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_29f20f7155f90ced988f66b35b3c463c.png"  class="tex" align="absmiddle" title="\textstyle \sigma \in \mathfrak{S}_n"/> is a pair <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_3fe4f3a8e038eb556e13f7cf706743a5.png"  class="tex" align="absmiddle" title="\textstyle (i,j)"/> of indices such that<br />
<img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_913c53985a76a007374ae4dbf4ca92d1.png"  class="tex" align="absmiddle" title="\textstyle i &lt; j"/> but <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_2c009e35b9c2aae4fcd3eb14017d376d.png"  class="tex" align="absmiddle" title="\textstyle \sigma(i) &gt; \sigma(j)"/>. Let <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_8935309d8e0bed0aac6f773c21772a6d.png"  class="tex" align="absmiddle" title="\textstyle \mathrm{inv}(\sigma)"/> denote the total number of inversions of <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_da558f70b613c041e422c4fdcbc2a385.png"  class="tex" align="absmiddle" title="\textstyle \sigma"/>. One can uniquely record a permutation <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_29f20f7155f90ced988f66b35b3c463c.png"  class="tex" align="absmiddle" title="\textstyle \sigma \in \mathfrak{S}_n"/> by recording, for each <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_3ade549e411d7c0dbac591317b77ce8f.png"  class="tex" align="absmiddle" title="\textstyle 1 \leq i \leq n"/> the number of inversions <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_3fe4f3a8e038eb556e13f7cf706743a5.png"  class="tex" align="absmiddle" title="\textstyle (i,j)"/>, which will be a number from <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_2d71c82566be471d1eb9ba71116eb9e4.png"  class="tex" align="absmiddle" title="\textstyle 0"/> to <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_f6a216f3252ee2916868652568ddb007.png"  class="tex" align="absmiddle" title="\textstyle n-i"/>. One can recover the <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_b7ea2e6bb2dfad7cd6e564d3184aaf67.png"  class="tex" align="absmiddle" title="\textstyle i^\mathrm{th}"/> entry of the permutation (and hence the whole permutation) from such a recording by the following algorithm. Let <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_aedf65661488d32f8116667eb73e22cc.png"  class="tex" align="absmiddle" title="\textstyle S"/> be the set of the first <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_03def07139919a5c5e5558bdf253118a.png"  class="tex" align="absmiddle" title="\textstyle i-1"/> entries of the permutation. If the number of inversions of the form <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_3fe4f3a8e038eb556e13f7cf706743a5.png"  class="tex" align="absmiddle" title="\textstyle (i,j)"/> is <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_a73c0468d1a75e62937f3584d3c8f9dc.png"  class="tex" align="absmiddle" title="\textstyle k"/>, then there must be exactly <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_a73c0468d1a75e62937f3584d3c8f9dc.png"  class="tex" align="absmiddle" title="\textstyle k"/> elements after the <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_b7ea2e6bb2dfad7cd6e564d3184aaf67.png"  class="tex" align="absmiddle" title="\textstyle i^\mathrm{th}"/> position which are smaller than it. Hence, the <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_b7ea2e6bb2dfad7cd6e564d3184aaf67.png"  class="tex" align="absmiddle" title="\textstyle i^\mathrm{th}"/> entry of the permutation is the <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_a10e783e3b28e55b4197ea37b8773777.png"  class="tex" align="absmiddle" title="\textstyle (k+1)^\mathrm{th}"/> smallest element of <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_9b04d5bfa0afdbd7b4b25fd8d77953a6.png"  class="tex" align="absmiddle" title="\textstyle \{1,\dots,n\}\setminus S"/>.</p>
<p>Hence,<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_78d9dc18647d4ecff2ec6fff41f623a9.png"  class="tex" align="absmiddle" title="(\mathfrak{S}_n,\mathrm{inv}) \,\,\tilde\to\,\, \left(\prod_{i=1}^{n} \{0,\dots,n-i\},\omega\right)" /></center><br />
is a weight preserving bijection, where <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_872d40b0da2ebbb77048161eb7d97d04.png"  class="tex" align="absmiddle" title="\textstyle \omega"/> is the usual additive weight.</p>
<p>By simply reversing the sequences (using the index substitution <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_f58f6bb6aba38cf3d6508c2a5f8d9145.png"  class="tex" align="absmiddle" title="\textstyle j=n-i"/>), we get a further bijection:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_514044fdff4db9537802473ea34af8f1.png"  class="tex" align="absmiddle" title="(\mathfrak{S}_n,\mathrm{inv}) \,\,\tilde\to\,\, \left(\prod_{j=0}^{n-1} \{0,\dots,j\},\omega\right)" /></center></p>
<p>So these two sets will have the same generating series. Using the product and sum lemma, we obtain:</p>
<p><center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_4d70c86a078af4aba0dbfe987f1ae483.png"  class="tex" align="absmiddle" title="\begin{align*}<br />
\sum_{\sigma\in\mathfrak{S}_n} q^{\mathrm{inv}(\sigma)} &amp;= \prod_{i=0}^{n-1} \sum_{k=0}^{i} q^{k}<br />
= \prod_{i=0}^{n-1} \frac{1 - q^{i+1}}{1-q}\\<br />
&amp;= \frac{\prod_{i=0}^{n-1} (1 - q^{i+1})}{(1-q)^n}<br />
= \frac{(q;q)_n}{(1-q)^n}\\<br />
&amp;= [n]_q !<br />
\end{align*}" /></center></p>
<p>We now extend the definition of inversions to words on the alphabet <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_1ea8c22044b751d5956347a883cedfab.png"  class="tex" align="absmiddle" title="\textstyle \{1,\dots,k\}"/>. If <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_2f3c8d49ce15735112a159743e10b9c4.png"  class="tex" align="absmiddle" title="\textstyle w(i)"/> is the symbol at the <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_b7ea2e6bb2dfad7cd6e564d3184aaf67.png"  class="tex" align="absmiddle" title="\textstyle i^\mathrm{th}"/> position of the word <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_4a51dec31320f45ff7b275b9d64b95b9.png"  class="tex" align="absmiddle" title="\textstyle w"/>, then an inversion in <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_4a51dec31320f45ff7b275b9d64b95b9.png"  class="tex" align="absmiddle" title="\textstyle w"/> is a pair <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_3fe4f3a8e038eb556e13f7cf706743a5.png"  class="tex" align="absmiddle" title="\textstyle (i,j)"/> of positions such that <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_913c53985a76a007374ae4dbf4ca92d1.png"  class="tex" align="absmiddle" title="\textstyle i &lt; j"/>, but <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_d79a6a013e57c6486cac977a2822b043.png"  class="tex" align="absmiddle" title="\textstyle w(i) &gt; w(j)"/>.</p>
<p>We wish to know the generating series with respect to inversions for the set <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_4699c8d326288f3be6015a6fa37dc09e.png"  class="tex" align="absmiddle" title="\textstyle \mathfrak{W}^{(n)}_{n_1,\dots,n_k}"/> of words of length <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_e42c705ac16741153a33e4d74a4e7610.png"  class="tex" align="absmiddle" title="\textstyle n"/> on <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_1ea8c22044b751d5956347a883cedfab.png"  class="tex" align="absmiddle" title="\textstyle \{1,\dots,k\}"/> with <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_65293617819ae9d0b96dec9f7388394e.png"  class="tex" align="absmiddle" title="\textstyle n_i"/> occurrences of <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_f5b17f7b4de99471d43c8dab6c240e35.png"  class="tex" align="absmiddle" title="\textstyle i"/>.</p>
<p>To get it, we will use an indirect decomposition, decomposing an element <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_29f20f7155f90ced988f66b35b3c463c.png"  class="tex" align="absmiddle" title="\textstyle \sigma \in \mathfrak{S}_n"/> as a word <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_314129ed3312d8096adaebe927afc2b4.png"  class="tex" align="absmiddle" title="\textstyle w \in \mathfrak{W}^{(n)}_{n_1,\dots,n_k}"/>, together with permutations <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_330065b565eb79b8678713846c2ceb9d.png"  class="tex" align="absmiddle" title="\textstyle \sigma_1 \in \mathfrak{S}_{B_1}, \dots, \sigma_k \in \mathfrak{S}_{B_k}"/> in a bijection which additively preserves inversions, where <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_83a13233503375c90471733007aa13b3.png"  class="tex" align="absmiddle" title="\textstyle n = n_1 + n_2 + \cdots + n_k"/> and <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_1b98d2c9d377b649da9bfc05a1ef0dbf.png"  class="tex" align="absmiddle" title="\textstyle B_i"/> is a set with <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_65293617819ae9d0b96dec9f7388394e.png"  class="tex" align="absmiddle" title="\textstyle n_i"/> elements.</p>
<p>That is, our weight-preserving bijection will look like:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_de0defb7819db37aa02cf3ab7ee6571c.png"  class="tex" align="absmiddle" title="(\mathfrak{S}_n,\mathrm{inv}) \,\,\tilde\to\,\, (\mathfrak{W}^{(n)}_{n_1,\dots,n_k},\mathrm{inv})\times(\mathfrak{S}_{B_1},\mathrm{inv})\times \cdots \times (\mathfrak{S}_{B_k},\mathrm{inv})" /></center></p>
<p>We split the domain of a permutation <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_29f20f7155f90ced988f66b35b3c463c.png"  class="tex" align="absmiddle" title="\textstyle \sigma \in \mathfrak{S}_n"/> into blocks with sizes <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_80739e02ee250e450e7412031e413a2c.png"  class="tex" align="absmiddle" title="\textstyle n_1,\dots,n_k"/> in the obvious way, with the <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_b7ea2e6bb2dfad7cd6e564d3184aaf67.png"  class="tex" align="absmiddle" title="\textstyle i^\mathrm{th}"/> block consisting of the elements <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_4dd1ef53f61d3847b80d2cf3bf66ba62.png"  class="tex" align="absmiddle" title="\textstyle B_i = \{m_i + 1,\dots,m_i + n_i\}"/> where <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_6ab6ba621fd464fd2ab5283d79a0c942.png"  class="tex" align="absmiddle" title="\textstyle m_i = n_1 + \cdots + n_{i-1}"/>. Note that <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_574f606a072754b3911307f84a0e5666.png"  class="tex" align="absmiddle" title="\textstyle \mathfrak{S}_{n_i}"/> acts on <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_1b98d2c9d377b649da9bfc05a1ef0dbf.png"  class="tex" align="absmiddle" title="\textstyle B_i"/> in a canonical way, with a permutation <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_11cc40d59a1147dda91c6fc8c55a4d06.png"  class="tex" align="absmiddle" title="\textstyle \rho \in \mathfrak{S}_{n_i}"/> sending <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_036ae5db42352b4d760405234f6feb90.png"  class="tex" align="absmiddle" title="\textstyle m_i + j"/> to <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_cc1cc4ad8d7c47700a0e9367f2338a34.png"  class="tex" align="absmiddle" title="\textstyle m_i + \rho(j)"/>.</p>
<p>The word <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_4a51dec31320f45ff7b275b9d64b95b9.png"  class="tex" align="absmiddle" title="\textstyle w"/> is then defined by <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_7f85f0ffef583741f92e5fe3c36c3676.png"  class="tex" align="absmiddle" title="\textstyle w(j) = i"/> if <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_c1a3772a38391e8995297aa31603a0a3.png"  class="tex" align="absmiddle" title="\textstyle \sigma(j) \in B_i"/>.</p>
<p>We define the permutation <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_2ccbfc9822536e7c837ac39fd8efacd0.png"  class="tex" align="absmiddle" title="\textstyle \sigma_i"/> for each <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_e7546ce2611c37f33b75168618add09c.png"  class="tex" align="absmiddle" title="\textstyle i \in \{1,\dots,k\}"/> as the subword of <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_da558f70b613c041e422c4fdcbc2a385.png"  class="tex" align="absmiddle" title="\textstyle \sigma"/> consisting of the elements of <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_1b98d2c9d377b649da9bfc05a1ef0dbf.png"  class="tex" align="absmiddle" title="\textstyle B_i"/>. Note that if <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_dc3372c7bf3d68b9883dddc9db69ee9d.png"  class="tex" align="absmiddle" title="\textstyle u"/> and <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_05dabad19df4526a0a471bbb856606f8.png"  class="tex" align="absmiddle" title="\textstyle v"/> are both elements of <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_1b98d2c9d377b649da9bfc05a1ef0dbf.png"  class="tex" align="absmiddle" title="\textstyle B_i"/>, then <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_b0a48d6099558e41e63c121bdb726ffa.png"  class="tex" align="absmiddle" title="\textstyle (u,v)"/> is an inversion of <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_da558f70b613c041e422c4fdcbc2a385.png"  class="tex" align="absmiddle" title="\textstyle \sigma"/> if and only if it is also is an inversion of <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_2ccbfc9822536e7c837ac39fd8efacd0.png"  class="tex" align="absmiddle" title="\textstyle \sigma_i"/>.</p>
<p>It will help to illustrate this bijection with an example. Take <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_a84fee1bad8298580569f23212bacefa.png"  class="tex" align="absmiddle" title="\textstyle n_1 = 3"/>, <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_7422572437e0989cf2a6fa2f96a02db4.png"  class="tex" align="absmiddle" title="\textstyle n_2 = 3"/> and <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_b8c4a0422925a2f664843596bd44edf6.png"  class="tex" align="absmiddle" title="\textstyle n_3 = 2"/>, so that <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_8dfd22d71f6afc58064b84e8ae44fdf2.png"  class="tex" align="absmiddle" title="\textstyle B_1 = \{1,2,3\}"/>, <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_a862710b2a9b24d22c5db35520f9c35f.png"  class="tex" align="absmiddle" title="\textstyle B_2 = \{4,5,6\}"/> and <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_b203dd42bdb00bb06b86b8cc2a7d0c23.png"  class="tex" align="absmiddle" title="\textstyle B_3 = \{7,8\}"/>.</p>
<p>Let <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_7ae41677dce0147266f97958ed48dd6b.png"  class="tex" align="absmiddle" title="\textstyle \sigma \in \mathfrak{S}_8"/> be the permutation (in word form):<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_a41335a4ba476b9da9553117d1b727b8.png"  class="tex" align="absmiddle" title="\sigma = \begin{pmatrix}6&amp;2&amp;5&amp;3&amp;1&amp;4&amp;8&amp;7\end{pmatrix}" /></center></p>
<p>Then we construct the word <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_9b4f4639057af0738579bff937be54ca.png"  class="tex" align="absmiddle" title="\textstyle w \in \mathfrak{W}^{(8)}_{3,3,2}"/> by taking <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_2f3c8d49ce15735112a159743e10b9c4.png"  class="tex" align="absmiddle" title="\textstyle w(i)"/> to be the block in which <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_54d49a8e6092436bf875f9be397f13e9.png"  class="tex" align="absmiddle" title="\textstyle \sigma(i)"/> occurs:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_b8299ff54236dd43c26b58e0bf469f87.png"  class="tex" align="absmiddle" title="w = \begin{pmatrix}2&amp;1&amp;2&amp;1&amp;1&amp;2&amp;3&amp;3\end{pmatrix}" /></center></p>
<p>We then compute:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_9c9111e605a65dccf9bd12b511e67040.png"  class="tex" align="absmiddle" title="\begin{align*}<br />
\sigma_1 &amp;= \begin{pmatrix}2&amp;3&amp;1\end{pmatrix}\\<br />
\sigma_2 &amp;= \begin{pmatrix}6&amp;5&amp;4\end{pmatrix}\\<br />
\sigma_3 &amp;= \begin{pmatrix}8&amp;7\end{pmatrix}<br />
\end{align*}" /></center></p>
<p>To invert the above process, we simply replace the <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_ebadde137bd4923735cf1f201e13e7fc.png"  class="tex" align="absmiddle" title="\textstyle j^\mathrm{th}"/> occurrence of <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_a73c0468d1a75e62937f3584d3c8f9dc.png"  class="tex" align="absmiddle" title="\textstyle k"/> in the word <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_4a51dec31320f45ff7b275b9d64b95b9.png"  class="tex" align="absmiddle" title="\textstyle w"/> with <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_d17b2cf0d8b61767dd7e92dd547fa86a.png"  class="tex" align="absmiddle" title="\textstyle \sigma_k(m_k + j)"/>. Hence, this is a bijection.</p>
<p>To see that it is additively weight-preserving with respect to inversions, we do a bit of a case analysis. We classify the inversions <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_b0a48d6099558e41e63c121bdb726ffa.png"  class="tex" align="absmiddle" title="\textstyle (u,v)"/> of <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_da558f70b613c041e422c4fdcbc2a385.png"  class="tex" align="absmiddle" title="\textstyle \sigma"/> according to whether <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_ada6d61ef825bc7ec691b5e0f18261ce.png"  class="tex" align="absmiddle" title="\textstyle \sigma(u)"/> and <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_bd003bc565797418c6a0952dc5b32606.png"  class="tex" align="absmiddle" title="\textstyle \sigma(v)"/> are in the same block <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_1b98d2c9d377b649da9bfc05a1ef0dbf.png"  class="tex" align="absmiddle" title="\textstyle B_i"/> or in different blocks.</p>
<p>If they are in different blocks, say <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_329ac5ab28759c8ece02859b703995c9.png"  class="tex" align="absmiddle" title="\textstyle \sigma(u) \in B_i"/> and <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_505f1fbe50f7f98649f3049417a0ac6a.png"  class="tex" align="absmiddle" title="\textstyle \sigma(v) \in B_j"/>, then since <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_4026aec48fbc2594b6c466006da83c24.png"  class="tex" align="absmiddle" title="\textstyle \sigma(u) &gt; \sigma(v)"/>, we must have <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_9a97bf0ccc2960ee16629edd9180707e.png"  class="tex" align="absmiddle" title="\textstyle i &gt; j"/>, and so <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_1981db9062ff961a3eca992f49043283.png"  class="tex" align="absmiddle" title="\textstyle w(u) = i &gt; j = w(v)"/>. Hence <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_b0a48d6099558e41e63c121bdb726ffa.png"  class="tex" align="absmiddle" title="\textstyle (u,v)"/> is also an inversion of <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_4a51dec31320f45ff7b275b9d64b95b9.png"  class="tex" align="absmiddle" title="\textstyle w"/>. Conversely, every inversion of <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_4a51dec31320f45ff7b275b9d64b95b9.png"  class="tex" align="absmiddle" title="\textstyle w"/> will clearly be an inversion of <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_da558f70b613c041e422c4fdcbc2a385.png"  class="tex" align="absmiddle" title="\textstyle \sigma"/> of this type, since if <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_cd4cd42d908246ec36afe802cf3b7979.png"  class="tex" align="absmiddle" title="\textstyle u &lt; v"/> but <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_6527f59d95a8f8898d1a706ce9e5c101.png"  class="tex" align="absmiddle" title="\textstyle i = w(u) &gt; w(v) = j"/>, we have that <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_329ac5ab28759c8ece02859b703995c9.png"  class="tex" align="absmiddle" title="\textstyle \sigma(u) \in B_i"/> and <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_505f1fbe50f7f98649f3049417a0ac6a.png"  class="tex" align="absmiddle" title="\textstyle \sigma(v) \in B_j"/>, but since <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_9a97bf0ccc2960ee16629edd9180707e.png"  class="tex" align="absmiddle" title="\textstyle i &gt; j"/>, any element of <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_1b98d2c9d377b649da9bfc05a1ef0dbf.png"  class="tex" align="absmiddle" title="\textstyle B_i"/> is greater than any element of <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_f2589900cce1cf3f30f45a8639575bd0.png"  class="tex" align="absmiddle" title="\textstyle B_j"/>, and in particular <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_4026aec48fbc2594b6c466006da83c24.png"  class="tex" align="absmiddle" title="\textstyle \sigma(u) &gt; \sigma(v)"/>.</p>
<p>If they are in the same block <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_1b98d2c9d377b649da9bfc05a1ef0dbf.png"  class="tex" align="absmiddle" title="\textstyle B_i"/>, then by a previous argument, <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_b0a48d6099558e41e63c121bdb726ffa.png"  class="tex" align="absmiddle" title="\textstyle (u,v)"/> is an inversion of <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_da558f70b613c041e422c4fdcbc2a385.png"  class="tex" align="absmiddle" title="\textstyle \sigma"/> if and only if it is an inversion of <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_2ccbfc9822536e7c837ac39fd8efacd0.png"  class="tex" align="absmiddle" title="\textstyle \sigma_i"/>.</p>
<p>Hence, we have that <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_65924bb3a877c778913cda354474d0a3.png"  class="tex" align="absmiddle" title="\textstyle \mathrm{inv}(\sigma) = \mathrm{inv}(w) + \sum_{i=1}^k \mathrm{inv}(\sigma_i)"/>.</p>
<p>By subtracting <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_e89311da604872da23f33a119cba4aa9.png"  class="tex" align="absmiddle" title="\textstyle m_i"/> from each of the elements of <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_2ccbfc9822536e7c837ac39fd8efacd0.png"  class="tex" align="absmiddle" title="\textstyle \sigma_i"/>, we obtain a standard permutation <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_7ab3c151a311c70a9d52fb1e6ced0dc1.png"  class="tex" align="absmiddle" title="\textstyle \sigma^*_i \in \mathfrak{S}_{n_i}"/>, and this is obviously inversion-preserving.</p>
<p>So, we have a weight-preserving bijection:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_78d5b4426e54588c16f98fc589e6dc97.png"  class="tex" align="absmiddle" title="\begin{align*}<br />
(\mathfrak{S}_n,\mathrm{inv}) &amp;\,\,\tilde\to\,\, (\mathfrak{W}^{(n)}_{n_1,\dots,n_k},\mathrm{inv})\times(\mathfrak{S}_{B_1},\mathrm{inv})\times \cdots \times (\mathfrak{S}_{B_k},\mathrm{inv})\\<br />
               &amp;\,\,\tilde\to\,\, (\mathfrak{W}^{(n)}_{n_1,\dots,n_k},\mathrm{inv})\times(\mathfrak{S}_{n_1},\mathrm{inv})\times \cdots \times (\mathfrak{S}_{n_k},\mathrm{inv})<br />
\end{align*}" /></center></p>
<p>Hence, we have a corresponding equation of generating series. Let <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_ddbd3f80dfdb7b8272ba3faeea83a0a8.png"  class="tex" align="absmiddle" title="\textstyle W^{(n)}_{n_1,n_2,\cdots,n_k}(q)"/> be the generating series for<br />
<img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_6e2ce865c8f2ce94d6605e361a85e4e8.png"  class="tex" align="absmiddle" title="\textstyle (\mathfrak{W}^{(n)}_{n_1,\dots,n_k},\mathrm{inv})"/>. Then:<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_80a64e8043c21babdac979b05713c021.png"  class="tex" align="absmiddle" title=" [n]_q! = W^{(n)}_{n_1,n_2,\cdots,n_k}(q) [n_1]_q! [n_2]_q! \cdots [n_k]_q!" /></center><br />
and hence,<br />
<center><img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_d02968ac25aa86ad97fa50c89c28b805.png"  class="tex" align="absmiddle" title="\begin{align*}<br />
W^{(n)}_{n_1,n_2,\cdots,n_k}(q) &amp;= \frac{[n]_q!}{[n_1]_q! [n_2]_q! \cdots [n_k]_q!}\\<br />
&amp;={n\choose n_1,n_2,\dots,n_k}_q<br />
\end{align*}" /></center></p>
<p><a href="http://analogical-engine.com/wordpress/wp-content/uploads/2010/01/inversions.pdf">[pdf version]</a></p>
]]></content:encoded>
			<wfw:commentRss>http://analogical-engine.com/wordpress/?feed=rss2&amp;p=431</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Permutation indices</title>
		<link>http://analogical-engine.com/wordpress/?p=421</link>
		<comments>http://analogical-engine.com/wordpress/?p=421#comments</comments>
		<pubDate>Fri, 08 Jan 2010 23:12:18 +0000</pubDate>
		<dc:creator>Cale</dc:creator>
				<category><![CDATA[Cale]]></category>

		<guid isPermaLink="false">http://analogical-engine.com/wordpress/?p=421</guid>
		<description><![CDATA[Here&#8217;s just a quick post of a plot I did a quite a while back:

This animation shows for  through to  the number of permutations with a given number of inversions and major index. I love the way that discrete structure slowly falls away into something nearly continuous. I would have included more frames [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s just a quick post of a plot I did a quite a while back:</p>
<p><img src="http://analogical-engine.com/wordpress/wp-content/uploads/2010/01/invmaj.gif" alt="invmaj" title="invmaj" width="288" height="288" class="alignnone size-full wp-image-420" /></p>
<p>This animation shows for <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_83d0c224d207cfe85d98d9a00752c91b.png"  class="tex" align="absmiddle" title="\textstyle \mathfrak{S}_1"/> through to <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_e6a414bd5f340a87d173d27ab5fa6c5d.png"  class="tex" align="absmiddle" title="\textstyle \mathfrak{S}_9"/> the number of permutations with a given number of inversions and major index. I love the way that discrete structure slowly falls away into something nearly continuous. I would have included more frames in the animation, but as there are <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_bf5fc2a268cffdf8d7f3383eb65a00ac.png"  class="tex" align="absmiddle" title="\textstyle n! "/> permutations in <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_3307d96087c4020c9e05f33e521b3d40.png"  class="tex" align="absmiddle" title="\textstyle \mathfrak{S}_n"/> it gets expensive to compute these by brute force counting. I would need to come up with a more effective method.</p>
<p>An inversion of a permutation <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_da558f70b613c041e422c4fdcbc2a385.png"  class="tex" align="absmiddle" title="\textstyle \sigma"/> on <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_f9ed2847a4b2d6fff8ab9327550ba888.png"  class="tex" align="absmiddle" title="\textstyle [n]=\{1,\dots,n\}"/> is a pair of elements <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_3fe4f3a8e038eb556e13f7cf706743a5.png"  class="tex" align="absmiddle" title="\textstyle (i,j)"/> with <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_c360e8f34077f7d4bd1158c9aa3d33e1.png"  class="tex" align="absmiddle" title="\textstyle 1 \leq i &lt; j \leq n"/> such that <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_e95eb4464eb439ce2f6f25b7bfa3ed66.png"  class="tex" align="absmiddle" title="\textstyle \sigma(j) &lt; \sigma(i)."/> That is, the permutation reverses their order. The inversion number, <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_b8e5e40440bd4eee1a69bf450c3336ee.png"  class="tex" align="absmiddle" title="\textstyle \mathrm{inv}(\sigma),"/> is the number of such pairs that a given permutation has. For example, the permutation <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_87aeeedcddca3000398ffcf123eb12ce.png"  class="tex" align="absmiddle" title="\textstyle \sigma = [3,1,4,2]"/> (regarded as a word, not a cycle) has inversions <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_28d15298293b2aec8e614e4eb068fb19.png"  class="tex" align="absmiddle" title="\textstyle \{(3,1),(3,2),(4,2)\},"/> and so <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_3a1bd0774011dba423f673872086266d.png"  class="tex" align="absmiddle" title="\textstyle \mathrm{inv}(\sigma) = 3."/></p>
<p>A descent in a permutation <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_da558f70b613c041e422c4fdcbc2a385.png"  class="tex" align="absmiddle" title="\textstyle \sigma"/> is a position <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_f5b17f7b4de99471d43c8dab6c240e35.png"  class="tex" align="absmiddle" title="\textstyle i"/> with <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_ef87bb978930b5cb79b4f2a805db4778.png"  class="tex" align="absmiddle" title="\textstyle 1 \leq i \leq n-1"/> where a larger number occurs immediately before a smaller one. That is, <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_e97405a26f6915034b431aaec9335ddc.png"  class="tex" align="absmiddle" title="\textstyle \sigma(i) &gt; \sigma(i+1)."/> The major index, <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_cdc1b9b88eb3b2d6d0e520c0eb376984.png"  class="tex" align="absmiddle" title="\textstyle \mathrm{maj}(\sigma)"/> is defined as the sum of the descents. For example, in the permutation <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_87aeeedcddca3000398ffcf123eb12ce.png"  class="tex" align="absmiddle" title="\textstyle \sigma = [3,1,4,2]"/> we have descents at the first position (3 falls to 1), and at the third (4 falls to 2). So the major index of this permutation is <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_46aed7c7e2c1198573366fcb175f01e0.png"  class="tex" align="absmiddle" title="\textstyle 1 + 3 = 4."/></p>
<p>The plot shows at position <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_3fe4f3a8e038eb556e13f7cf706743a5.png"  class="tex" align="absmiddle" title="\textstyle (i,j)"/> the number of permutations with exactly <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_f5b17f7b4de99471d43c8dab6c240e35.png"  class="tex" align="absmiddle" title="\textstyle i"/> inversions, and major index <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_a21bbd63b464c65a8c89f8ff443733f3.png"  class="tex" align="absmiddle" title="\textstyle j"/> as a normalised shade of grey, darker meaning larger. Indices increase left to right and top to bottom.</p>
<p>You can easily see from the symmetry of the plots that permutations are equidistributed with respect to these two indices, so that we can expect the polynomial where the coefficient of <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_8ecf53644416ebd64bc8004f87ffcf30.png"  class="tex" align="absmiddle" title="\textstyle q^i t^j"/> is the number of permutations with inversion number <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_f5b17f7b4de99471d43c8dab6c240e35.png"  class="tex" align="absmiddle" title="\textstyle i"/> and major index <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_a21bbd63b464c65a8c89f8ff443733f3.png"  class="tex" align="absmiddle" title="\textstyle j"/> will be a symmetric polynomial in <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_2aaac4d5be2ad4e99cef52aaad619db4.png"  class="tex" align="absmiddle" title="\textstyle q"/> and <img src="http://analogical-engine.com/wordpress/wp-content/cache/tex_0c17dd08b7e7eb5753dcda324cbd8399.png"  class="tex" align="absmiddle" title="\textstyle t."/></p>
]]></content:encoded>
			<wfw:commentRss>http://analogical-engine.com/wordpress/?feed=rss2&amp;p=421</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Source Mathematics Software</title>
		<link>http://analogical-engine.com/wordpress/?p=416</link>
		<comments>http://analogical-engine.com/wordpress/?p=416#comments</comments>
		<pubDate>Thu, 07 Jan 2010 14:02:52 +0000</pubDate>
		<dc:creator>Robin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://analogical-engine.com/wordpress/?p=416</guid>
		<description><![CDATA[Introduction to SAGE
Also, the sage-combinat-dev mailing list.
So, why am I still fumbling along trying to implement inefficient algorithms for basic algebraic and combinatorial structures in Haskell, when efficient versions already exist in this fabulous open source project? Well:

I like the idea of functional programming, especially higher order functions. The fact that the lambda calculus and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.msri.org/communications/vmath/VMathVideos/VideoInfo/4144/show_video">Introduction to SAGE</a></p>
<p>Also, the <a href="http://groups.google.com/group/sage-combinat-devel">sage-combinat-dev</a> mailing list.</p>
<p>So, why am I still fumbling along trying to implement inefficient algorithms for basic algebraic and combinatorial structures in Haskell, when efficient versions already exist in this fabulous open source project? Well:</p>
<ul>
<li>I like the idea of functional programming, especially higher order functions. The fact that the lambda calculus and turing machines provide equivalent models of computation is highly non-trivial. The natural way to decompose a problem into smaller sub-problems in a functional language is very different from the natural way to decompose the same problem in an imperative language. Once you have the &#8220;atomic&#8221; pieces of the puzzle, you can recombine them in novel ways. Having new ways to break something apart suggests new ways to put it back together again.</li>
<li>One of the things that originally attracted me to mathematics is the fact that everything can be reduced to first principles. Foundational paradoxes aside, I have always felt uncomfortable proving theorems using the results of other theorems which I don&#8217;t myself know how to prove. Similarly, I have always felt uncomfortable programming with sophisticated libraries, the inner workings of which I have no understanding. For this reason, I would like to implement my own &#8220;toy algorithms&#8221; for manipulating daily mathematical objects, even if in practice I end up using somebody elses library for efficiency reasons.</li>
<li>From what limited programming experience I have, the one thing I have learned is that even very simple things are actually much more complicated than they first seem. Forcing myself to explain my reasoning to a computer is a great way to uncover hidden, unarticulated assumptions. Even if this is a painful process, the resulting clarity of vision seems worth it.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://analogical-engine.com/wordpress/?feed=rss2&amp;p=416</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
