<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="m11078">
  <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Downsampling as a Matrix Operation</name>
  <metadata xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
  <md:version xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2.1</md:version>
  <md:created xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2003/03/19</md:created>
  <md:revised xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2003/03/26</md:revised>
  <md:authorlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
      <md:author xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="selesi">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Ivan</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Selesnick</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">selesi@taco.poly.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="emaloney">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Erin</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Maloney</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">emaloney@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="selesi">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Ivan</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Selesnick</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">selesi@taco.poly.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">decimation</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">downsampling</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">matrix</md:keyword>
  </md:keywordlist>

  <md:abstract xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"/>
</metadata>

  <content xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para1">
      The downsampler is a linear system, but it is not
      time-invariant.  (<cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="fig1" strength="9"/>)
    </para>

    <figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="fig1">
      <media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/jpg" src="sec3fig1.jpg"/>
    </figure>

    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para2">
      <m:math display="block">
	<m:apply>
	  <m:eq/>
	  <m:apply>
	    <m:ci type="fn">y</m:ci>
	    <m:ci>n</m:ci>
	  </m:apply>
	  <m:apply>
	    <m:ci type="fn">x</m:ci>
	    <m:apply>
	      <m:cn>2</m:cn>
	      <m:ci>n</m:ci>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math>

      The downsampler can also be represented in matrix form.

      <m:math display="block">
	<m:apply>
	  <m:eq/>
	  <m:vector>
	    <m:ci>⋮</m:ci>
	    <m:ci><m:msub><m:mi>y</m:mi><m:mn>0</m:mn></m:msub></m:ci>
	    <m:ci><m:msub><m:mi>y</m:mi><m:mn>1</m:mn></m:msub></m:ci>
	    <m:ci><m:msub><m:mi>y</m:mi><m:mn>2</m:mn></m:msub></m:ci>
	    <m:ci><m:msub><m:mi>y</m:mi><m:mn>3</m:mn></m:msub></m:ci>
	    <m:ci>⋮</m:ci>
	  </m:vector>
	  <m:apply>
	    <m:times/>
	    <m:matrix>
	      <m:matrixrow>
		<m:mphantom/> <m:ci>⋮</m:ci> <m:mphantom/> <m:mphantom/><m:mphantom/><m:mphantom/>
		<m:mphantom/> <m:ci>⋮</m:ci> <m:mphantom/> 
	      </m:matrixrow>
	      <m:matrixrow>
		<m:ci>…</m:ci> <m:cn>1</m:cn> <m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
		<m:cn>0</m:cn><m:cn>0</m:cn><m:ci>…</m:ci> 
	      </m:matrixrow>
	      <m:matrixrow>
		<m:ci>…</m:ci> <m:cn>0</m:cn> <m:cn>0</m:cn><m:cn>1</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
		<m:cn>0</m:cn><m:cn>0</m:cn><m:ci>…</m:ci> 
	      </m:matrixrow>
	      <m:matrixrow>
		<m:ci>…</m:ci> <m:cn>0</m:cn> <m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>1</m:cn>
		<m:cn>0</m:cn><m:cn>0</m:cn><m:ci>…</m:ci> 
	      </m:matrixrow>
	      <m:matrixrow>
		<m:ci>…</m:ci> <m:cn>0</m:cn> <m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
		<m:cn>0</m:cn><m:cn>1</m:cn><m:ci>…</m:ci> 
	      </m:matrixrow>
	      <m:matrixrow>
		<m:mphantom/> <m:ci>⋮</m:ci> <m:mphantom/> <m:mphantom/><m:mphantom/><m:mphantom/>
		<m:ci>⋮</m:ci> <m:mphantom/>  <m:mphantom/> 
	      </m:matrixrow>
	    </m:matrix>
	    <m:vector>
	      <m:ci>⋮</m:ci>
	      <m:ci><m:msub><m:mi>x</m:mi><m:mn>0</m:mn></m:msub></m:ci>
	      <m:ci><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub></m:ci>
	      <m:ci><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub></m:ci>
	      <m:ci><m:msub><m:mi>x</m:mi><m:mn>3</m:mn></m:msub></m:ci>
	      <m:ci><m:msub><m:mi>x</m:mi><m:mn>4</m:mn></m:msub></m:ci>
	      <m:ci><m:msub><m:mi>x</m:mi><m:mn>5</m:mn></m:msub></m:ci>
	      <m:ci><m:msub><m:mi>x</m:mi><m:mn>6</m:mn></m:msub></m:ci>
	      <m:ci>⋮</m:ci>
	    </m:vector>
	  </m:apply>
	</m:apply>
      </m:math> where
      <m:math>
	<m:apply>
	  <m:eq/>
	  <m:ci type="matrix">D</m:ci>
	  <m:matrix>
	    <m:matrixrow>
	      <m:mphantom/> <m:ci>⋮</m:ci> <m:mphantom/> <m:mphantom/><m:mphantom/><m:mphantom/>
	      <m:mphantom/> <m:ci>⋮</m:ci> <m:mphantom/> 
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>…</m:ci> <m:cn>1</m:cn> <m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
	      <m:cn>0</m:cn><m:cn>0</m:cn><m:ci>…</m:ci> 
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>…</m:ci> <m:cn>0</m:cn> <m:cn>0</m:cn><m:cn>1</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
	      <m:cn>0</m:cn><m:cn>0</m:cn><m:ci>…</m:ci> 
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>…</m:ci> <m:cn>0</m:cn> <m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>1</m:cn>
	      <m:cn>0</m:cn><m:cn>0</m:cn><m:ci>…</m:ci> 
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>…</m:ci> <m:cn>0</m:cn> <m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
	      <m:cn>0</m:cn><m:cn>1</m:cn><m:ci>…</m:ci> 
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:mphantom/> <m:ci>⋮</m:ci> <m:mphantom/> <m:mphantom/><m:mphantom/><m:mphantom/>
	      <m:ci>⋮</m:ci> <m:mphantom/>  <m:mphantom/> 
	    </m:matrixrow>
	  </m:matrix>
	</m:apply>
      </m:math>.

    </para>

    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para3">
      We can write
      <m:math display="block">
	<m:apply>
	  <m:eq/>
	  <m:ci type="vector">y</m:ci>
	  <m:apply>
	    <m:times/>
	    <m:ci type="matrix">D</m:ci>
	    <m:ci type="vector">x</m:ci>
	  </m:apply>
	</m:apply>
      </m:math>

      where <m:math><m:ci type="matrix">D</m:ci></m:math> is the
      infinite matrix having the form shown.  Note that the matrix
      <m:math><m:ci type="matrix">D</m:ci></m:math> that represents
      downsampling is not a Toeplitz matrix -- it is not constant
      along the diagonals. As we know, the downsampling operation can
      not be represented as a convolution.
    </para>

    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para4">
      Let's see what the transpose of the downsampler is. We can do
      this by observing the form of the transpose of the matrix
      <m:math><m:ci type="matrix">D</m:ci></m:math>, which has the
      following form:
      <m:math display="block">
	<m:apply>
	  <m:eq/>
	  <m:apply>
	    <m:transpose/>
	    <m:ci type="matrix">D</m:ci>
	  </m:apply>
	  <m:matrix>
	    <m:matrixrow>
	      <m:mphantom/> <m:ci>⋮</m:ci> <m:mphantom/> <m:mphantom/> 
	      <m:ci>⋮</m:ci> <m:mphantom/> 
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>…</m:ci> <m:cn>1</m:cn> <m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>  <m:ci>…</m:ci> 
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>…</m:ci> <m:cn>0</m:cn> <m:cn>0</m:cn> <m:cn>0</m:cn><m:cn>0</m:cn>
	      <m:ci>…</m:ci> 
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>…</m:ci> <m:cn>0</m:cn> <m:cn>1</m:cn> <m:cn>0</m:cn><m:cn>0</m:cn>
	      <m:ci>…</m:ci> 
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>…</m:ci> <m:cn>0</m:cn> <m:cn>0</m:cn> <m:cn>0</m:cn><m:cn>0</m:cn>
	      <m:ci>…</m:ci> 
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>…</m:ci> <m:cn>0</m:cn> <m:cn>0</m:cn> <m:cn>1</m:cn><m:cn>0</m:cn>
	      <m:ci>…</m:ci> 
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>…</m:ci> <m:cn>0</m:cn> <m:cn>0</m:cn> <m:cn>0</m:cn><m:cn>0</m:cn>
	      <m:ci>…</m:ci> 
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>…</m:ci> <m:cn>0</m:cn> <m:cn>0</m:cn> <m:cn>0</m:cn><m:cn>1</m:cn>
	      <m:ci>…</m:ci> 
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:mphantom/> <m:ci>⋮</m:ci> <m:mphantom/> <m:mphantom/> 
	      <m:ci>⋮</m:ci> <m:mphantom/> 
	    </m:matrixrow>
	  </m:matrix>
	</m:apply>
      </m:math>
      The matrix <m:math><m:apply><m:transpose/><m:ci type="matrix">D</m:ci></m:apply></m:math>
      represents upsampling:

      <m:math display="block">
	<m:apply>
	  <m:ci><m:mo>⇔</m:mo></m:ci>
	  <m:apply>
	    <m:eq/>
	    <m:ci>z</m:ci>
	    <m:apply>
	      <m:times/>
	      <m:apply>
		<m:transpose/>
		<m:ci type="matrix">D</m:ci>
	      </m:apply>
	      <m:ci>y</m:ci>
	    </m:apply>
	  </m:apply>
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:ci type="fn">z</m:ci>
	      <m:ci>n</m:ci>
	    </m:apply>
	    <m:apply>
	      <m:ci><m:mrow><m:mo>[</m:mo><m:mo>↑</m:mo><m:mn>2</m:mn><m:mo>]</m:mo></m:mrow></m:ci>
	      <m:apply>
		<m:ci type="fn">y</m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math>

      Note that
      <m:math>
	<m:apply>
	  <m:neq/>
	  <m:apply>
	    <m:times/>
	    <m:apply>
	      <m:transpose/>
	      <m:ci type="matrix">D</m:ci>
	    </m:apply> 
	    <m:ci type="matrix">D</m:ci> 
	  </m:apply> 
	  <m:ci type="matrix">I</m:ci> 
	</m:apply>
      </m:math> so therefore upsampling is not an orthogonal
      transformation. Indeed, when the matrix product
      <m:math>
	<m:apply>
	  <m:times/>
	  <m:apply>
	    <m:transpose/> 
	    <m:ci type="matrix">D</m:ci>
	  </m:apply>
	  <m:ci type="matrix">D</m:ci>
	</m:apply>
      </m:math> is computed, we find that

      <m:math display="block">
	<m:apply>
	  <m:eq/>
	  <m:apply>
	    <m:times/>
	    <m:apply>
	      <m:transpose/>
	      <m:ci type="matrix">D</m:ci>
	    </m:apply>
	    <m:ci type="matrix">D</m:ci>
	  </m:apply>
	  <m:matrix>
	    <m:matrixrow>
	      <m:mphantom/> <m:ci>⋮</m:ci> <m:mphantom/> <m:mphantom/><m:mphantom/><m:mphantom/>
	      <m:ci>⋮</m:ci> <m:mphantom/> 
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>…</m:ci> <m:cn>1</m:cn> <m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
	      <m:cn>0</m:cn><m:ci>…</m:ci> 
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>…</m:ci> <m:cn>0</m:cn> <m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
	      <m:cn>0</m:cn><m:ci>…</m:ci> 
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>…</m:ci> <m:cn>0</m:cn> <m:cn>0</m:cn><m:cn>1</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
	      <m:cn>0</m:cn><m:ci>…</m:ci> 
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>…</m:ci> <m:cn>0</m:cn> <m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
	      <m:cn>0</m:cn><m:ci>…</m:ci> 
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>…</m:ci> <m:cn>0</m:cn> <m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>1</m:cn>
	      <m:cn>0</m:cn><m:ci>…</m:ci> 
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>…</m:ci> <m:cn>0</m:cn> <m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
	      <m:cn>0</m:cn><m:ci>…</m:ci> 
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>…</m:ci> <m:cn>0</m:cn> <m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
	      <m:cn>1</m:cn><m:ci>…</m:ci> 
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:mphantom/> <m:ci>⋮</m:ci> <m:mphantom/><m:mphantom/><m:mphantom/>
	      <m:ci>⋮</m:ci> <m:mphantom/><m:mphantom/> 
	    </m:matrixrow>
	  </m:matrix>
	</m:apply>
      </m:math>
      So

      <m:math display="block">
	<m:apply>
	  <m:ci><m:mo>⇔</m:mo></m:ci>
	  <m:apply>
	    <m:eq/>
	    <m:ci>z</m:ci>
	    <m:apply>
	      <m:times/>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:transpose/>
		  <m:ci type="matrix">D</m:ci>
		</m:apply>
		<m:ci type="matrix">D</m:ci>
	      </m:apply>
	      <m:ci>x</m:ci>
	    </m:apply>
	  </m:apply>
	  <m:apply>
	    <m:eq/>
	    <m:apply>
	      <m:ci type="fn">z</m:ci>
	      <m:ci>n</m:ci>
	    </m:apply>
	    <m:apply>
	      <m:ci><m:mrow><m:mo>[</m:mo><m:mo>↑</m:mo><m:mn>2</m:mn><m:mo>]</m:mo></m:mrow></m:ci>
	      <m:ci><m:mrow><m:mo>[</m:mo><m:mo>↓</m:mo><m:mn>2</m:mn><m:mo>]</m:mo></m:mrow></m:ci>
	      <m:apply>
		<m:ci type="fn">x</m:ci>
		<m:ci>n</m:ci>
	      </m:apply>
	    </m:apply>
	    <m:piecewise>
	      <m:piece>
		<m:apply>
		  <m:ci type="fn">x</m:ci>
		  <m:ci>n</m:ci>
		</m:apply>
		<m:mrow><m:mn>n</m:mn><m:mtext> is even</m:mtext></m:mrow>
	      </m:piece>
	      <m:piece>
		<m:apply>
		  <m:cn>0</m:cn>
		</m:apply>
		<m:mrow><m:mn>n</m:mn><m:mtext> is odd</m:mtext></m:mrow>
	      </m:piece>
	    </m:piecewise>
	  </m:apply>
	</m:apply>
      </m:math>

      Equivalently,

      <m:math display="block">
	<m:apply>
	  <m:eq/>
	  <m:apply>
	    <m:ci type="fn">Z</m:ci>
	    <m:ci>z</m:ci>
	  </m:apply>
	  <m:apply>
	    <m:times/>
	    <m:cn>0.5</m:cn>
	    <m:apply>
	      <m:plus/>
	      <m:apply>
		<m:ci type="fn">X</m:ci>
		<m:ci>z</m:ci>
	      </m:apply>
	      <m:apply>
		<m:ci type="fn">X</m:ci>
		<m:apply>
		  <m:minus/>
		  <m:ci>z</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math>

    </para>
  </content>
</document>
