<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Rip's Applied Mathematics Blog</title>
	<atom:link href="http://rip94550.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://rip94550.wordpress.com</link>
	<description>applications of mathematics</description>
	<lastBuildDate>Mon, 21 Dec 2009 01:29:51 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='rip94550.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/867289f4a4eced848533b34da2694c4b?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Rip's Applied Mathematics Blog</title>
		<link>http://rip94550.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://rip94550.wordpress.com/osd.xml" title="Rip&#8217;s Applied Mathematics Blog" />
		<item>
		<title>Books Added: Wavelets</title>
		<link>http://rip94550.wordpress.com/2009/12/20/books-added-wavelets/</link>
		<comments>http://rip94550.wordpress.com/2009/12/20/books-added-wavelets/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 01:29:51 +0000</pubDate>
		<dc:creator>rip</dc:creator>
				<category><![CDATA[books added]]></category>
		<category><![CDATA[math time series]]></category>
		<category><![CDATA[wavelets]]></category>

		<guid isPermaLink="false">http://rip94550.wordpress.com/?p=2210</guid>
		<description><![CDATA[Summary
I used Hubbard, Frazier, and Nievergelt as introductions. When I last touched wavelets, I was searching through all three of Burrus et al., Strang &#38; Ngygen, and Daubechies to learn more about wavelets. I can&#8217;t say I was working through any one of them, but I was certainly trying to find things in all three [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&blog=2063738&post=2210&subd=rip94550&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h2>Summary</h2>
<p>I used <strong>Hubbard, Frazier, and Nievergelt</strong> as introductions. When I last touched wavelets, I was searching through all three of <strong>Burrus et al., Strang &amp; Ngygen, and Daubechies</strong> to learn more about wavelets. I can&#8217;t say I was working through any one of them, but I was certainly trying to find things in all three of them.</p>
<h2>discussion</h2>
<p>I can categorize my wavelet books as:</p>
<ul>
<li>for math people, for electrical engineering, and/or for general technical;</li>
<li>textbook or monograph;</li>
<li>elementary, upper division, or advanced.</li>
</ul>
<p>I can also note whether they have code in some form, sample calculations, and how much start-up time they seem to take.</p>
<p>You will see what I mean as I introduce the books. Most of these classifications are not hard and fast; the clearest distinction is between <strong>textbook or monograph &#8212; does it or does it not have exercises?</strong> And the phrase <strong>upper division should be interpreted as &#8220;upper division or early graduate student&#8221;.</strong></p>
<p>First, we have an elementary, general technical, monograph: &#8220;The World According to Wavelets&#8221; by Barbara <strong>Hubbard</strong>. It is an excellent, accurate introduction to wavelets: what they are, and what we can do with them. The book is divided into two parts: the first half requires no more than some high school math; the second half is a collection of short descriptions of the mathematics she left out of the first half. The only reason I call it a monograph is that it has no exercises. It is the only book which I call elementary.</p>
<p>If you are wondering, &#8220;What are wavelets?&#8221;, <strong>Hubbard</strong> is an excellent starting point. Let me quote one of the reviewers whom I recognize, T.W, Körner, the author of the wonderful books &#8216;Fourier Analysis&#8217; and &#8216;A Companion to Analysis&#8217;: &#8220;(A) splendid little book&#8230; I can confidently recommend Barbara Hubbard&#8217;s book as mathematically reliable, historically accurate and free of hype.&#8221;</p>
<p>It would help if you have seen something of Fourier series &#8212; but it&#8217;s not necessary. The first half of the book is an English language introduction to the subject; the second half of the book supplies mathematical detail.</p>
<p>Some time ago, I encountered the phrase &#8220;matching pursuit&#8221; in a context which suggested that it had something to do with signal analysis. I, of course, did a Google search. And yet, if I had had sense enough to reach for Hubbard, I would have found a more appropriate answer. All I wanted to know was where in the universe &#8220;matching pursuit&#8221; lived; I wasn&#8217;t interested in the architectural details of its house. She had the answer I sought.</p>
<p>The book is an excellent overview. It may leave the reader hungry for detail, but detail is not what she is trying to provide. In fact, I think she&#8217;s trying to make the reader hungry.</p>
<p>On the downside, the book does not appear to be available in paperback, and at $60 list price (a little less on Amazon), it is a pricey overview.</p>
<p>That book did not have enough detail to get me started with wavelets. For that, I used &#8220;Wavelets Made Easy&#8221; by Yves <strong>Nievergelt</strong>. It is an upper division textbook, and I would call it general technical. Yes, it has a fair bit of mathematics in it, and it even has proofs; but its audience is more general than just math majors.</p>
<p>Nievergelt offers detailed calculations of wavelet coefficients for Haar and Daubechies D4. On the other hand, his code for Daubechies wavelets is sketchy. It&#8217;s a nice, clear, introductory book &#8212; but we&#8217;ll have to write our own code for carrying things out.</p>
<p>This book begins by showing, in almost gory detail, how to compute the wavelet coefficients for the Haar wavelets. It seems to be limited (!) to the Haar and Daubechies wavelets, but it goes into higher dimensions than 1D; it includes three chapters on basic Fourier analysis.</p>
<p>That book gave me a good feeling for the Haar wavelets, but left me wondering how it all applied to Daubechies wavelets &#8212; even though he did cover the Daubechies wavelets. I moved on to &#8220;An Introduction to Wavelets Through Linear Algebra&#8221; by Michael <strong>Frazier</strong>. It is an upper division textbook, more mathematics than general technical &#8212; but its mathematics is pretty well limited to linear algebra, which I would hope would give it a wide audience. It added more wavelets to my pantry, specifically Shannon. It showed me how to compute wavelet coefficients, but the efficient methods of computation were not emphasized.</p>
<p>It is a marvelous linear algebra book. Here&#8217;s how little I understood of the discrete Fourier transform (DFT): it is a change of basis. I didn&#8217;t know that until I started working in <strong>Frazier</strong> a few years ago. Since then, of course I&#8217;ve seen it everywhere. He does not emphasize the quick, slick way to compute wavelet coefficients, so I am looking forward to picking him up again after I have created working Mathematica® code to do that.</p>
<p>At about the same time, I picked up &#8220;Wavelets and Filter Banks&#8221; by Gilbert <strong>Strang</strong> and Truong <strong>Nguyen</strong>. This is an upper division textbook, both mathematics and electrical engineering. It uses the languages of both subjects. Although I had never heard of a filter bank when I saw the book, that Strang was one of the authors meant that I had to have the book. (All of you electrical engineers are allowed to snicker at my struggling through filter banks, quadrature mirror filters, the polyphase matrix, etc.)</p>
<p>It is a remarkable book. In its language and style, it is bedtime reading. In content, however, it is a textbook for MIT. It reminds me of sitting in the mathematics department lounge listening to a professor talking casually about a subject &#8212; except that this casual talk is accompanied by detailed notes, which I get to look at later, at my leisure.</p>
<p>I come to it knowing the vocabulary rather than the experience of discrete signal processing (DSP); this appears to be enough, for me. I bring to it more mathematics than they are assuming, and, almost certainly, less electrical engineering. One of their purposes was to describe filter banks using the languages of both mathematics and signal processing.</p>
<p>Formally, I suspect that this book presupposes an introductory course in signals and systems. I think it is being used as an upper division book at MIT.</p>
<p>I found it difficult, however, to see how to do computations. In particular, infinite dimensional matrices bother me, computationally speaking. The book that has finally let me sink my teeth into wavelets is &#8220;Introduction to Wavelets and Wavelet Transforms: a Primer&#8221; by <strong>Burrus, Gopinath, and Guo</strong>, which I also refer to as <strong>Burrus et al</strong>. This is an upper division monograph &#8212; there are no exercises &#8212; for a general technical audience. Now, I have already had to use <strong>Strang &amp; Nguyen</strong> to figure out exactly how to do what <strong>Burrus et al.</strong> called &#8220;a similar calculation&#8221;; and it will take some work to extract their examples, because they usually only provide pictures; but by and large this is a wonderful book, and I recommend it highly for hands-on wavelets. As I have said in this post, they provide both printed and electronic Matlab code. They also describe a wide collection of wavelets.</p>
<p><strong>Burrus et al</strong>. is a step deeper into the details. This is the book that shows me four ways to compute the D4 scaling function (two of which I&#8217;ve shown you), and provides the code. I like this book because it appears to be a very nice companion to <strong>Strang and Nguyen</strong>, and a very nice introduction to <strong>Daubechies</strong>. I think I can say that it is aimed at technical readers, but not specifically at mathematicians or electrical engineers.</p>
<p>On the downside, although the book provides code for computing the discrete wavelet transform (DWT) and its inverse, it has no examples. That is, it has no data against which you can check the code. On the upside, what code I have tried, works &#8212; which is more than I can say for some books.</p>
<p>Maybe now is a good time to point out that once we understand the wavelet decomposition, we can verify our code on any examples we choose, because the wavelet coefficients we compute are the components of our data wrt a basis. That is, we can confirm that given function or data is equal to the computed expansion in wavelets. The lack of examples isn&#8217;t all that crucial.</p>
<p>Oh, I am in their Chapter 5 at present, and Chapter 6 looks pretty reasonable, too.  Chapter 7 looks like rather more complicated &#8212; but not particularly advanced &#8212; mathematics, and Chapter 8 is about filter banks. If the book holds true to form, chapter 8 will be a reasonable first introduction to filter banks.</p>
<p>But every once in a while <strong>Burrus</strong> is sadly incomplete. As I said earlier, I have had to use <strong>Strang &amp; Nguyen</strong> to find the details of &#8220;a similar calculation&#8221; – they were not obvious! – and how to compute the mother wavelet was a bit obscure.</p>
<p>Okay, so much for the auxiliary material, for right now. &#8220;Read the masters,&#8221; they say. That brings us to &#8220;Ten lectures on Wavelets&#8221; by Ingrid <strong>Daubechies</strong>. This is, strictly speaking, an advanced mathematical monograph. Nevertheless, the book is aimed at a wide technical audience, and she did a remarkable job of explaining what she was doing. Remarkable, I say. She is worth quoting on this:</p>
<blockquote><p>&#8220;This book is a mathematics book: it states and proves many theorems.<br />
&#8220;&#8230; most of the book can be followed with just the basic notions of Fourier analysis. Moreover, I have tried to keep a very pedestrian pace in almost all proofs, at the risk of boring some mathematically sophisticated readers. I hope therefore that these lecture notes will interest people other than mathematicians&#8230;. I hope to succeed in sharing with my readers some of the excitement that this interdisciplinary subject has brought into my scientific life.&#8221;</p></blockquote>
<p><strong>Daubechies</strong> is the place to look for the mathematics of wavelets. It is readable &#8212; perhaps as readable as any mathematics book can be. <strong>Burrus</strong> looks like a nice introduction to it.</p>
<p>Let me also say: <strong>Daubechies</strong> is not easy reading, but it&#8217;s accessible because she describes so clearly what she is doing. (I&#8217;m about to see if she tells me how to compute the mother wavelet from the scaling function&#8230;. Yes.)</p>
<p>The primer by <strong>Burrus, Gopinath, and Guo</strong> is an excellent introduction to <strong>Daubechies</strong>, but no substitute for it. That&#8217;s one of the reasons I hope that they will also make <strong>Strang and Nguyen</strong> more accessible to me.</p>
<h2>Summary repeated</h2>
<p>I used <strong>Hubbard, Frazier, and Nievergelt</strong> as introductions. When I last touched wavelets, I was searching through all three of <strong>Burrus et al., Strang &amp; Ngygen, and Daubechies</strong> to learn more about wavelets. I can&#8217;t say I was working through any one of them, but I was certainly trying to find things in all three of them.</p>
<h2>the books added</h2>
<p>Burrus, C. Sidney; Gopinath, Ramesh A.; Guo, Haitao. <b>Introduction to Wavelets and Wavelet Transforms, A Primer.</b> Prentice Hall, 1998.<br />
ISBN 0 13 489600 9.<br />
[wavelets; 20 Dec 2009]<br />
Finally! A book that shows me how to compute things properly. &#8220;We tried to present this in a way that is accessible to the engineer, scientist, and applied mathematician&#8230;&#8221;  I think it is accessible to a technical undergraduate, but I could be underestimating the mathematics. Guide to further reading. No answers as such, but MATLAB code and pictures drawn using it.</p>
<p>Daubechies, Ingrid; <b>Ten Lectures on Wavelets.</b> Society for Industrial &amp; Applied Mathematics,  1992;<br />
ISBN 0 89871 274 2.<br />
[wavelets; 20 Dec 2009]<br />
This is one of &#8220;the books&#8221;, an essential reference for the mathematics of wavelets. She is now famous for early work on wavelets. She is a fine expositor, and although I often do not understand what she is doing, she explains why she is doing it – and that is a tremendous help for reading other books.</p>
<p>Frazier, Michael W.; <b>An Introduction to Wavelets Through Linear Algebra.</b> Springer, 1999.<br />
ISBN 0 387 98639 1.<br />
[wavelets, linear algebra; 20 Dec 2009]<br />
&#8220;Undergraduate Texts in Mathematics&#8221;. Requires only linear algebra and some calculus; a &#8220;topics&#8221; course for math majors. I had no idea that the Discrete Fourier Transform was a change-of-basis! This is where I began to learn the theory of computing wavelets, although it didn&#8217;t take me far enough. Guide to further reading.</p>
<p>Hubbard, Barbara Burke; <b>The World According to Wavelets.</b> A.K. Peters, 1998.<br />
ISBN 1 56881 072 5.<br />
[wavelets; 20 Dec 2009]<br />
This is an extraordinary semi-popular introduction to wavelets and the underlying mathematics. It is written on two levels. Part I is written in English, with some graphs; Part II provides the equations and more detail. Part I is at a &#8220;popular&#8221; level; Part II pretty much requires a technical background, but might serve to whet someone&#8217;s appetite for mathematics or applied mathematics.</p>
<p>Nievergelt, Yves. <b>Wavelets Made Easy</b>. Birkhäuser, 2001 (2nd printing with corrections).<br />
ISBN 0 8176 4061 4.<br />
[wavelets; 20 Dec 2009]<br />
 The first two chapters give us the fast wavelet transform for Haar and Daubechies wavelet coefficients. This is where I did my very first computations in wavelets. The rest of the book looks like the &#8220;advanced calculus&#8221; of wavelets. </p>
<p>Strang, Gilbert; Nguyen, Truong.<b>Wavelets and Filter Banks.</b>Wellesley-Cambridge Press, 1997 (revised edition).<br />
ISBN 0 9614088 7 1.<br />
[wavelets, filter banks; 20 Dec 2009]<br />
This is challenging material presented with a light-hearted style, and I can enjoy the style while wondering what is going on. I have to think that this text presupposes some exposure to digital signal processing; some, but perhaps not a lot. &#8220;Our text explains filter banks and wavelets from the beginning &#8212; in several ways and at least two languages (mathematics and signal processing). A small collection of papers at the end, and the final chapter (Applications) are effectively an epilog for what&#8217;s next.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rip94550.wordpress.com/2210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rip94550.wordpress.com/2210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rip94550.wordpress.com/2210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rip94550.wordpress.com/2210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rip94550.wordpress.com/2210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rip94550.wordpress.com/2210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rip94550.wordpress.com/2210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rip94550.wordpress.com/2210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rip94550.wordpress.com/2210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rip94550.wordpress.com/2210/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&blog=2063738&post=2210&subd=rip94550&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://rip94550.wordpress.com/2009/12/20/books-added-wavelets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eda25c1223d5c501eea15aab3feba8ac?s=96&#38;d=identicon" medium="image">
			<media:title type="html">rip</media:title>
		</media:content>
	</item>
		<item>
		<title>Color: Cohen&#8217;s intriguing F matrix again</title>
		<link>http://rip94550.wordpress.com/2009/12/13/color-cohens-intriguing-f-matrix-again/</link>
		<comments>http://rip94550.wordpress.com/2009/12/13/color-cohens-intriguing-f-matrix-again/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 01:26:59 +0000</pubDate>
		<dc:creator>rip</dc:creator>
				<category><![CDATA[color]]></category>
		<category><![CDATA[math linear algebra]]></category>
		<category><![CDATA[Cohen]]></category>
		<category><![CDATA[linear algebra]]></category>
		<category><![CDATA[mathematics]]></category>

		<guid isPermaLink="false">http://rip94550.wordpress.com/?p=2632</guid>
		<description><![CDATA[Let me run thru the derivation of Figure 20 again, still with the CIE 1964 tables, but at 20 nm intervals. Then I show two alternative calculations. And one of them will show us why Cohen switched the sign on f2.
There is interesting linear algebra and vector algebra in this post, even if you&#8217;re not [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&blog=2063738&post=2632&subd=rip94550&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Let me run thru the derivation of Figure 20 again, still with the CIE 1964 tables, but at 20 nm intervals. Then I show two alternative calculations. And one of them will show us why Cohen switched the sign on f2.</p>
<p>There is interesting linear algebra and vector algebra in this post, even if you&#8217;re not interested in where these problems came from.</p>
<h2>Review:</h2>
<p>What we are aiming for is an orthonormal basis whose three vectors are the columns of an F matrix. In particular, the first column &#8212; the first basis vector &#8212; is the fundamental of an equal-energy illuminant. The challenge was to find two other columns of F which matched Cohen&#8217;s Figure 20.</p>
<p>There were scaling issues all over the place. In particular, Cohen&#8217;s final three vectors were orthogonal but not orthonormal, because they were not of unit length. <a href="http://rip94550.wordpress.com/2009/12/06/color-cohen-figure-20-an-intriguing-f-matrix/">Having matched Figure 20</a>, I will no longer concern myself with his scaling; unit vectors, I want unit vectors.</p>
<p>Let&#8217;s grab things as we need them.</p>
<p>Since I&#8217;ve shown you pictures derived from the 1964 xyz bar tables, I&#8217;ll stay with 1964.</p>
<p>What range of wavelengths? The CIE 1964 xyz bar tables run from 380 to 780. What the heck, just use 400 to 700 as before.</p>
<p>What interval? 20 nm, so I can display things.</p>
<p>Then my A matrix is the following subset of the CIE 1964 xyz bar tables:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=A+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+0.0191+%26+0.002+%26+0.086+%5C%5C+0.2045+%26+0.0214+%26+0.9725+%5C%5C+0.3837+%26+0.0621+%26+1.9673+%5C%5C+0.3023+%26+0.1282+%26+1.7454+%5C%5C+0.0805+%26+0.2536+%26+0.7721+%5C%5C+0.0038+%26+0.4608+%26+0.2185+%5C%5C+0.1177+%26+0.7618+%26+0.0607+%5C%5C+0.3768+%26+0.962+%26+0.0137+%5C%5C+0.7052+%26+0.9973+%26+0.+%5C%5C+1.0142+%26+0.8689+%26+0.+%5C%5C+1.124+%26+0.6583+%26+0.+%5C%5C+0.8563+%26+0.3981+%26+0.+%5C%5C+0.4316+%26+0.1798+%26+0.+%5C%5C+0.1526+%26+0.0603+%26+0.+%5C%5C+0.0409+%26+0.0159+%26+0.+%5C%5C+0.0096+%26+0.0037+%26+0.%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A = \left(\begin{array}{ccc} 0.0191 &amp; 0.002 &amp; 0.086 \\ 0.2045 &amp; 0.0214 &amp; 0.9725 \\ 0.3837 &amp; 0.0621 &amp; 1.9673 \\ 0.3023 &amp; 0.1282 &amp; 1.7454 \\ 0.0805 &amp; 0.2536 &amp; 0.7721 \\ 0.0038 &amp; 0.4608 &amp; 0.2185 \\ 0.1177 &amp; 0.7618 &amp; 0.0607 \\ 0.3768 &amp; 0.962 &amp; 0.0137 \\ 0.7052 &amp; 0.9973 &amp; 0. \\ 1.0142 &amp; 0.8689 &amp; 0. \\ 1.124 &amp; 0.6583 &amp; 0. \\ 0.8563 &amp; 0.3981 &amp; 0. \\ 0.4316 &amp; 0.1798 &amp; 0. \\ 0.1526 &amp; 0.0603 &amp; 0. \\ 0.0409 &amp; 0.0159 &amp; 0. \\ 0.0096 &amp; 0.0037 &amp; 0.\end{array}\right)' title='A = \left(\begin{array}{ccc} 0.0191 &amp; 0.002 &amp; 0.086 \\ 0.2045 &amp; 0.0214 &amp; 0.9725 \\ 0.3837 &amp; 0.0621 &amp; 1.9673 \\ 0.3023 &amp; 0.1282 &amp; 1.7454 \\ 0.0805 &amp; 0.2536 &amp; 0.7721 \\ 0.0038 &amp; 0.4608 &amp; 0.2185 \\ 0.1177 &amp; 0.7618 &amp; 0.0607 \\ 0.3768 &amp; 0.962 &amp; 0.0137 \\ 0.7052 &amp; 0.9973 &amp; 0. \\ 1.0142 &amp; 0.8689 &amp; 0. \\ 1.124 &amp; 0.6583 &amp; 0. \\ 0.8563 &amp; 0.3981 &amp; 0. \\ 0.4316 &amp; 0.1798 &amp; 0. \\ 0.1526 &amp; 0.0603 &amp; 0. \\ 0.0409 &amp; 0.0159 &amp; 0. \\ 0.0096 &amp; 0.0037 &amp; 0.\end{array}\right)' class='latex' /></p>
<p>There are 16 distinct wavelengths. I take the equal-energy illuminant to have the value 100 for 16 values:</p>
<p>ee= {100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100}</p>
<p>To get its fundamental, I need a projection operator onto the fundamental color space (the pre-image of the range of A&#8217;, the transpose of A). To get that, I need an orthonormal basis for the fundamental color space. To get that, I need the Singular Value Decomposition (SVD) of A&#8217;:</p>
<p>A&#8217; = u w v&#8217;</p>
<p><a href="http://rip94550.wordpress.com/2009/09/07/linear-algebra-the-four-fundamental-subspaces/">We know</a> that the first 3 columns (because A only had 3 columns) of v are an orthonormal basis for the fundamental color space; the remaining 13 (= 16 &#8211; 3) columns of v are an orthonormal basis for the null space of A&#8217;. Here are the first 3 columns of v, and I name them v1:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=v1+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+-0.0253683+%26+0.0153138+%26+0.00589786+%5C%5C+-0.285062+%26+0.175889+%26+0.0585877+%5C%5C+-0.574584+%26+0.357498+%26+0.0807567+%5C%5C+-0.513035+%26+0.307203+%26+-0.0134903+%5C%5C+-0.242873+%26+0.0986244+%26+-0.196418+%5C%5C+-0.112652+%26+-0.0638886+%26+-0.364177+%5C%5C+-0.124169+%26+-0.198387+%26+-0.487962+%5C%5C+-0.173395+%26+-0.313102+%26+-0.431359+%5C%5C+-0.221517+%26+-0.394131+%26+-0.198767+%5C%5C+-0.250764+%26+-0.427605+%26+0.140947+%5C%5C+-0.241369+%26+-0.398876+%26+0.386199+%5C%5C+-0.171479+%26+-0.278411+%26+0.372286+%5C%5C+-0.0839289+%26+-0.135192+%26+0.203385+%5C%5C+-0.0292822+%26+-0.046994+%26+0.0743802+%5C%5C+-0.00781685+%26+-0.012531+%26+0.020133+%5C%5C+-0.00183092+%26+-0.00293336+%26+0.00474977%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='v1 = \left(\begin{array}{ccc} -0.0253683 &amp; 0.0153138 &amp; 0.00589786 \\ -0.285062 &amp; 0.175889 &amp; 0.0585877 \\ -0.574584 &amp; 0.357498 &amp; 0.0807567 \\ -0.513035 &amp; 0.307203 &amp; -0.0134903 \\ -0.242873 &amp; 0.0986244 &amp; -0.196418 \\ -0.112652 &amp; -0.0638886 &amp; -0.364177 \\ -0.124169 &amp; -0.198387 &amp; -0.487962 \\ -0.173395 &amp; -0.313102 &amp; -0.431359 \\ -0.221517 &amp; -0.394131 &amp; -0.198767 \\ -0.250764 &amp; -0.427605 &amp; 0.140947 \\ -0.241369 &amp; -0.398876 &amp; 0.386199 \\ -0.171479 &amp; -0.278411 &amp; 0.372286 \\ -0.0839289 &amp; -0.135192 &amp; 0.203385 \\ -0.0292822 &amp; -0.046994 &amp; 0.0743802 \\ -0.00781685 &amp; -0.012531 &amp; 0.020133 \\ -0.00183092 &amp; -0.00293336 &amp; 0.00474977\end{array}\right)' title='v1 = \left(\begin{array}{ccc} -0.0253683 &amp; 0.0153138 &amp; 0.00589786 \\ -0.285062 &amp; 0.175889 &amp; 0.0585877 \\ -0.574584 &amp; 0.357498 &amp; 0.0807567 \\ -0.513035 &amp; 0.307203 &amp; -0.0134903 \\ -0.242873 &amp; 0.0986244 &amp; -0.196418 \\ -0.112652 &amp; -0.0638886 &amp; -0.364177 \\ -0.124169 &amp; -0.198387 &amp; -0.487962 \\ -0.173395 &amp; -0.313102 &amp; -0.431359 \\ -0.221517 &amp; -0.394131 &amp; -0.198767 \\ -0.250764 &amp; -0.427605 &amp; 0.140947 \\ -0.241369 &amp; -0.398876 &amp; 0.386199 \\ -0.171479 &amp; -0.278411 &amp; 0.372286 \\ -0.0839289 &amp; -0.135192 &amp; 0.203385 \\ -0.0292822 &amp; -0.046994 &amp; 0.0743802 \\ -0.00781685 &amp; -0.012531 &amp; 0.020133 \\ -0.00183092 &amp; -0.00293336 &amp; 0.00474977\end{array}\right)' class='latex' /></p>
<p>We know that we construct a projection operator R onto the column space of v1 by </p>
<p>R = v1 v1&#8242;.</p>
<p>We can quickly check that R is, at least, a projection operator, since it is idempotent: i.e. R^2 = R.</p>
<p>And we can check that it is a projection operator onto the column space of v1, since it preserves each of the columns of v1: i.e. R v1 = v1.</p>
<p>If we wanted, we could confirm that it projects all of the other columns of v to the zero vector: i.e. R v2 = 0, where v2 is the last 13 columns of v.</p>
<p>Enough already, we came here to get the fundamental of the equal energy illuminant&#8230;</p>
<p>f = R ee = {5.53946, 62.01, 125.887, 116.934, 68.0773, 55.4377, 80.9502, 109.171, 126.547, 128.189, 113.072, 76.3005, 36.473, 12.5844, 3.34797, 0.782783}</p>
<p>Make it a unit vector f1&#8230;</p>
<p>f1 = {0.0165427, 0.185182, 0.375939, 0.349205, 0.203302, 0.165555, 0.241744, 0.326021, 0.377912, 0.382816, 0.337672, 0.227859, 0.108921, 0.0375811, 0.00999815, 0.00233765}</p>
<p>For the other two vectors, <a href="http://rip94550.wordpress.com/2009/12/06/color-cohen-figure-20-an-intriguing-f-matrix/">we found that we could match Cohen</a> by taking the three vectors {f1, E2, E3} and applying the Gram-Schmidt orthogonalization procedure&#8230; which is nothing more than subtracting off the part of E2 which is parallel to f1 (and normalizing, to get a unit vector f2), and then subtracting off the part of E3 which is in the span of f1 and f2.</p>
<p>First, we need the E basis; they are the dual basis to A&#8217;; or E&#8217; is the dual basis to A. As always, I find the solution by writing the definition&#8230;</p>
<p>E&#8217;A = I</p>
<p>then writing the <span style="color:#ff0000;"> false </span>(because A&#8217; is not invertible)&#8230;</p>
<p><img src='http://l.wordpress.com/latex.php?latex=E%27+%3D+A%5E%7B-1%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E&#039; = A^{-1}\ ' title='E&#039; = A^{-1}\ ' class='latex' />,</p>
<p>which leads me to write the true</p>
<p><img src='http://l.wordpress.com/latex.php?latex=E%27+%3D+%28A%27A%29%5E%7B-1%7D+A%27%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E&#039; = (A&#039;A)^{-1} A&#039;\ ' title='E&#039; = (A&#039;A)^{-1} A&#039;\ ' class='latex' />.</p>
<p>As usual, that formula is for the transpose E&#8217; but I write E = E&#8221;, the transpose of the transpose:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=E+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+0.00507367+%26+-0.00518039+%26+0.00960814+%5C%5C+0.050171+%26+-0.0533474+%26+0.109524+%5C%5C+0.0711671+%26+-0.0800759+%26+0.224744+%5C%5C+-0.00118297+%26+-0.00392724+%26+0.205467+%5C%5C+-0.140011+%26+0.15312+%26+0.103269+%5C%5C+-0.256404+%26+0.304158+%26+0.0467504+%5C%5C+-0.323667+%26+0.432104+%26+0.0296721+%5C%5C+-0.247916+%26+0.423527+%26+0.0110232+%5C%5C+-0.0411424+%26+0.27367+%26+-0.0156973+%5C%5C+0.237054+%26+0.0289735+%26+-0.0458278+%5C%5C+0.422342+%26+-0.164367+%26+-0.0633192+%5C%5C+0.375936+%26+-0.19191+%26+-0.0524917+%5C%5C+0.200409+%26+-0.110177+%26+-0.027315+%5C%5C+0.0725721+%26+-0.0410648+%26+-0.00979225+%5C%5C+0.0195879+%26+-0.011175+%26+-0.00263529+%5C%5C+0.00461444+%26+-0.00264363+%26+-0.000619869%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E = \left(\begin{array}{ccc} 0.00507367 &amp; -0.00518039 &amp; 0.00960814 \\ 0.050171 &amp; -0.0533474 &amp; 0.109524 \\ 0.0711671 &amp; -0.0800759 &amp; 0.224744 \\ -0.00118297 &amp; -0.00392724 &amp; 0.205467 \\ -0.140011 &amp; 0.15312 &amp; 0.103269 \\ -0.256404 &amp; 0.304158 &amp; 0.0467504 \\ -0.323667 &amp; 0.432104 &amp; 0.0296721 \\ -0.247916 &amp; 0.423527 &amp; 0.0110232 \\ -0.0411424 &amp; 0.27367 &amp; -0.0156973 \\ 0.237054 &amp; 0.0289735 &amp; -0.0458278 \\ 0.422342 &amp; -0.164367 &amp; -0.0633192 \\ 0.375936 &amp; -0.19191 &amp; -0.0524917 \\ 0.200409 &amp; -0.110177 &amp; -0.027315 \\ 0.0725721 &amp; -0.0410648 &amp; -0.00979225 \\ 0.0195879 &amp; -0.011175 &amp; -0.00263529 \\ 0.00461444 &amp; -0.00264363 &amp; -0.000619869\end{array}\right)' title='E = \left(\begin{array}{ccc} 0.00507367 &amp; -0.00518039 &amp; 0.00960814 \\ 0.050171 &amp; -0.0533474 &amp; 0.109524 \\ 0.0711671 &amp; -0.0800759 &amp; 0.224744 \\ -0.00118297 &amp; -0.00392724 &amp; 0.205467 \\ -0.140011 &amp; 0.15312 &amp; 0.103269 \\ -0.256404 &amp; 0.304158 &amp; 0.0467504 \\ -0.323667 &amp; 0.432104 &amp; 0.0296721 \\ -0.247916 &amp; 0.423527 &amp; 0.0110232 \\ -0.0411424 &amp; 0.27367 &amp; -0.0156973 \\ 0.237054 &amp; 0.0289735 &amp; -0.0458278 \\ 0.422342 &amp; -0.164367 &amp; -0.0633192 \\ 0.375936 &amp; -0.19191 &amp; -0.0524917 \\ 0.200409 &amp; -0.110177 &amp; -0.027315 \\ 0.0725721 &amp; -0.0410648 &amp; -0.00979225 \\ 0.0195879 &amp; -0.011175 &amp; -0.00263529 \\ 0.00461444 &amp; -0.00264363 &amp; -0.000619869\end{array}\right)' class='latex' /></p>
<p>Just for my sanity, let me make unit vectors e2 and e3 out of E2 and E3 (which are, in case you have any doubt, the 2nd and 3rd columns of E):</p>
<p>e2 = {-0.00645091, -0.0664311, -0.0997151, -0.00489041, 0.190674, 0.378755, 0.53808, 0.5274, 0.34079, 0.0360794, -0.204679, -0.238978, -0.137198, -0.0511362, -0.0139157, -0.003292}</p>
<p>e3 = {0.02679, 0.305381, 0.626647, 0.572896, 0.28794, 0.130352, 0.0827338, 0.0307357, -0.0437682, -0.12778, -0.176551, -0.146361, -0.0761614, -0.0273034, -0.00734788, -0.00172836}</p>
<p>The part of e2 which is parallel to f1 is&#8230;</p>
<p>f1 (e2.f1)<br />
= {0.00585458, 0.0655375, 0.133048, 0.123587, 0.0719501, 0.0585914, 0.0855552, 0.115382, 0.133746, 0.135482, 0.119505, 0.080641, 0.0385479, 0.0133002, 0.00353843, 0.000827313}</p>
<p>so the part of e2 which is orthogonal to f1 is found by subtracting the parallel part from e2&#8230;</p>
<p>t1 = e2-f1 (e2.f1)<br />
= {-0.0123055, -0.131969, -0.232763, -0.128477, 0.118724, 0.320164, 0.452525, 0.412018, 0.207044, -0.0994022, -0.324183, -0.319619, -0.175746, -0.0644364, -0.0174541, -0.00411931}</p>
<p>Do a quick check that t1 is othogonal to f1&#8230;</p>
<p>t1.f1 = -5.15775*10^-17</p>
<p>But t1 is not a unit vector: it&#8217;s squared length is t1.t1 = 0.874749 .</p>
<p>So we normalize it, and call the result f2:</p>
<p>f2 = {-0.013157, -0.141101, -0.24887, -0.137367, 0.126939, 0.342318, 0.483839, 0.440529, 0.221371, -0.106281, -0.346616, -0.341736, -0.187908, -0.0688953, -0.0186619, -0.00440436}</p>
<p>To get f3, we find the part of e3 which lies in the plane spanned by f1 and f2&#8230;</p>
<p>f1 (f1.e3)+f2 (f2.e3)<br />
= {0.00735195, 0.0822258, 0.166479, 0.153523, 0.0869147, 0.0679319, 0.0993851, 0.136557, 0.161737, 0.167772, 0.150999, 0.103177, 0.0496131, 0.0171664, 0.00457096, 0.00106922}</p>
<p>then subtract that from e3, and the result will be orthogonal to the plane spanned by f1 and f2&#8230;</p>
<p>t2 = e3-(f1 (f1.e3)+f2 (f2.e3))<br />
= {0.0194381, 0.223156, 0.460167, 0.419372, 0.201026, 0.0624205, -0.0166512, -0.105822, -0.205505, -0.295552, -0.32755, -0.249538, -0.125774, -0.0444698, -0.0119188, -0.00279758}</p>
<p>Like t1, t2 is not a unit vector, but we make it so, and call the result f3:</p>
<p>f3 = {0.0215889, 0.247847, 0.511084, 0.465775, 0.223269, 0.0693272, -0.0184937, -0.117531, -0.228244, -0.328255, -0.363793, -0.277149, -0.139691, -0.0493903, -0.0132376, -0.00310713}</p>
<p>If we arrange f1, f2, f3 as the columns of F&#8230;</p>
<p><img src='http://l.wordpress.com/latex.php?latex=F+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+0.0165427+%26+-0.013157+%26+0.0215889+%5C%5C+0.185182+%26+-0.141101+%26+0.247847+%5C%5C+0.375939+%26+-0.24887+%26+0.511084+%5C%5C+0.349205+%26+-0.137367+%26+0.465775+%5C%5C+0.203302+%26+0.126939+%26+0.223269+%5C%5C+0.165555+%26+0.342318+%26+0.0693272+%5C%5C+0.241744+%26+0.483839+%26+-0.0184937+%5C%5C+0.326021+%26+0.440529+%26+-0.117531+%5C%5C+0.377912+%26+0.221371+%26+-0.228244+%5C%5C+0.382816+%26+-0.106281+%26+-0.328255+%5C%5C+0.337672+%26+-0.346616+%26+-0.363793+%5C%5C+0.227859+%26+-0.341736+%26+-0.277149+%5C%5C+0.108921+%26+-0.187908+%26+-0.139691+%5C%5C+0.0375811+%26+-0.0688953+%26+-0.0493903+%5C%5C+0.00999815+%26+-0.0186619+%26+-0.0132376+%5C%5C+0.00233765+%26+-0.00440436+%26+-0.00310713%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='F = \left(\begin{array}{ccc} 0.0165427 &amp; -0.013157 &amp; 0.0215889 \\ 0.185182 &amp; -0.141101 &amp; 0.247847 \\ 0.375939 &amp; -0.24887 &amp; 0.511084 \\ 0.349205 &amp; -0.137367 &amp; 0.465775 \\ 0.203302 &amp; 0.126939 &amp; 0.223269 \\ 0.165555 &amp; 0.342318 &amp; 0.0693272 \\ 0.241744 &amp; 0.483839 &amp; -0.0184937 \\ 0.326021 &amp; 0.440529 &amp; -0.117531 \\ 0.377912 &amp; 0.221371 &amp; -0.228244 \\ 0.382816 &amp; -0.106281 &amp; -0.328255 \\ 0.337672 &amp; -0.346616 &amp; -0.363793 \\ 0.227859 &amp; -0.341736 &amp; -0.277149 \\ 0.108921 &amp; -0.187908 &amp; -0.139691 \\ 0.0375811 &amp; -0.0688953 &amp; -0.0493903 \\ 0.00999815 &amp; -0.0186619 &amp; -0.0132376 \\ 0.00233765 &amp; -0.00440436 &amp; -0.00310713\end{array}\right)' title='F = \left(\begin{array}{ccc} 0.0165427 &amp; -0.013157 &amp; 0.0215889 \\ 0.185182 &amp; -0.141101 &amp; 0.247847 \\ 0.375939 &amp; -0.24887 &amp; 0.511084 \\ 0.349205 &amp; -0.137367 &amp; 0.465775 \\ 0.203302 &amp; 0.126939 &amp; 0.223269 \\ 0.165555 &amp; 0.342318 &amp; 0.0693272 \\ 0.241744 &amp; 0.483839 &amp; -0.0184937 \\ 0.326021 &amp; 0.440529 &amp; -0.117531 \\ 0.377912 &amp; 0.221371 &amp; -0.228244 \\ 0.382816 &amp; -0.106281 &amp; -0.328255 \\ 0.337672 &amp; -0.346616 &amp; -0.363793 \\ 0.227859 &amp; -0.341736 &amp; -0.277149 \\ 0.108921 &amp; -0.187908 &amp; -0.139691 \\ 0.0375811 &amp; -0.0688953 &amp; -0.0493903 \\ 0.00999815 &amp; -0.0186619 &amp; -0.0132376 \\ 0.00233765 &amp; -0.00440436 &amp; -0.00310713\end{array}\right)' class='latex' /></p>
<p>we can compute F&#8217;F. Since F is supposed to be orthonormal, we expect to get a 3&#215;3 identity matrix. Sure enough&#8230;</p>
<p><img src='http://l.wordpress.com/latex.php?latex=F%27F+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+1.+%26+0+%26+0+%5C%5C+0+%26+1.+%26+0+%5C%5C+0+%26+0+%26+1.%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='F&#039;F = \left(\begin{array}{ccc} 1. &amp; 0 &amp; 0 \\ 0 &amp; 1. &amp; 0 \\ 0 &amp; 0 &amp; 1.\end{array}\right)' title='F&#039;F = \left(\begin{array}{ccc} 1. &amp; 0 &amp; 0 \\ 0 &amp; 1. &amp; 0 \\ 0 &amp; 0 &amp; 1.\end{array}\right)' class='latex' /></p>
<p>The resulting F, of course, are far from smooth&#8230;</p>
<p><a href="http://rip94550.files.wordpress.com/2009/12/ft-120709.png"><img src="http://rip94550.files.wordpress.com/2009/12/ft-120709.png?w=432&#038;h=428" alt="" title="FT 120709" width="432" height="428" class="alignnone size-full wp-image-2639" /></a></p>
<p>but they still have the same kind of shapes we saw in Figure 20.</p>
<p>Oh, except that to match his figure, I had to take the negative of f2.</p>
<p>But I know of no good reason to do that, so I&#8217;m not going to. Yet. (Ok, Ok &#8212; the obvious guess is that f1, f2, f3 is a left-handed basis. If we change the sign of f2, we will get a right-handed basis. I&#8217;ll show it to you later in this post. That is, there is a good reason to do that, but nothing we&#8217;ve seen yet would lead us to it. )</p>
<p>What have we done? On a coarser scale, we have reproduced the calculations that lead to a specific orthonormal F matrix. It is one of many &#8212; infinitely many &#8212; bases which have f1 as the first basis vector. That really is the only special vector; the other two span the plane perpendicular to f1.</p>
<h2>Cohen&#8217;s Cholesky Decomposition</h2>
<p>Now let&#8217;s try it the way I think Cohen did it.</p>
<p>There is one potentially confusing problem: notation, as so often happens.</p>
<p>In the following discussion, &#8220;A&#8221; is no longer a matrix of color-matching functions. <strong>We will take &#8220;A&#8221; to have columns f, E2, E3</strong>; that was my starting point for the Gram-Schmidt orthogonalization. He describes such a starting point, but I believe he never shows the computations for such a case.</p>
<p>Here then is our new A matrix (which I call A1 in practice):</p>
<p><img src='http://l.wordpress.com/latex.php?latex=A1+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+5.53946+%26+-0.00518039+%26+0.00960814+%5C%5C+62.01+%26+-0.0533474+%26+0.109524+%5C%5C+125.887+%26+-0.0800759+%26+0.224744+%5C%5C+116.934+%26+-0.00392724+%26+0.205467+%5C%5C+68.0773+%26+0.15312+%26+0.103269+%5C%5C+55.4377+%26+0.304158+%26+0.0467504+%5C%5C+80.9502+%26+0.432104+%26+0.0296721+%5C%5C+109.171+%26+0.423527+%26+0.0110232+%5C%5C+126.547+%26+0.27367+%26+-0.0156973+%5C%5C+128.189+%26+0.0289735+%26+-0.0458278+%5C%5C+113.072+%26+-0.164367+%26+-0.0633192+%5C%5C+76.3005+%26+-0.19191+%26+-0.0524917+%5C%5C+36.473+%26+-0.110177+%26+-0.027315+%5C%5C+12.5844+%26+-0.0410648+%26+-0.00979225+%5C%5C+3.34797+%26+-0.011175+%26+-0.00263529+%5C%5C+0.782783+%26+-0.00264363+%26+-0.000619869%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A1 = \left(\begin{array}{ccc} 5.53946 &amp; -0.00518039 &amp; 0.00960814 \\ 62.01 &amp; -0.0533474 &amp; 0.109524 \\ 125.887 &amp; -0.0800759 &amp; 0.224744 \\ 116.934 &amp; -0.00392724 &amp; 0.205467 \\ 68.0773 &amp; 0.15312 &amp; 0.103269 \\ 55.4377 &amp; 0.304158 &amp; 0.0467504 \\ 80.9502 &amp; 0.432104 &amp; 0.0296721 \\ 109.171 &amp; 0.423527 &amp; 0.0110232 \\ 126.547 &amp; 0.27367 &amp; -0.0156973 \\ 128.189 &amp; 0.0289735 &amp; -0.0458278 \\ 113.072 &amp; -0.164367 &amp; -0.0633192 \\ 76.3005 &amp; -0.19191 &amp; -0.0524917 \\ 36.473 &amp; -0.110177 &amp; -0.027315 \\ 12.5844 &amp; -0.0410648 &amp; -0.00979225 \\ 3.34797 &amp; -0.011175 &amp; -0.00263529 \\ 0.782783 &amp; -0.00264363 &amp; -0.000619869\end{array}\right)' title='A1 = \left(\begin{array}{ccc} 5.53946 &amp; -0.00518039 &amp; 0.00960814 \\ 62.01 &amp; -0.0533474 &amp; 0.109524 \\ 125.887 &amp; -0.0800759 &amp; 0.224744 \\ 116.934 &amp; -0.00392724 &amp; 0.205467 \\ 68.0773 &amp; 0.15312 &amp; 0.103269 \\ 55.4377 &amp; 0.304158 &amp; 0.0467504 \\ 80.9502 &amp; 0.432104 &amp; 0.0296721 \\ 109.171 &amp; 0.423527 &amp; 0.0110232 \\ 126.547 &amp; 0.27367 &amp; -0.0156973 \\ 128.189 &amp; 0.0289735 &amp; -0.0458278 \\ 113.072 &amp; -0.164367 &amp; -0.0633192 \\ 76.3005 &amp; -0.19191 &amp; -0.0524917 \\ 36.473 &amp; -0.110177 &amp; -0.027315 \\ 12.5844 &amp; -0.0410648 &amp; -0.00979225 \\ 3.34797 &amp; -0.011175 &amp; -0.00263529 \\ 0.782783 &amp; -0.00264363 &amp; -0.000619869\end{array}\right)' class='latex' /></p>
<p><a href="http://rip94550.wordpress.com/2009/09/28/cohen-visual-color-and-color-mixture/">Cohen computed two F matrices</a> (F1 and F2) using two Cholesky decompositions, but we only need one of them. We recall that the first column of F2 = E Ga is proportional to the first column of A &#8212; and that&#8217;s what we want &#8212; so we will need E1, i.e. the dual basis to A1. </p>
<p>That is crucial. We need the dual basis to A1, not to A. We&#8217;ve already used the dual basis to A, to get two columns of A1, but now we need the analog of E for A1 instead of for A.</p>
<p>By definition, (dropping the 1&#8217;s for a moment)</p>
<p>E&#8217;A = I</p>
<p>and so</p>
<p><img src='http://l.wordpress.com/latex.php?latex=E%27+%3D+%28A%27A%29%5E%7B-1%7D+A%27+%3D+Me%5C+A%27%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E&#039; = (A&#039;A)^{-1} A&#039; = Me\ A&#039;\ ' title='E&#039; = (A&#039;A)^{-1} A&#039; = Me\ A&#039;\ ' class='latex' />.</p>
<p>I am using Cohen&#8217;s</p>
<p>Ma = A&#8217;A</p>
<p>Me = E&#8217;E</p>
<p>and it turns out that Ma and Me are inverses. I will, of course, apply that equation for A and E to A1 and E1.</p>
<p>Here is Ma and its inverse Me:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=Ma+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+112130.+%26+95.1685+%26+52.2359+%5C%5C+95.1685+%26+0.644885+%26+0.0411263+%5C%5C+52.2359+%26+0.0411263+%26+0.128627%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='Ma = \left(\begin{array}{ccc} 112130. &amp; 95.1685 &amp; 52.2359 \\ 95.1685 &amp; 0.644885 &amp; 0.0411263 \\ 52.2359 &amp; 0.0411263 &amp; 0.128627\end{array}\right)' title='Ma = \left(\begin{array}{ccc} 112130. &amp; 95.1685 &amp; 52.2359 \\ 95.1685 &amp; 0.644885 &amp; 0.0411263 \\ 52.2359 &amp; 0.0411263 &amp; 0.128627\end{array}\right)' class='latex' /></p>
<p><img src='http://l.wordpress.com/latex.php?latex=Me+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+0.0000123197+%26+-0.00153021+%26+-0.00451381+%5C%5C+-0.00153021+%26+1.77301+%26+0.054536+%5C%5C+-0.00451381+%26+0.054536+%26+9.59006%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='Me = \left(\begin{array}{ccc} 0.0000123197 &amp; -0.00153021 &amp; -0.00451381 \\ -0.00153021 &amp; 1.77301 &amp; 0.054536 \\ -0.00451381 &amp; 0.054536 &amp; 9.59006\end{array}\right)' title='Me = \left(\begin{array}{ccc} 0.0000123197 &amp; -0.00153021 &amp; -0.00451381 \\ -0.00153021 &amp; 1.77301 &amp; 0.054536 \\ -0.00451381 &amp; 0.054536 &amp; 9.59006\end{array}\right)' class='latex' /></p>
<p>Here is E1:</p>
<p><a href="http://rip94550.files.wordpress.com/2009/12/et-120709.png"><img src="http://rip94550.files.wordpress.com/2009/12/et-120709.png?w=337&#038;h=314" alt="" title="ET 120709" width="337" height="314" class="alignnone size-full wp-image-2638" /></a></p>
<p>Now we do a Cholesky decomposition of Ma:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=Ga+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+334.859+%26+0.+%26+0.+%5C%5C+0.284205+%26+0.751074+%26+0.+%5C%5C+0.155994+%26+-0.00427115+%26+0.322916%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='Ga = \left(\begin{array}{ccc} 334.859 &amp; 0. &amp; 0. \\ 0.284205 &amp; 0.751074 &amp; 0. \\ 0.155994 &amp; -0.00427115 &amp; 0.322916\end{array}\right)' title='Ga = \left(\begin{array}{ccc} 334.859 &amp; 0. &amp; 0. \\ 0.284205 &amp; 0.751074 &amp; 0. \\ 0.155994 &amp; -0.00427115 &amp; 0.322916\end{array}\right)' class='latex' /></p>
<p>That is, the Cholesky decomposition has given us Ga such that Ga Ga&#8217; = Ma.</p>
<p>Cohen had showed us that F2 = E Ga was an orthonormal matrix:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=F2+%3D+E+Ga+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+0.0165427+%26+-0.013157+%26+0.0215889+%5C%5C+0.185182+%26+-0.141101+%26+0.247847+%5C%5C+0.375939+%26+-0.24887+%26+0.511084+%5C%5C+0.349205+%26+-0.137367+%26+0.465775+%5C%5C+0.203302+%26+0.126939+%26+0.223269+%5C%5C+0.165555+%26+0.342318+%26+0.0693272+%5C%5C+0.241744+%26+0.483839+%26+-0.0184937+%5C%5C+0.326021+%26+0.440529+%26+-0.117531+%5C%5C+0.377912+%26+0.221371+%26+-0.228244+%5C%5C+0.382816+%26+-0.106281+%26+-0.328255+%5C%5C+0.337672+%26+-0.346616+%26+-0.363793+%5C%5C+0.227859+%26+-0.341736+%26+-0.277149+%5C%5C+0.108921+%26+-0.187908+%26+-0.139691+%5C%5C+0.0375811+%26+-0.0688953+%26+-0.0493903+%5C%5C+0.00999815+%26+-0.0186619+%26+-0.0132376+%5C%5C+0.00233765+%26+-0.00440436+%26+-0.00310713%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='F2 = E Ga = \left(\begin{array}{ccc} 0.0165427 &amp; -0.013157 &amp; 0.0215889 \\ 0.185182 &amp; -0.141101 &amp; 0.247847 \\ 0.375939 &amp; -0.24887 &amp; 0.511084 \\ 0.349205 &amp; -0.137367 &amp; 0.465775 \\ 0.203302 &amp; 0.126939 &amp; 0.223269 \\ 0.165555 &amp; 0.342318 &amp; 0.0693272 \\ 0.241744 &amp; 0.483839 &amp; -0.0184937 \\ 0.326021 &amp; 0.440529 &amp; -0.117531 \\ 0.377912 &amp; 0.221371 &amp; -0.228244 \\ 0.382816 &amp; -0.106281 &amp; -0.328255 \\ 0.337672 &amp; -0.346616 &amp; -0.363793 \\ 0.227859 &amp; -0.341736 &amp; -0.277149 \\ 0.108921 &amp; -0.187908 &amp; -0.139691 \\ 0.0375811 &amp; -0.0688953 &amp; -0.0493903 \\ 0.00999815 &amp; -0.0186619 &amp; -0.0132376 \\ 0.00233765 &amp; -0.00440436 &amp; -0.00310713\end{array}\right)' title='F2 = E Ga = \left(\begin{array}{ccc} 0.0165427 &amp; -0.013157 &amp; 0.0215889 \\ 0.185182 &amp; -0.141101 &amp; 0.247847 \\ 0.375939 &amp; -0.24887 &amp; 0.511084 \\ 0.349205 &amp; -0.137367 &amp; 0.465775 \\ 0.203302 &amp; 0.126939 &amp; 0.223269 \\ 0.165555 &amp; 0.342318 &amp; 0.0693272 \\ 0.241744 &amp; 0.483839 &amp; -0.0184937 \\ 0.326021 &amp; 0.440529 &amp; -0.117531 \\ 0.377912 &amp; 0.221371 &amp; -0.228244 \\ 0.382816 &amp; -0.106281 &amp; -0.328255 \\ 0.337672 &amp; -0.346616 &amp; -0.363793 \\ 0.227859 &amp; -0.341736 &amp; -0.277149 \\ 0.108921 &amp; -0.187908 &amp; -0.139691 \\ 0.0375811 &amp; -0.0688953 &amp; -0.0493903 \\ 0.00999815 &amp; -0.0186619 &amp; -0.0132376 \\ 0.00233765 &amp; -0.00440436 &amp; -0.00310713\end{array}\right)' class='latex' /></p>
<p>I want to point out now, that the lower-triangular structure of Ga says that the 3rd column of F2 is proportional to the third column of E1: in fact, I claim we have (although it&#8217;s difficult to make it clear)</p>
<p><img src='http://l.wordpress.com/latex.php?latex=F2_3+%3D+.322916+E1_3&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='F2_3 = .322916 E1_3' title='F2_3 = .322916 E1_3' class='latex' /></p>
<p>(i.e. the 3rd column of F2 is .322916 times the 3rd column of E1).</p>
<p>Cohen also told us (I&#8217;ll confess that I haven&#8217;t figured out why) that the 1st column of F2 is proportional to the first column of A1: in fact, we have</p>
<p><img src='http://l.wordpress.com/latex.php?latex=F2_1+%3D+.00298633+A1_1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='F2_1 = .00298633 A1_1' title='F2_1 = .00298633 A1_1' class='latex' /></p>
<p>Anyway, we have just applied his method to (f, E2, E3). And we have confirmed the realtionships between F2 and A1 and E1.</p>
<p>Fine, but what did we get? Did we get the same answers as from Gram-Schmidt? </p>
<p>Yes. The first column of F2 is equal to f1, the second column to f2, and the third column of F2 is equal to f3. (I could put up a drawing&#8230; but it looks exactly like the previous one.)</p>
<p>Lovely! And I&#8217;ll point out that we matched my f2 &#8212; not the negative of it. Even <span style="text-decoration:underline;"> his </span>method would require that we take the negative of his answer in order to get Figure 20.</p>
<h2>The cross product</h2>
<p>There is one other alternative computation I want to do.</p>
<p>We just saw that f1 was proportional to the first column of A1 &#8212; that&#8217;s how we chose it, a unit vector proportional to the fundamental f.</p>
<p>But we also saw that f3 was proportional to the third column of E1 &#8212; and so we could have computed f3 as soon as we had E1, just by normalizing the third column of E1. Cohen seems to have gone to an awful lot of work to get the matrix F2, given that both its first and third columns are known as soon as we compute E1 from A1. (This would work in all of his cases: for F2, normalize the first column of A and the third column of E; or &#8212; for F1 &#8212; normalize the first column of E and the third column of A.)</p>
<p>Anyway, that leaves f2, the second column of F2, to be determined.</p>
<p>Gee, it&#8217;s too bad we can&#8217;t compute a cross product for vectors of length 16.</p>
<p>Gee, who needs to?</p>
<p>Those vectors lie in a 3D subspace, so there is a change-of-basis transition matrix which leaves them with 3 nonzero components. In fact, the transition matrix is precisely v, and we know that new components y are related to old components x by</p>
<p>x = v y</p>
<p>so</p>
<p><img src='http://l.wordpress.com/latex.php?latex=y+%3D+v%5E%7B-1%7D+x+%3D+v%27x%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='y = v^{-1} x = v&#039;x\ ' title='y = v^{-1} x = v&#039;x\ ' class='latex' /> </p>
<p>since v is orthogonal. For old components f1, we get</p>
<p>t1 = v&#8217; f1<br />
= {-0.913557, -0.393456, -0.102984, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}</p>
<p>so we take y1 to be the three nonzero components&#8230;</p>
<p>y1 = {-0.913557, -0.393456, -0.102984}</p>
<p>For old components f3, we get</p>
<p>t3 = v&#8217; f3<br />
= {-0.361692, 0.901754, -0.236681, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}</p>
<p>and, again, we take y3 to be the three nonzero components&#8230;</p>
<p>y3 = {-0.361692, 0.901754, -0.236681}</p>
<p>Now, what we have are the i and k unit vectors (first and third columns), we want the j unit vector (second column). The right-hand-rule shows me &#8212; you can&#8217;t do this with your right hand on the mouse! &#8212; that</p>
<p>j = k x i,</p>
<p>so I compute</p>
<p><img src='http://l.wordpress.com/latex.php?latex=y2+%3D+y3+%5Ctimes+y1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='y2 = y3 \times y1' title='y2 = y3 \times y1' class='latex' /></p>
<p>y2 = {-0.18599, 0.178973, 0.966114}</p>
<p>(which is a unit vector) and use</p>
<p>x = v y</p>
<p>to get the corresponding f. Oh, I need to pad y2 out with zeroes.</p>
<p>t4 = {-0.18599, 0.178973, 0.966114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}</p>
<p>t2= v t4<br />
= {0.013157, 0.141101, 0.24887, 0.137367, -0.126939, -0.342318, -0.483839, -0.440529, -0.221371, 0.106281, 0.346616, 0.341736, 0.187908, 0.0688953, 0.0186619, 0.00440436}</p>
<p>Quickly recall f2</p>
<p>f2 = {-0.013157, -0.141101, -0.24887, -0.137367, 0.126939, 0.342318, 0.483839, 0.440529, 0.221371, -0.106281, -0.346616, -0.34,1736, -0.187908, -0.0688953, -0.0186619, -0.00440436}</p>
<p>and we can confirm that t2 = &#8211; f2.</p>
<p>and that &#8212; presumably &#8212; is why he took the negative of f2: both his method and my Gram-Schmidt delivered left-handed coordinate systems; the cross product let us construct a right-handed coordinate system.</p>
<p>I think that&#8217;s pretty slick. Sure, it&#8217;s just a cross-product, but it was in a 3D subspace of <img src='http://l.wordpress.com/latex.php?latex=R%5E%7B16%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='R^{16}\ ' title='R^{16}\ ' class='latex' />.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rip94550.wordpress.com/2632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rip94550.wordpress.com/2632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rip94550.wordpress.com/2632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rip94550.wordpress.com/2632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rip94550.wordpress.com/2632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rip94550.wordpress.com/2632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rip94550.wordpress.com/2632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rip94550.wordpress.com/2632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rip94550.wordpress.com/2632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rip94550.wordpress.com/2632/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&blog=2063738&post=2632&subd=rip94550&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://rip94550.wordpress.com/2009/12/13/color-cohens-intriguing-f-matrix-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eda25c1223d5c501eea15aab3feba8ac?s=96&#38;d=identicon" medium="image">
			<media:title type="html">rip</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/12/ft-120709.png" medium="image">
			<media:title type="html">FT 120709</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/12/et-120709.png" medium="image">
			<media:title type="html">ET 120709</media:title>
		</media:content>
	</item>
		<item>
		<title>Oops.</title>
		<link>http://rip94550.wordpress.com/2009/12/07/oops/</link>
		<comments>http://rip94550.wordpress.com/2009/12/07/oops/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 01:41:06 +0000</pubDate>
		<dc:creator>rip</dc:creator>
				<category><![CDATA[diary]]></category>

		<guid isPermaLink="false">http://rip94550.wordpress.com/?p=2633</guid>
		<description><![CDATA[If you just got an RSS feed for a new post, I apologize. I meant to click &#8220;Preview&#8221;, not &#8220;Publish&#8221;, and I have taken it back.
It should be ready next weekend. Still, if you want to read what you&#8217;ve got, feel free.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&blog=2063738&post=2633&subd=rip94550&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you just got an RSS feed for a new post, I apologize. I meant to click &#8220;Preview&#8221;, not &#8220;Publish&#8221;, and I have taken it back.</p>
<p>It should be ready next weekend. Still, if you want to read what you&#8217;ve got, feel free.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rip94550.wordpress.com/2633/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rip94550.wordpress.com/2633/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rip94550.wordpress.com/2633/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rip94550.wordpress.com/2633/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rip94550.wordpress.com/2633/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rip94550.wordpress.com/2633/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rip94550.wordpress.com/2633/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rip94550.wordpress.com/2633/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rip94550.wordpress.com/2633/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rip94550.wordpress.com/2633/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&blog=2063738&post=2633&subd=rip94550&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://rip94550.wordpress.com/2009/12/07/oops/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eda25c1223d5c501eea15aab3feba8ac?s=96&#38;d=identicon" medium="image">
			<media:title type="html">rip</media:title>
		</media:content>
	</item>
		<item>
		<title>Color: Cohen Figure 20, &#8220;an intriguing F matrix&#8221;</title>
		<link>http://rip94550.wordpress.com/2009/12/06/color-cohen-figure-20-an-intriguing-f-matrix/</link>
		<comments>http://rip94550.wordpress.com/2009/12/06/color-cohen-figure-20-an-intriguing-f-matrix/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 02:19:33 +0000</pubDate>
		<dc:creator>rip</dc:creator>
				<category><![CDATA[color]]></category>
		<category><![CDATA[attitude and/or transition matrices]]></category>
		<category><![CDATA[Cohen]]></category>
		<category><![CDATA[linear algebra]]></category>
		<category><![CDATA[mathematics]]></category>

		<guid isPermaLink="false">http://rip94550.wordpress.com/?p=2587</guid>
		<description><![CDATA[I struggled to make sense of pages 94-101 of Cohen&#8217;s &#8220;Visual Color and Color Mixture&#8221;.
I understand them now. Mostly.
The challenge was to derive a drawing of three basis vectors (Figure 20, p. 95), shown here :

He calls these three vectors both &#8220;an intriguing F matrix&#8221; and &#8220;This canonical orthonormal configuration&#8230;.&#8221; But as far as I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&blog=2063738&post=2587&subd=rip94550&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I struggled to make sense of pages 94-101 of Cohen&#8217;s &#8220;Visual Color and Color Mixture&#8221;.</p>
<p>I understand them now. Mostly.</p>
<p>The challenge was to derive a drawing of three basis vectors (Figure 20, p. 95), shown here :</p>
<p><a href="http://rip94550.files.wordpress.com/2009/11/cohen-figure-20.png"><img src="http://rip94550.files.wordpress.com/2009/11/cohen-figure-20.png?w=422&#038;h=397" alt="" title="Cohen Figure 20" width="422" height="397" class="alignnone size-full wp-image-2594" /></a></p>
<p>He calls these three vectors both &#8220;an intriguing F matrix&#8221; and &#8220;This canonical orthonormal configuration&#8230;.&#8221; <strong>But as far as I can tell, he never said where he got this particular one.</strong> He made it sound important, so I had to derive it. Figuring it out, as usual, was very educational. </p>
<p>What follows is a detective story.</p>
<p>I eventually decided that the most likely candidate was a &#8220;transformation matrix&#8221; on p. 101. There are five transformation matrices on that page, but the key is that exactly one of them is associated with an equal-energy illuminant &#8212; and that&#8217;s related to &#8220;EE&#8221; in the figure.</p>
<p>Let us proceed somewhat as I did, but without all the wrong turns and blind alleys. If you want a chance to wander those byways, then close this page, open a copy of Cohen, and go to work. OTOH, I&#8217;m about to take you down one, just one, wrong turn. Hey, it&#8217;s interesting and valuable.</p>
<p>First, let&#8217;s get that particular transition matrix of his. He denotes it <img src='http://l.wordpress.com/latex.php?latex=T_E&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T_E' title='T_E' class='latex' /> but I will just refer to it as &#8220;TE&#8221; (outside of LaTeX).</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T_E+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+0.09947+%26+-0.15392+%26+-0.55609+%5C%5C+0.20105+%26+0.33414+%26+0.41574+%5C%5C+0.11061+%26+-0.18021+%26+0.14036%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T_E = \left(\begin{array}{ccc} 0.09947 &amp; -0.15392 &amp; -0.55609 \\ 0.20105 &amp; 0.33414 &amp; 0.41574 \\ 0.11061 &amp; -0.18021 &amp; 0.14036\end{array}\right)' title='T_E = \left(\begin{array}{ccc} 0.09947 &amp; -0.15392 &amp; -0.55609 \\ 0.20105 &amp; 0.33414 &amp; 0.41574 \\ 0.11061 &amp; -0.18021 &amp; 0.14036\end{array}\right)' class='latex' /></p>
<p>He refers to the five T&#8217;s as &#8220;direct transformation matrices from the 1964 CIE X,Y,Z color-matching functions to orthonormal F matrices.&#8221; TE is specifically related to the equal-energy illumninant; the other four are related &#8212; in the same but as yet unexplained fashion &#8212; to the standard illuminants A, B, C, and D_65. (I have done the work to confirm that.)</p>
<p>OK. TE relates an A matrix to an F matrix. But how? &#8220;Transformation matrix&#8221; just doesn&#8217;t tell me enough.</p>
<p>A has 3 columns, so we could compute A TE, i.e. post-multiply A by TE. Since <img src='http://l.wordpress.com/latex.php?latex=T_E%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T_E^T\ ' title='T_E^T\ ' class='latex' />, <img src='http://l.wordpress.com/latex.php?latex=T_E%5E%7B-1%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T_E^{-1}\ ' title='T_E^{-1}\ ' class='latex' />, and <img src='http://l.wordpress.com/latex.php?latex=T_E%5E%7B-T%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T_E^{-T}' title='T_E^{-T}' class='latex' /> are all the same size, we could use any of them in place of TE.</p>
<p>Well, A TE doesn&#8217;t look right &#8212; I dismissed it immediately when I first saw it &#8212; but eventually I saw the light. A TE does not produce an orthonormal matrix &#8212; but it&#8217;s only off by a factor of <img src='http://l.wordpress.com/latex.php?latex=%5Csqrt%7B2%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\sqrt{2}\ ' title='\sqrt{2}\ ' class='latex' /> (and some change). </p>
<p>Let&#8217;s compute A TE and call it F&#8230;.</p>
<p>Oh, first I had better get the A matrix.</p>
<p>Cohen uses the 1964 CIE tables for this, so I take the A matrix to be the 1964 XYZ (i.e. xyz bar) tables at 5 nm intervals. Not at 20 nm. My only target is a drawing, and I want a lot of detail. I plan to repeat part of these calculations, and to do some alternatives, at 20 nm in the next post. But for this one, I need detail.</p>
<p><a href="http://www-cvrl.ucsd.edu/">I have found a set of these tables online.</a> Let me show you, for checking purposes, a tiny subset of the XYZ tables as I store them:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=%5Cleft%28%5Cbegin%7Barray%7D%7Bcc%7D+400+%26+%5C%7B0.0191%2C0.002%2C0.086%5C%7D+%5C%5C+405+%26+%5C%7B0.0434%2C0.0045%2C0.1971%5C%7D+%5C%5C+410+%26+%5C%7B0.0847%2C0.0088%2C0.3894%5C%7D+%5C%5C+415+%26+%5C%7B0.1406%2C0.0145%2C0.6568%5C%7D+%5C%5C+420+%26+%5C%7B0.2045%2C0.0214%2C0.9725%5C%7D+%5C%5C+425+%26+%5C%7B0.2647%2C0.0295%2C1.2825%5C%7D%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\left(\begin{array}{cc} 400 &amp; \{0.0191,0.002,0.086\} \\ 405 &amp; \{0.0434,0.0045,0.1971\} \\ 410 &amp; \{0.0847,0.0088,0.3894\} \\ 415 &amp; \{0.1406,0.0145,0.6568\} \\ 420 &amp; \{0.2045,0.0214,0.9725\} \\ 425 &amp; \{0.2647,0.0295,1.2825\}\end{array}\right)' title='\left(\begin{array}{cc} 400 &amp; \{0.0191,0.002,0.086\} \\ 405 &amp; \{0.0434,0.0045,0.1971\} \\ 410 &amp; \{0.0847,0.0088,0.3894\} \\ 415 &amp; \{0.1406,0.0145,0.6568\} \\ 420 &amp; \{0.2045,0.0214,0.9725\} \\ 425 &amp; \{0.2647,0.0295,1.2825\}\end{array}\right)' class='latex' /></p>
<p>My A matrix has 3 columns and 61 rows. The six rows of A corresponding to that part of the XYZ64 table are:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+0.0191+%26+0.002+%26+0.086+%5C%5C+0.0434+%26+0.0045+%26+0.1971+%5C%5C+0.0847+%26+0.0088+%26+0.3894+%5C%5C+0.1406+%26+0.0145+%26+0.6568+%5C%5C+0.2045+%26+0.0214+%26+0.9725+%5C%5C+0.2647+%26+0.0295+%26+1.2825%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\left(\begin{array}{ccc} 0.0191 &amp; 0.002 &amp; 0.086 \\ 0.0434 &amp; 0.0045 &amp; 0.1971 \\ 0.0847 &amp; 0.0088 &amp; 0.3894 \\ 0.1406 &amp; 0.0145 &amp; 0.6568 \\ 0.2045 &amp; 0.0214 &amp; 0.9725 \\ 0.2647 &amp; 0.0295 &amp; 1.2825\end{array}\right)' title='\left(\begin{array}{ccc} 0.0191 &amp; 0.002 &amp; 0.086 \\ 0.0434 &amp; 0.0045 &amp; 0.1971 \\ 0.0847 &amp; 0.0088 &amp; 0.3894 \\ 0.1406 &amp; 0.0145 &amp; 0.6568 \\ 0.2045 &amp; 0.0214 &amp; 0.9725 \\ 0.2647 &amp; 0.0295 &amp; 1.2825\end{array}\right)' class='latex' /></p>
<p><strong>Mathematica aside.</strong><br />
There, I&#8217;ve finally shown you how I&#8217;m getting different A matrices whenever I change things. The table XYZ64 &#8212; like my other three tables &#8212; has wavelength for the first argument, and the Interpolation command lets me select any subsets, or even to interpolate. (It always gets the actual points right. In fact, I am usually simply getting subsets of the data, not truly interpolating. If I ever ask for 1 nm intervals, then I would be interpolating from the 5 nm table.) </p>
<p>For example, the following command gives me the entries for an A matrix from 400 to 500 in 20 nm intervals (and displays it nicely):</p>
<p>Table[Interpolation[XYZ64,i],{i,400,500,20}]//MatrixForm</p>
<p><img src='http://l.wordpress.com/latex.php?latex=%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+0.0191+%26+0.002+%26+0.086+%5C%5C+0.2045+%26+0.0214+%26+0.9725+%5C%5C+0.3837+%26+0.0621+%26+1.9673+%5C%5C+0.3023+%26+0.1282+%26+1.7454+%5C%5C+0.0805+%26+0.2536+%26+0.7721+%5C%5C+0.0038+%26+0.4608+%26+0.2185%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\left(\begin{array}{ccc} 0.0191 &amp; 0.002 &amp; 0.086 \\ 0.2045 &amp; 0.0214 &amp; 0.9725 \\ 0.3837 &amp; 0.0621 &amp; 1.9673 \\ 0.3023 &amp; 0.1282 &amp; 1.7454 \\ 0.0805 &amp; 0.2536 &amp; 0.7721 \\ 0.0038 &amp; 0.4608 &amp; 0.2185\end{array}\right)' title='\left(\begin{array}{ccc} 0.0191 &amp; 0.002 &amp; 0.086 \\ 0.2045 &amp; 0.0214 &amp; 0.9725 \\ 0.3837 &amp; 0.0621 &amp; 1.9673 \\ 0.3023 &amp; 0.1282 &amp; 1.7454 \\ 0.0805 &amp; 0.2536 &amp; 0.7721 \\ 0.0038 &amp; 0.4608 &amp; 0.2185\end{array}\right)' class='latex' /></p>
<p>So, once having set up my XYZ64 table, and the others, I can get any plausible A matrix I want.</p>
<p><strong>end Mathematica aside</strong>.</p>
<p>For this problem, my A matrix is the entire 1964 CIE XYZ table at 5 nm intervals. Now we compute</p>
<p>F = A TE</p>
<p>and plot the results. Let me put the two drawings side-by-side (mine on the left):</p>
<p><a href="http://rip94550.files.wordpress.com/2009/11/side-by-side-1.png"><img src="http://rip94550.files.wordpress.com/2009/11/side-by-side-1.png?w=834&#038;h=392" alt="" title="side by side 1" width="834" height="392" class="alignnone size-full wp-image-2593" /></a></p>
<p>That black curve could be his &#8220;EE&#8221; on a different scale, but my other two are utterly different from &#8220;I&#8221; and &#8220;II&#8221;.</p>
<p>Let me show you the first six rows of F:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+0.0118144+%26+-0.0177697+%26+0.00228112+%5C%5C+0.027023+%26+-0.0406959+%26+0.00540148+%5C%5C+0.0532659+%26+-0.0802704+%26+0.0112139+%5C%5C+0.0895494+%26+-0.135158+%26+0.0200304+%5C%5C+0.132212+%26+-0.19958+%26+0.0316765+%5C%5C+0.174118+%26+-0.262005+%26+0.045079%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\left(\begin{array}{ccc} 0.0118144 &amp; -0.0177697 &amp; 0.00228112 \\ 0.027023 &amp; -0.0406959 &amp; 0.00540148 \\ 0.0532659 &amp; -0.0802704 &amp; 0.0112139 \\ 0.0895494 &amp; -0.135158 &amp; 0.0200304 \\ 0.132212 &amp; -0.19958 &amp; 0.0316765 \\ 0.174118 &amp; -0.262005 &amp; 0.045079\end{array}\right)' title='\left(\begin{array}{ccc} 0.0118144 &amp; -0.0177697 &amp; 0.00228112 \\ 0.027023 &amp; -0.0406959 &amp; 0.00540148 \\ 0.0532659 &amp; -0.0802704 &amp; 0.0112139 \\ 0.0895494 &amp; -0.135158 &amp; 0.0200304 \\ 0.132212 &amp; -0.19958 &amp; 0.0316765 \\ 0.174118 &amp; -0.262005 &amp; 0.045079\end{array}\right)' class='latex' /></p>
<p><strong>Cohen said that F would be orthonormal. It is not.</strong> We would conclude that F was orthonormal if F&#8217;F = I. So we compute F&#8217;F:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=F%5ETF+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+2.05018+%26+0.00324299+%26+-0.0144556+%5C%5C+0.00324299+%26+2.00107+%26+0.000405886+%5C%5C+-0.0144556+%26+0.000405886+%26+2.0003%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='F^TF = \left(\begin{array}{ccc} 2.05018 &amp; 0.00324299 &amp; -0.0144556 \\ 0.00324299 &amp; 2.00107 &amp; 0.000405886 \\ -0.0144556 &amp; 0.000405886 &amp; 2.0003\end{array}\right)' title='F^TF = \left(\begin{array}{ccc} 2.05018 &amp; 0.00324299 &amp; -0.0144556 \\ 0.00324299 &amp; 2.00107 &amp; 0.000405886 \\ -0.0144556 &amp; 0.000405886 &amp; 2.0003\end{array}\right)' class='latex' /></p>
<p>Round it off:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=F%5ETF+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+2.05+%26+0+%26+-0.01+%5C%5C+0+%26+2.+%26+0+%5C%5C+-0.01+%26+0+%26+2.%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='F^TF = \left(\begin{array}{ccc} 2.05 &amp; 0 &amp; -0.01 \\ 0 &amp; 2. &amp; 0 \\ -0.01 &amp; 0 &amp; 2.\end{array}\right)' title='F^TF = \left(\begin{array}{ccc} 2.05 &amp; 0 &amp; -0.01 \\ 0 &amp; 2. &amp; 0 \\ -0.01 &amp; 0 &amp; 2.\end{array}\right)' class='latex' /></p>
<p>I have no idea why his F &#8212; equivalently, his TE &#8212; is too large by <img src='http://l.wordpress.com/latex.php?latex=%5Csqrt%7B2%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\sqrt{2}\ ' title='\sqrt{2}\ ' class='latex' />. (The off-diagonal terms are almost zero, so these vectors are almost orthogonal. But their squared lengths are 2, so their lengths are <img src='http://l.wordpress.com/latex.php?latex=%5Csqrt%7B2%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\sqrt{2}\ ' title='\sqrt{2}\ ' class='latex' />. We could have fixed that by dividing TE by <img src='http://l.wordpress.com/latex.php?latex=%5Csqrt%7B2%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\sqrt{2}\ ' title='\sqrt{2}\ ' class='latex' />.)</p>
<p>Since the book was published posthumously, perhaps the editor was editing without computing. Perhaps he took what he found in Cohen&#8217;s notes or drafts and hoped that everything was consistent.</p>
<p>I assure you that the other possibilities (<img src='http://l.wordpress.com/latex.php?latex=T_E%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T_E^T\ ' title='T_E^T\ ' class='latex' />, <img src='http://l.wordpress.com/latex.php?latex=T_E%5E%7B-1%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T_E^{-1}\ ' title='T_E^{-1}\ ' class='latex' />, and <img src='http://l.wordpress.com/latex.php?latex=T_E%5E%7B-T%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T_E^{-T}' title='T_E^{-T}' class='latex' />) do not come close to delivering an orthonormal F. Feel free to try them.</p>
<p>We conclude that there is a minor error in TE; it turns out that the other four transformation matrices on p. 100 also need to be divided by <img src='http://l.wordpress.com/latex.php?latex=%5Csqrt%7B2%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\sqrt{2}\ ' title='\sqrt{2}\ ' class='latex' />. Whatever he had in mind, he was consistent. Under the circumstances &#8212; posthumous publication, and the ease of computing unit vectors &#8212; this is rather unimportant &#8212; conceptually and computationally &#8212; once we know it.</p>
<p><strong>More importantly, I think, we also conclude that the F produced by TE is not the F matrix in Figure 20.</strong> They seem to have &#8212; and actually do have &#8212; proportional first columns, but that&#8217;s all. </p>
<p>That is a little more troubling. I could have searched for a derivation of TE; instead, I searched for a derivation of Figure 20. I don&#8217;t care to do both. Let me be explicit: I don&#8217;t know how he got his TE matrix, nor any of the other 4 transformation matrices on p. 100. I do know how he got Figure 20.</p>
<p>It will be more than enough work to get Figure 20. I don&#8217; t know where TE came from. I have some ideas, and I expect that you will too by the time we finish, but I&#8217; m done with TE. Maybe I shouldn&#8217;t be, but enough is enough.</p>
<p>I should emphasize, however, that I am keeping the first column of F computed from TE, at least for a little while.</p>
<p>Oh, let me do one last thing with TE before I abandon it.</p>
<p>We know the relationship between A and TE: F = A TE. How would we express that in my usual terminology? Using T for TE, we have</p>
<p>F = A T</p>
<p>and we transpose, getting</p>
<p>F&#8217; = T&#8217; A&#8217;.</p>
<p>That says that each column of F&#8217; is obtained by applying the matrix T&#8217; to the corresponding column of A&#8217;. That tells us two or three things.</p>
<p><strong>First and second, T&#8217; is the transition matrix, and therefore his &#8220;transformation matrix&#8221; TE is actually an attitude matrix; third, he takes A as the new components and F as the old.</strong></p>
<p>Just so I know.</p>
<p>Now let&#8217;s find a way to match Figure 20.</p>
<p>First, where did the first column &#8212; the black curve or &#8220;EE&#8221; &#8212; come from? (Yes, we showed that F produced from TE has a first column which is proportional to the &#8220;EE&#8221; curve. But where did this common vector come from?)</p>
<p>He tells us that it is proportional to the fundamental of the illuminant.</p>
<p>Ok. To get the fundamental, we need the projection operator. To get that, we need the SVD (Singular Value Decomposition) of the color-matching functions, i.e. of the matrix <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' />. </p>
<p>A&#8217; = u w v&#8217;.</p>
<p>More to the point, we need the first three columns of the matrix v. (We need three columns because A&#8217;, like A, is of rank 3.) </p>
<p>Let me show you the first six (of 61) rows of v1:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+-0.0126669+%26+0.00772016+%26+0.00299387+%5C%5C+-0.0289985+%26+0.0177432+%26+0.00674605+%5C%5C+-0.0572094+%26+0.0351751+%26+0.0129521+%5C%5C+-0.0963098+%26+0.0596099+%26+0.0210865+%5C%5C+-0.142331+%26+0.0886581+%26+0.0298013+%5C%5C+-0.187415+%26+0.117288+%26+0.0368556%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\left(\begin{array}{ccc} -0.0126669 &amp; 0.00772016 &amp; 0.00299387 \\ -0.0289985 &amp; 0.0177432 &amp; 0.00674605 \\ -0.0572094 &amp; 0.0351751 &amp; 0.0129521 \\ -0.0963098 &amp; 0.0596099 &amp; 0.0210865 \\ -0.142331 &amp; 0.0886581 &amp; 0.0298013 \\ -0.187415 &amp; 0.117288 &amp; 0.0368556\end{array}\right)' title='\left(\begin{array}{ccc} -0.0126669 &amp; 0.00772016 &amp; 0.00299387 \\ -0.0289985 &amp; 0.0177432 &amp; 0.00674605 \\ -0.0572094 &amp; 0.0351751 &amp; 0.0129521 \\ -0.0963098 &amp; 0.0596099 &amp; 0.0210865 \\ -0.142331 &amp; 0.0886581 &amp; 0.0298013 \\ -0.187415 &amp; 0.117288 &amp; 0.0368556\end{array}\right)' class='latex' /></p>
<p>Those 3 column vectors are an orthonormal basis for the preimage of the range of A&#8217; (&#8220;the fundamental color space&#8221;). We form a projection operator by</p>
<p>R = v1 v1&#8242;</p>
<p>Now to get compute the fundamental of an equal-energy illuminant ee, we need to define the illuminant (I used all 100&#8217;s):</p>
<p>ee = {100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100}</p>
<p>Its fundamental f is the projection under R:</p>
<p>f = R ee =</p>
<p>{5.53525, 12.6614, 24.9595, 41.9659, 61.9674, 81.6212, 98.8882, 114.647, 125.821, 130.294, 129.298, 124.753, 116.918, 107.167, 95.2578, 80.7352, 68.1596, 60.0607, 54.8153, 53.7962, 55.5973, 59.7538, 65.4578, 72.9488, 81.1471, 88.5547, 95.6709, 102.8, 109.309, 114.255, 118.44, 122.816, 126.542, 129.052, 130.251, 129.621, 127.996, 126.529, 123.888, 119.146, 112.759, 105.059, 96.1651, 86.301, 76.0275, 65.9399, 55.8152, 45.5545, 36.3286, 28.6452, 22.185, 16.823, 12.5322, 9.19186, 6.64563, 4.72835, 3.33391, 2.32954, 1.61867, 1.12825, 0.779473}</p>
<p>Let me graph a scaled version of f along with the first column of F. (Scaled? I have to divide f by 470. Trust me.)</p>
<p><a href="http://rip94550.files.wordpress.com/2009/11/f-and-f.png"><img src="http://rip94550.files.wordpress.com/2009/11/f-and-f.png?w=374&#038;h=351" alt="" title="F and f" width="374" height="351" class="alignnone size-full wp-image-2592" /></a></p>
<p>As I have done before, the black dots are one vector &#8212; in this case, the fundamental f &#8212; and the red curve is the other vector, in this case the first column of F. </p>
<p>We see that they are the same. Where we used to know that his TE gave us a column of F proportional to the EE curve in Figure 20, now we know what the curve is. Now I can dispense with F computed from TE, because I can use the fundamental f of the equal-energy illuminant instead.</p>
<p>The horizontal axis is off &#8212; I didn&#8217;t bother showing the wavelength.</p>
<p>That scaling by 470? Ha! The 1964 XYZ table at 1 nm intervals is over the range 360 to 830 nm. And 830-360 = 470. </p>
<p>(Probably &#8220;the length of the interval of integration&#8221;. Not that an integral is appropriate, in my opinion. And Cohen has pointedly been doing linear algebra, not calculus. But the literature is littered with integrals, even though the data is discrete. This is the mathematics I am skeptical of in all such works: they use calculus for their theory but linear algebra for their computations. (<a href="http://rip94550.wordpress.com/2009/10/26/color-from-spectrum-to-tristimulus/">The example from Wyszecki &amp; Stiles</a> was closer to linear algebra, and the example they did two pages later is clearly not done by integration &#8212; no, I didn&#8217;t work that example.) I suspect it&#8217;s because a long time ago we pretty much restricted ourselves to continuous systems&#8230;. But I keep coming back to the fact that their data &#8212; the color matching functions &#8212; are discrete, and linear algebra is the appropriate tool. That&#8217;s my opinion.)</p>
<p>That&#8217;s where the 470 seems to be from, but I don&#8217;t really care. It would have made more sense for him to have used 400-700 instead of 360-830, and that&#8217;s one reason I don&#8217;t care about the scaling. Further, and more importantly, we will ultimately make a unit vector out of the fundamental f. Its scaling along the way just isn&#8217;t all that important.</p>
<p>And I didn&#8217;t scale the first column of F, so the <img src='http://l.wordpress.com/latex.php?latex=%5Csqrt%7B2%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\sqrt{2}\ ' title='\sqrt{2}\ ' class='latex' /> in F is consistent with the 470 in f.</p>
<p>Sheesh! And I thought Fourier transforms had too many different scalings!</p>
<p>What interests me is that the first column of F is proprtional to f. And both appear to be proportional to the curve &#8220;EE&#8221; in figure 20. This is progress.</p>
<p>Now let&#8217;s get the dual basis E&#8217;. (I think I like idea of calling the rows of E&#8217; a dual basis for the columns of A&#8230; and the columns of E a reciprocal basis for the columns of A&#8230; and, finally, the columns of E are a dual basis for the rows of A&#8217;. Row vectors and column vectors live in vector spaces which are dual to each other.)</p>
<p>Oh, say it compactly! <strong>The columns of E are simultaneously a reciprocal basis for the <span style="text-decoration:underline;">columns of A</span>columns of A and a dual basis for the <span style="text-decoration:underline;">rows of A&#8217;</span>.</strong> Numerically the same, conceptually different.</p>
<p>I recall the required computation as</p>
<p>E&#8217;A = I,</p>
<p><img src='http://l.wordpress.com/latex.php?latex=E%27+%3D+A%5E%7B-1%7D+%3D+%28A%27A%29%5E%7B-1%7D+A%27%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E&#039; = A^{-1} = (A&#039;A)^{-1} A&#039;\ ' title='E&#039; = A^{-1} = (A&#039;A)^{-1} A&#039;\ ' class='latex' /> ,</p>
<p>where <img src='http://l.wordpress.com/latex.php?latex=A%5E%7B-1%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^{-1}' title='A^{-1}' class='latex' /> doesn&#8217;t exist, but led me to the appropriate pseudo-inverse.</p>
<p>Like everything else in this example, E is too big to display, but here are its first six rows:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+0.00128533+%26+-0.00131508+%26+0.00240808+%5C%5C+0.00289282+%26+-0.00297823+%26+0.00552559+%5C%5C+0.00554886+%26+-0.00576118+%26+0.0109365+%5C%5C+0.00901767+%26+-0.00947485+%26+0.0184882+%5C%5C+0.0127322+%26+-0.0135554+%26+0.0274475+%5C%5C+0.0157701+%26+-0.0170116+%26+0.0363094%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\left(\begin{array}{ccc} 0.00128533 &amp; -0.00131508 &amp; 0.00240808 \\ 0.00289282 &amp; -0.00297823 &amp; 0.00552559 \\ 0.00554886 &amp; -0.00576118 &amp; 0.0109365 \\ 0.00901767 &amp; -0.00947485 &amp; 0.0184882 \\ 0.0127322 &amp; -0.0135554 &amp; 0.0274475 \\ 0.0157701 &amp; -0.0170116 &amp; 0.0363094\end{array}\right)' title='\left(\begin{array}{ccc} 0.00128533 &amp; -0.00131508 &amp; 0.00240808 \\ 0.00289282 &amp; -0.00297823 &amp; 0.00552559 \\ 0.00554886 &amp; -0.00576118 &amp; 0.0109365 \\ 0.00901767 &amp; -0.00947485 &amp; 0.0184882 \\ 0.0127322 &amp; -0.0135554 &amp; 0.0274475 \\ 0.0157701 &amp; -0.0170116 &amp; 0.0363094\end{array}\right)' class='latex' /></p>
<p>And here is a graph of the three rows of E&#8217; (equivalently, the three columns of E):</p>
<p><a href="http://rip94550.files.wordpress.com/2009/11/graph-et.png"><img src="http://rip94550.files.wordpress.com/2009/11/graph-et.png?w=374&#038;h=329" alt="" title="graph ET" width="374" height="329" class="alignnone size-full wp-image-2591" /></a></p>
<p>NOTE that these are the &#8220;CIE 1964 XYZ fundamentals&#8221; on p. 163 of Cohen. Some of those resemble Figure 20&#8230; wait, E is not orthonormal, so none of them should be curves in Figure 20 (which are orthogonal, although not unit, vectors!) The resemblance is just that: not much more than vague similarity.</p>
<p>OK, let&#8217;s try getting an orthonormal basis, somehow. </p>
<p>I don&#8217;t know about you, but I want something I understand. Let&#8217;s apply Gram-Schmidt to a non-orthonormal basis. (This is almost certainly not what Cohen did. I&#8217;ll show you what I think he did in the next post. We&#8217;ll get the same answer.)</p>
<p>The first two non-orthonormal bases I started with were </p>
<p>f, E1, E2</p>
<p>and</p>
<p>f, E1, E3.</p>
<p>In retrospect, my third choice</p>
<p>f, E2, E3</p>
<p>seems more obvious. <strong>OTOH, more obvious or not, what matters is that it does, in fact, generate Figure 20!</strong></p>
<p>As is my custom, I am going to describe Gram-Schmidt for this 3D case. The general method just extends it from 3D to n-dimensions.</p>
<p>We have our first vector f. Normalize it, by</p>
<p><img src='http://l.wordpress.com/latex.php?latex=f1+%3D+%5Cfrac%7Bf%7D%7B%5Csqrt%7Bf+%5Ccdot+f%7D%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='f1 = \frac{f}{\sqrt{f \cdot f}}\ ' title='f1 = \frac{f}{\sqrt{f \cdot f}}\ ' class='latex' />.</p>
<p>This gives us our first unit vector, f1, for the new basis.</p>
<p>f1 = {0.00827079, 0.0189187, 0.0372946, 0.0627057, 0.092592, 0.121959, 0.147759, 0.171307, 0.188002, 0.194686, 0.193198, 0.186406, 0.174699, 0.16013, 0.142335, 0.120635, 0.101844, 0.0897429, 0.0819053, 0.0803825, 0.0830737, 0.0892844, 0.0978074, 0.109, 0.12125, 0.132319, 0.142952, 0.153603, 0.163331, 0.170721, 0.176973, 0.183512, 0.189079, 0.192829, 0.194622, 0.19368, 0.191252, 0.18906, 0.185114, 0.178029, 0.168484, 0.15698, 0.14369, 0.128951, 0.113601, 0.0985278, 0.0833993, 0.0680677, 0.0542824, 0.0428017, 0.033149, 0.025137, 0.0187257, 0.0137345, 0.00992992, 0.00706512, 0.00498154, 0.00348081, 0.00241862, 0.00168584, 0.00116469}</p>
<p>Normalize E2 and E3, as we did f, just to start with vectors of the same size. Call the unit vectors e2 and e3.</p>
<p>e2 = {-0.00326355, -0.00739089, -0.0142972, -0.0235132, -0.0336395, -0.0422167, -0.0480022, -0.0514717, -0.0506656, -0.0450514, -0.0346783, -0.0212322, -0.00302856, 0.0178248, 0.0440051, 0.0714143, 0.0954016, 0.120945, 0.141852, 0.165312, 0.189969, 0.213125, 0.235048, 0.255043, 0.270026, 0.276282, 0.276115, 0.273313, 0.264794, 0.24833, 0.226531, 0.201183, 0.171297, 0.136324, 0.0977252, 0.0577811, 0.0185254, -0.0185732, -0.0524476, -0.0805823, -0.102238, -0.116778, -0.124173, -0.124757, -0.11956, -0.109979, -0.0974696, -0.0829623, -0.0686652, -0.0558823, -0.0443658, -0.0340783, -0.0255961, -0.0189148, -0.013768, -0.00982428, -0.00696574, -0.0048783, -0.00340378, -0.00233611, -0.0016479}</p>
<p>e3 = {0.0134212, 0.0307963, 0.0609534, 0.103042, 0.152976, 0.202366, 0.245956, 0.285754, 0.313861, 0.325009, 0.321797, 0.308947, 0.28685, 0.259425, 0.22519, 0.182631, 0.143994, 0.114635, 0.0919794, 0.0761547, 0.0649611, 0.0570429, 0.0503958, 0.0457693, 0.041089, 0.0352787, 0.0289087, 0.0223688, 0.0152318, 0.00702492, -0.00182114, -0.0115187, -0.0217216, -0.0324157, -0.0433804, -0.0537281, -0.0633608, -0.0725008, -0.0801518, -0.0851463, -0.0875296, -0.0873093, -0.08454, -0.0794315, -0.0725582, -0.0646114, -0.0558614, -0.0465045, -0.0377562, -0.0302361, -0.0237077, -0.0180942, -0.0135352, -0.00996527, -0.00722962, -0.00515145, -0.0036426, -0.00254819, -0.00177437, -0.00122704, -0.000856806}</p>
<p>Now apply Gram-Schmidt to the pair f1 and e2. The vector e2 is not orthogonal to f1, but it can be written as the sum of something parallel to f1 plus something perpendicular to f1. We will find the parallel part using the dot product, and get the perpendicular part by subtraction.</p>
<p>The component of e2 wrt f1 is&#8230; <img src='http://l.wordpress.com/latex.php?latex=e2+%5Ccdot%5C+f1+%3D+0.354107&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='e2 \cdot\ f1 = 0.354107' title='e2 \cdot\ f1 = 0.354107' class='latex' /> (since f1 is a unit vector), so we make a vector of that length, parallel to f1, and subtract it from e2. The result of that vector subtraction is perpendicular to f1. We normalize it and call it f2. </p>
<p><img src='http://l.wordpress.com/latex.php?latex=f2+%3D+f1+-+%28e2+%5Ccdot%5C+f1%29%5C+f1%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='f2 = f1 - (e2 \cdot\ f1)\ f1\ ' title='f2 = f1 - (e2 \cdot\ f1)\ f1\ ' class='latex' />.</p>
<p>Then</p>
<p>f1, f2</p>
<p>is an orthonormal basis that spans the same subspace as</p>
<p>f1, e2.</p>
<p>f2 = {-0.00662133, -0.0150664, -0.029409, -0.0488852, -0.0710293, -0.0913202, -0.107276, -0.119901, -0.125361, -0.121889, -0.110234, -0.0932842, -0.0693866, -0.041572, -0.00683967, 0.0306849, 0.063449, 0.0953437, 0.120668, 0.14633, 0.171675, 0.194084, 0.214299, 0.231442, 0.242825, 0.245323, 0.241118, 0.234089, 0.221296, 0.200893, 0.175217, 0.145636, 0.111572, 0.072756, 0.0308042, -0.0115508, -0.052607, -0.0914459, -0.126173, -0.153574, -0.173117, -0.184308, -0.187183, -0.182227, -0.170858, -0.154906, -0.135801, -0.114483, -0.0939761, -0.0759605, -0.0599912, -0.0459572, -0.0344598, -0.0254257, -0.0184818, -0.0131801, -0.00933457, -0.00653426, -0.00455539, -0.00313629, -0.00220307}</p>
<p>Now what do we do with e3? We want to break off the piece which lies in the plane spanned by f1 and f2. That&#8217;s just the vector</p>
<p><img src='http://l.wordpress.com/latex.php?latex=f1%5C+%28e3+%5Ccdot+f1%29+%2B+f2%5C+%28e3+%5Ccdot+f2%29%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='f1\ (e3 \cdot f1) + f2\ (e3 \cdot f2)\ ' title='f1\ (e3 \cdot f1) + f2\ (e3 \cdot f2)\ ' class='latex' />.</p>
<p>When we subtract that from e3, what remains is perpendicular to the plane spanned by f1 and f2; we will normalize it to length 1 and then call it f3. (It&#8217;s crucial that f1 and f2 are an orthonormal basis for that plane; otherwise we would need an explicit reciprocal basis to find components of e3 wrt f1 and f2.)</p>
<p>f3 = {0.0108058, 0.0248259, 0.0492157, 0.0833774, 0.124048, 0.164396, 0.200091, 0.232718, 0.255782, 0.264988, 0.262322, 0.251597, 0.233086, 0.2101, 0.18122, 0.145023, 0.111701, 0.085438, 0.064457, 0.0480153, 0.034675, 0.0232252, 0.0120345, 0.00174899, -0.00919785, -0.0209678, -0.0332539, -0.0457821, -0.0586168, -0.071629, -0.0848832, -0.0992835, -0.113845, -0.128148, -0.141854, -0.153559, -0.163729, -0.173431, -0.180567, -0.183118, -0.181455, -0.175821, -0.166361, -0.153478, -0.138238, -0.121869, -0.10453, -0.0863848, -0.0696761, -0.0554858, -0.0433135, -0.0329815, -0.0246352, -0.0181132, -0.0131248, -0.00934719, -0.00660276, -0.00461709, -0.00321259, -0.00222783, -0.00154979}</p>
<p>(Maybe I shouldn&#8217;t have printed all those, but if you have the 1964 xyz bar tables and you&#8217;re trying to verify my calculations&#8230;.)</p>
<p>So, it&#8217;s time to look at what we got. Here are f1, f2, f3. They are an orthonormal basis, and they span the same space as E1, E2, E3 &#8212; the fundamental color space, the pre-image of the range of A&#8217;.</p>
<p><a href="http://rip94550.files.wordpress.com/2009/11/the-right-f.png"><img src="http://rip94550.files.wordpress.com/2009/11/the-right-f.png?w=432&#038;h=395" alt="" title="the right F" width="432" height="395" class="alignnone size-full wp-image-2589" /></a></p>
<p>The brown looks like Cohen&#8217;s &#8220;I&#8221;. But the mauve curve is off. Still&#8230;.</p>
<p><strong>Do I need the <span style="text-decoration:underline;">negative</span> of the mauve curve? </p>
<p>Yes! </strong></p>
<p>And multiply by 44 ! (No, I have no idea why! I just kept changing the multiplier until I matched his scale on Figure 20.)</p>
<p>Having found them, make them pretty &#8212; i.e. set the horizontal scale.</p>
<p>Here, let me put them side-by-side. They look very close, but not exact. Nevertheless, I am content: his numbers tend to be off a little, so what&#8217;s the point of trying to match them perfectly?</p>
<p><a href="http://rip94550.files.wordpress.com/2009/11/side-by-side-2.png"><img src="http://rip94550.files.wordpress.com/2009/11/side-by-side-2.png?w=833&#038;h=396" alt="" title="side by side 2" width="833" height="396" class="alignnone size-full wp-image-2590" /></a></p>
<p>So. Start with the non-orthonormal basis f, E2, E3 and apply Gram-Schmidt to get the orthonormal basis f1, f2, f3. Then take the negative of f2.</p>
<p>I must emphasize that his scale (i.e. multiply by 44) does not represent orthonormal vectors. Pairwise orthogonal, yes &#8212; <strong>but the f1, f2, and f3 I derived were specifically unit vectors</strong>. The scale on his figure requires that I multiply by 44 (or something very close to it). Once we have unit vectors, we can scale them any way that is convenient. Here it was convenient to match his &#8212; frankly, incomprehensible &#8212; vertical scale.</p>
<p>Oh, let&#8217;s close with one last calculation, to compute the &#8220;transformation matrix&#8221; for Figure 20. We have found the F matrix for Figure 20, and we have the A matrix. What is the transition matrix T between them? (Actually, we know we want the attitude matrix instead.) Recall that he takes A as the new, and F as the old, components. </p>
<p>So, as usual, we compute each column of F&#8217; (old) by applying T to each column of A&#8217; (new). That is,</p>
<p>F&#8217; = T A&#8217;</p>
<p>F = A T&#8217;</p>
<p>and we write the <span style="color:#ff0000;">false</span> but suggestive</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T%27+%3D+A%5E%7B-1%7D+F&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T&#039; = A^{-1} F' title='T&#039; = A^{-1} F' class='latex' /></p>
<p>which gives us the true</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T%27+%3D+%28A%27A%29%5E%7B-1%7D+A%27+F&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T&#039; = (A&#039;A)^{-1} A&#039; F' title='T&#039; = (A&#039;A)^{-1} A&#039; F' class='latex' /></p>
<p>using the appropriate pseudo-inverse.</p>
<p>So we compute and display T&#8217;, and remember that, as the transpose of a transition matrix, it is an attitude matrix&#8230;</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T%5ET+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+0.0663267+%26+-0.37473+%26+-0.161437+%5C%5C+0.142691+%26+0.37685+%26+0+%5C%5C+0.0781229+%26+-0.00253108+%26+0.161503%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T^T = \left(\begin{array}{ccc} 0.0663267 &amp; -0.37473 &amp; -0.161437 \\ 0.142691 &amp; 0.37685 &amp; 0 \\ 0.0781229 &amp; -0.00253108 &amp; 0.161503\end{array}\right)' title='T^T = \left(\begin{array}{ccc} 0.0663267 &amp; -0.37473 &amp; -0.161437 \\ 0.142691 &amp; 0.37685 &amp; 0 \\ 0.0781229 &amp; -0.00253108 &amp; 0.161503\end{array}\right)' class='latex' /></p>
<p>We can compare that to the transformation matrix TE we tried at the beginning:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T_E+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+0.09947+%26+-0.15392+%26+-0.55609+%5C%5C+0.20105+%26+0.33414+%26+0.41574+%5C%5C+0.11061+%26+-0.18021+%26+0.14036%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T_E = \left(\begin{array}{ccc} 0.09947 &amp; -0.15392 &amp; -0.55609 \\ 0.20105 &amp; 0.33414 &amp; 0.41574 \\ 0.11061 &amp; -0.18021 &amp; 0.14036\end{array}\right)' title='T_E = \left(\begin{array}{ccc} 0.09947 &amp; -0.15392 &amp; -0.55609 \\ 0.20105 &amp; 0.33414 &amp; 0.41574 \\ 0.11061 &amp; -0.18021 &amp; 0.14036\end{array}\right)' class='latex' /></p>
<p>As we would expect &#8212; since the F produced by TE did not match Figure 20 &#8212; these are different.</p>
<p><strong>Real Short Summary</strong></p>
<p>I matched his Figure 20 by applying the Gram-Schmidt orthogonalization procedure to the vectors f, E2, E3&#8230; where f was the fundamental of an equal-energy illuminant, and E2 and E3 were two of the basis vectors dual to the rows of A&#8217;.</p>
<p><strong>Summary</strong></p>
<p>We really started with two separate items: a &#8220;transformation matrix&#8221; TE &#8212; one of five on p. 100 &#8212; and Figure 20 on p. 95 of Cohen. The transformation matrix TE turned out to be an attitude matrix describing a new A matrix in terms of an old F matrix. (Yes, that&#8217;s backwards, but so long as we knew it, it didn&#8217;t matter. This is why I carefully distinguish attitude and transition matrices; so long as I know what I&#8217;ve been handed, I can use it properly and confidently.) </p>
<p>We saw that F = A TE reproduced only the &#8220;EE&#8221; curve of his Figure 20. And his F matrix failed to be orthonormal by a factor of <img src='http://l.wordpress.com/latex.php?latex=%5Csqrt%7B2%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\sqrt{2}\ ' title='\sqrt{2}\ ' class='latex' />.</p>
<p>We then saw that the &#8220;EE&#8221; curve was (proportional to) the fundamental f of an equal-energy illuminant. In order to find the fundamental of a spectrum, we had to find a projection operator R onto the pre-image of the range of A^T. The fundamental f is then the result of applying the projection operator R to a constant vector (&#8220;equal energy&#8221;).</p>
<p>By trial and error, I found that the F matrix for Figure 20 could be (very nearly) reproduced by applying the Gram-Schmidt orthogonalization procedure to the vectors f, E2, E3, where E1, E2, E3 are a basis dual to the rows of A&#8217;. We found the dual basis as the rows of <img src='http://l.wordpress.com/latex.php?latex=E%27+%3D+%28A%27A%29%5E%7B-1%7D+A%27&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E&#039; = (A&#039;A)^{-1} A&#039;' title='E&#039; = (A&#039;A)^{-1} A&#039;' class='latex' /> and then transposed E&#8217; to get E, a matrix of 3 columns.</p>
<p>In the next post, I will repeat these calculations quickly using 20 nm intervals, and I will show you a few alternatives. In particular, I will show you that his method (a Cholesky decomposition) gives the same answer &#8212; even to having to switch the sign of the second column!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rip94550.wordpress.com/2587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rip94550.wordpress.com/2587/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rip94550.wordpress.com/2587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rip94550.wordpress.com/2587/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rip94550.wordpress.com/2587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rip94550.wordpress.com/2587/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rip94550.wordpress.com/2587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rip94550.wordpress.com/2587/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rip94550.wordpress.com/2587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rip94550.wordpress.com/2587/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&blog=2063738&post=2587&subd=rip94550&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://rip94550.wordpress.com/2009/12/06/color-cohen-figure-20-an-intriguing-f-matrix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eda25c1223d5c501eea15aab3feba8ac?s=96&#38;d=identicon" medium="image">
			<media:title type="html">rip</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/cohen-figure-20.png" medium="image">
			<media:title type="html">Cohen Figure 20</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/side-by-side-1.png" medium="image">
			<media:title type="html">side by side 1</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/f-and-f.png" medium="image">
			<media:title type="html">F and f</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/graph-et.png" medium="image">
			<media:title type="html">graph ET</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/the-right-f.png" medium="image">
			<media:title type="html">the right F</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/side-by-side-2.png" medium="image">
			<media:title type="html">side by side 2</media:title>
		</media:content>
	</item>
		<item>
		<title>Example: Is it a transition matrix? Part 2</title>
		<link>http://rip94550.wordpress.com/2009/11/29/example-is-it-a-transition-matrix-part-2/</link>
		<comments>http://rip94550.wordpress.com/2009/11/29/example-is-it-a-transition-matrix-part-2/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 01:04:44 +0000</pubDate>
		<dc:creator>rip</dc:creator>
				<category><![CDATA[math linear algebra]]></category>
		<category><![CDATA[attitude and/or transition matrices]]></category>
		<category><![CDATA[Jolliffe]]></category>
		<category><![CDATA[linear algebra]]></category>
		<category><![CDATA[mathematics]]></category>
		<category><![CDATA[OLS ordinary least squares regression]]></category>
		<category><![CDATA[PCA FA principal components factor analysis]]></category>
		<category><![CDATA[SVD singular value decomposition]]></category>

		<guid isPermaLink="false">http://rip94550.wordpress.com/?p=2566</guid>
		<description><![CDATA[We had three matrices from Jolliffe, P, V, and Q. They were allegedly a set of principal components P, a varimax rotation V of P, and a quartimin &#8220;oblique rotation&#8221; Q. 
I&#8217;ll remind you that when they say &#8220;oblique rotation&#8221; they mean a general change-of-basis. A rotation preserves an orthonormal basis; a rotation cannot transform [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&blog=2063738&post=2566&subd=rip94550&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We had three matrices from Jolliffe, P, V, and Q. They were allegedly a set of principal components P, a varimax rotation V of P, and a quartimin &#8220;oblique rotation&#8221; Q. </p>
<p>I&#8217;ll remind you that when they say &#8220;oblique rotation&#8221; they mean a general change-of-basis. A rotation preserves an orthonormal basis; a rotation cannot transform an orthonormal basis to a non-orthonormal basis, and that&#8217;s what they mean &#8212; a transformation from an orthonormal basis to a non-orthonormal basis, or possibly a transformation from a merely orthogonal basis to a non-orthogonal one. In either case, the transformation cannot be a rotation.</p>
<p>(It isn&#8217;t that complicated! If you change the lengths of basis vectors, it isn&#8217;t a rotation; if you change the angles between the basis vectors, it isn&#8217;t a rotation.)</p>
<p>Anyway, we showed in Part 1 that V and Q spanned the same 4D subspace of <img src='http://l.wordpress.com/latex.php?latex=R%5E%7B10%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='R^{10}\ ' title='R^{10}\ ' class='latex' />.</p>
<p>Now, what about V and P? Let me recall them:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=P+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bcccc%7D+0.34+%26+-0.39+%26+0.09+%26+-0.08+%5C%5C+0.34+%26+-0.37+%26+-0.08+%26+-0.23+%5C%5C+0.35+%26+-0.1+%26+0.05+%26+0.03+%5C%5C+0.3+%26+-0.24+%26+-0.2+%26+0.63+%5C%5C+0.34+%26+-0.32+%26+0.19+%26+-0.28+%5C%5C+0.27+%26+0.24+%26+-0.57+%26+0.3+%5C%5C+0.32+%26+0.27+%26+-0.27+%26+-0.34+%5C%5C+0.3+%26+0.51+%26+0.19+%26+0.27+%5C%5C+0.23+%26+0.22+%26+0.69+%26+0.43+%5C%5C+0.36+%26+0.33+%26+-0.03+%26+0.02%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='P = \left(\begin{array}{cccc} 0.34 &amp; -0.39 &amp; 0.09 &amp; -0.08 \\ 0.34 &amp; -0.37 &amp; -0.08 &amp; -0.23 \\ 0.35 &amp; -0.1 &amp; 0.05 &amp; 0.03 \\ 0.3 &amp; -0.24 &amp; -0.2 &amp; 0.63 \\ 0.34 &amp; -0.32 &amp; 0.19 &amp; -0.28 \\ 0.27 &amp; 0.24 &amp; -0.57 &amp; 0.3 \\ 0.32 &amp; 0.27 &amp; -0.27 &amp; -0.34 \\ 0.3 &amp; 0.51 &amp; 0.19 &amp; 0.27 \\ 0.23 &amp; 0.22 &amp; 0.69 &amp; 0.43 \\ 0.36 &amp; 0.33 &amp; -0.03 &amp; 0.02\end{array}\right)' title='P = \left(\begin{array}{cccc} 0.34 &amp; -0.39 &amp; 0.09 &amp; -0.08 \\ 0.34 &amp; -0.37 &amp; -0.08 &amp; -0.23 \\ 0.35 &amp; -0.1 &amp; 0.05 &amp; 0.03 \\ 0.3 &amp; -0.24 &amp; -0.2 &amp; 0.63 \\ 0.34 &amp; -0.32 &amp; 0.19 &amp; -0.28 \\ 0.27 &amp; 0.24 &amp; -0.57 &amp; 0.3 \\ 0.32 &amp; 0.27 &amp; -0.27 &amp; -0.34 \\ 0.3 &amp; 0.51 &amp; 0.19 &amp; 0.27 \\ 0.23 &amp; 0.22 &amp; 0.69 &amp; 0.43 \\ 0.36 &amp; 0.33 &amp; -0.03 &amp; 0.02\end{array}\right)' class='latex' /></p>
<p><img src='http://l.wordpress.com/latex.php?latex=V+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bcccc%7D+0.48+%26+0.09+%26+0.17+%26+0.14+%5C%5C+0.49+%26+0.15+%26+0.18+%26+-0.03+%5C%5C+0.35+%26+0.22+%26+0.24+%26+0.22+%5C%5C+0.26+%26+0.+%26+0.64+%26+0.2+%5C%5C+0.49+%26+0.16+%26+0.02+%26+0.15+%5C%5C+0.05+%26+0.34+%26+0.6+%26+-0.09+%5C%5C+0.2+%26+0.51+%26+0.18+%26+-0.07+%5C%5C+0.1+%26+0.54+%26+-0.02+%26+0.32+%5C%5C+0.1+%26+0.13+%26+0.07+%26+0.83+%5C%5C+0.17+%26+0.46+%26+0.28+%26+0.26%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='V = \left(\begin{array}{cccc} 0.48 &amp; 0.09 &amp; 0.17 &amp; 0.14 \\ 0.49 &amp; 0.15 &amp; 0.18 &amp; -0.03 \\ 0.35 &amp; 0.22 &amp; 0.24 &amp; 0.22 \\ 0.26 &amp; 0. &amp; 0.64 &amp; 0.2 \\ 0.49 &amp; 0.16 &amp; 0.02 &amp; 0.15 \\ 0.05 &amp; 0.34 &amp; 0.6 &amp; -0.09 \\ 0.2 &amp; 0.51 &amp; 0.18 &amp; -0.07 \\ 0.1 &amp; 0.54 &amp; -0.02 &amp; 0.32 \\ 0.1 &amp; 0.13 &amp; 0.07 &amp; 0.83 \\ 0.17 &amp; 0.46 &amp; 0.28 &amp; 0.26\end{array}\right)' title='V = \left(\begin{array}{cccc} 0.48 &amp; 0.09 &amp; 0.17 &amp; 0.14 \\ 0.49 &amp; 0.15 &amp; 0.18 &amp; -0.03 \\ 0.35 &amp; 0.22 &amp; 0.24 &amp; 0.22 \\ 0.26 &amp; 0. &amp; 0.64 &amp; 0.2 \\ 0.49 &amp; 0.16 &amp; 0.02 &amp; 0.15 \\ 0.05 &amp; 0.34 &amp; 0.6 &amp; -0.09 \\ 0.2 &amp; 0.51 &amp; 0.18 &amp; -0.07 \\ 0.1 &amp; 0.54 &amp; -0.02 &amp; 0.32 \\ 0.1 &amp; 0.13 &amp; 0.07 &amp; 0.83 \\ 0.17 &amp; 0.46 &amp; 0.28 &amp; 0.26\end{array}\right)' class='latex' /></p>
<p>As before, I suppose there is a transition matrix T relating them; each column of <img src='http://l.wordpress.com/latex.php?latex=V%5ET+%3D+V%27&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='V^T = V&#039;' title='V^T = V&#039;' class='latex' /> can be computed by applying a transition matrix T to the corresponding column of <img src='http://l.wordpress.com/latex.php?latex=P%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='P^T\ ' title='P^T\ ' class='latex' />:</p>
<p>V&#8217; = T P&#8217;</p>
<p>i.e.</p>
<p>V = P T&#8217;.</p>
<p>Then I imagine briefly that I can &#8220;solve&#8221; for T&#8217;&#8230;</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T%27+%3D+P%5E%7B-1%7D%5C+V%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T&#039; = P^{-1}\ V\ ' title='T&#039; = P^{-1}\ V\ ' class='latex' />,</p>
<p>but then quickly replace the non-existent inverse of Q by the appropriate pseudo-inverse</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T%27+%3D+%28P%27P%29%5E%7B-1%7D%5C+P%27%5C+V%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T&#039; = (P&#039;P)^{-1}\ P&#039;\ V\ ' title='T&#039; = (P&#039;P)^{-1}\ P&#039;\ V\ ' class='latex' />.</p>
<p>I compute T&#8217;, and then display its transpose T:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bcccc%7D+0.905145+%26+-0.386677+%26+0.0882059+%26+-0.141151+%5C%5C+0.853806+%26+0.568131+%26+-0.0875601+%26+-0.220572+%5C%5C+0.64498+%26+-0.155196+%26+-0.506397+%26+0.490735+%5C%5C+0.507437+%26+0.131036+%26+0.67664+%26+0.347268%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T = \left(\begin{array}{cccc} 0.905145 &amp; -0.386677 &amp; 0.0882059 &amp; -0.141151 \\ 0.853806 &amp; 0.568131 &amp; -0.0875601 &amp; -0.220572 \\ 0.64498 &amp; -0.155196 &amp; -0.506397 &amp; 0.490735 \\ 0.507437 &amp; 0.131036 &amp; 0.67664 &amp; 0.347268\end{array}\right)' title='T = \left(\begin{array}{cccc} 0.905145 &amp; -0.386677 &amp; 0.0882059 &amp; -0.141151 \\ 0.853806 &amp; 0.568131 &amp; -0.0875601 &amp; -0.220572 \\ 0.64498 &amp; -0.155196 &amp; -0.506397 &amp; 0.490735 \\ 0.507437 &amp; 0.131036 &amp; 0.67664 &amp; 0.347268\end{array}\right)' class='latex' /></p>
<p>and then I test whether</p>
<p>V = P T&#8217; (?).</p>
<p>The largest difference (element by element) between the matrices V and P T&#8217; is 0.170627, which is rather larger (by a factor of 23) than the differences we saw in Part 1. Here&#8217;s the full blown matrix &#8212; where I chose to round off first, then subtract (i.e. what we&#8217;d compute if we were subtracting published, already  rounded-off, matrices):</p>
<p><img src='http://l.wordpress.com/latex.php?latex=V+-+P%5C+T%27+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bcccc%7D+0.+%26+0.01+%26+-0.02+%26+-0.01+%5C%5C+0.01+%26+0.01+%26+-0.02+%26+-0.02+%5C%5C+-0.01+%26+-0.01+%26+0.01+%26+0.01+%5C%5C+0.+%26+0+%26+0.+%26+0.+%5C%5C+0.+%26+0.01+%26+-0.02+%26+-0.01+%5C%5C+-0.01+%26+-0.01+%26+0.03+%26+0.02+%5C%5C+-0.01+%26+-0.02+%26+0.05+%26+0.03+%5C%5C+0.05+%26+0.07+%26+-0.17+%26+-0.12+%5C%5C+-0.02+%26+-0.04+%26+0.09+%26+0.07+%5C%5C+-0.02+%26+-0.03+%26+0.07+%26+0.05%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='V - P\ T&#039; = \left(\begin{array}{cccc} 0. &amp; 0.01 &amp; -0.02 &amp; -0.01 \\ 0.01 &amp; 0.01 &amp; -0.02 &amp; -0.02 \\ -0.01 &amp; -0.01 &amp; 0.01 &amp; 0.01 \\ 0. &amp; 0 &amp; 0. &amp; 0. \\ 0. &amp; 0.01 &amp; -0.02 &amp; -0.01 \\ -0.01 &amp; -0.01 &amp; 0.03 &amp; 0.02 \\ -0.01 &amp; -0.02 &amp; 0.05 &amp; 0.03 \\ 0.05 &amp; 0.07 &amp; -0.17 &amp; -0.12 \\ -0.02 &amp; -0.04 &amp; 0.09 &amp; 0.07 \\ -0.02 &amp; -0.03 &amp; 0.07 &amp; 0.05\end{array}\right)' title='V - P\ T&#039; = \left(\begin{array}{cccc} 0. &amp; 0.01 &amp; -0.02 &amp; -0.01 \\ 0.01 &amp; 0.01 &amp; -0.02 &amp; -0.02 \\ -0.01 &amp; -0.01 &amp; 0.01 &amp; 0.01 \\ 0. &amp; 0 &amp; 0. &amp; 0. \\ 0. &amp; 0.01 &amp; -0.02 &amp; -0.01 \\ -0.01 &amp; -0.01 &amp; 0.03 &amp; 0.02 \\ -0.01 &amp; -0.02 &amp; 0.05 &amp; 0.03 \\ 0.05 &amp; 0.07 &amp; -0.17 &amp; -0.12 \\ -0.02 &amp; -0.04 &amp; 0.09 &amp; 0.07 \\ -0.02 &amp; -0.03 &amp; 0.07 &amp; 0.05\end{array}\right)' class='latex' /></p>
<p>I am inclined to think there is a probem. But we don&#8217;t know much at all about it.</p>
<p>Let&#8217;s try one of our alternatives. We construct a projection operator onto the subspace spanned by P.</p>
<p>Get the SVD (Singular Value Decomposition) of P&#8230;</p>
<p><img src='http://l.wordpress.com/latex.php?latex=P+%3D+u%5C+w%5C+v%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='P = u\ w\ v^T\ ' title='P = u\ w\ v^T\ ' class='latex' />.</p>
<p>Then, since u is 10&#215;10 and V is of rank 4, the leftmost 4 columns (u1) of u&#8230;.</p>
<p><img src='http://l.wordpress.com/latex.php?latex=u1+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bcccc%7D+0.132041+%26+0.280276+%26+-0.423196+%26+0.0366383+%5C%5C+0.24536+%26+0.379423+%26+-0.288143+%26+-0.0619886+%5C%5C+-0.0781059+%26+0.252968+%26+-0.245411+%26+-0.0642461+%5C%5C+-0.310642+%26+0.402272+%26+-0.122076+%26+0.641009+%5C%5C+0.19934+%26+0.202925+%26+-0.456543+%26+-0.212204+%5C%5C+-0.275595+%26+0.504975+%26+0.417433+%26+0.130869+%5C%5C+0.0279239+%26+0.347505+%26+0.199748+%26+-0.545498+%5C%5C+-0.547166+%26+0.00466106+%26+-0.00216808+%26+-0.298924+%5C%5C+-0.571058+%26+-0.293548+%26+-0.488675+%26+-0.061545+%5C%5C+-0.278923+%26+0.220314+%26+0.0368869+%26+-0.356268%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='u1 = \left(\begin{array}{cccc} 0.132041 &amp; 0.280276 &amp; -0.423196 &amp; 0.0366383 \\ 0.24536 &amp; 0.379423 &amp; -0.288143 &amp; -0.0619886 \\ -0.0781059 &amp; 0.252968 &amp; -0.245411 &amp; -0.0642461 \\ -0.310642 &amp; 0.402272 &amp; -0.122076 &amp; 0.641009 \\ 0.19934 &amp; 0.202925 &amp; -0.456543 &amp; -0.212204 \\ -0.275595 &amp; 0.504975 &amp; 0.417433 &amp; 0.130869 \\ 0.0279239 &amp; 0.347505 &amp; 0.199748 &amp; -0.545498 \\ -0.547166 &amp; 0.00466106 &amp; -0.00216808 &amp; -0.298924 \\ -0.571058 &amp; -0.293548 &amp; -0.488675 &amp; -0.061545 \\ -0.278923 &amp; 0.220314 &amp; 0.0368869 &amp; -0.356268\end{array}\right)' title='u1 = \left(\begin{array}{cccc} 0.132041 &amp; 0.280276 &amp; -0.423196 &amp; 0.0366383 \\ 0.24536 &amp; 0.379423 &amp; -0.288143 &amp; -0.0619886 \\ -0.0781059 &amp; 0.252968 &amp; -0.245411 &amp; -0.0642461 \\ -0.310642 &amp; 0.402272 &amp; -0.122076 &amp; 0.641009 \\ 0.19934 &amp; 0.202925 &amp; -0.456543 &amp; -0.212204 \\ -0.275595 &amp; 0.504975 &amp; 0.417433 &amp; 0.130869 \\ 0.0279239 &amp; 0.347505 &amp; 0.199748 &amp; -0.545498 \\ -0.547166 &amp; 0.00466106 &amp; -0.00216808 &amp; -0.298924 \\ -0.571058 &amp; -0.293548 &amp; -0.488675 &amp; -0.061545 \\ -0.278923 &amp; 0.220314 &amp; 0.0368869 &amp; -0.356268\end{array}\right)' class='latex' /></p>
<p>are an orthonormal basis for the range of P (i.e. the column space of P). We construct a projection operator, as we have before, by</p>
<p><img src='http://l.wordpress.com/latex.php?latex=R+%3D+u1%5C+u1%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='R = u1\ u1^T\ ' title='R = u1\ u1^T\ ' class='latex' />.</p>
<p>We check it first by confirming that R R = R, i.e. it is idempotent, hence a projection operator. We check it further by applying it to the column vectors in P: we expect that R P = P; i.e. it actually projects onto the column space of P (the space spanned by the columns of P).</p>
<p>Now, having checked that R is a projection operator onto P, we apply it to V, and compute V &#8211; R V:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=V+-+R%5C+V+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bcccc%7D+0.00221622+%26+0.0115115+%26+-0.0249851+%26+-0.0145408+%5C%5C+0.0137721+%26+0.012178+%26+-0.0243583+%26+-0.0200425+%5C%5C+-0.00564412+%26+-0.011024+%26+0.00933521+%26+0.0112507+%5C%5C+0.00222059+%26+0.00165751+%26+-0.00118369+%26+-0.00423324+%5C%5C+0.00223276+%26+0.00638406+%26+-0.0153346+%26+-0.0119237+%5C%5C+-0.00896396+%26+-0.0106169+%26+0.0272358+%26+0.0230479+%5C%5C+-0.00941945+%26+-0.0152489+%26+0.0456323+%26+0.0330044+%5C%5C+0.0470134+%26+0.0703021+%26+-0.170627+%26+-0.121383+%5C%5C+-0.0232815+%26+-0.036102+%26+0.0941953+%26+0.068255+%5C%5C+-0.0227796+%26+-0.0330688+%26+0.0740154+%26+0.0474348%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='V - R\ V = \left(\begin{array}{cccc} 0.00221622 &amp; 0.0115115 &amp; -0.0249851 &amp; -0.0145408 \\ 0.0137721 &amp; 0.012178 &amp; -0.0243583 &amp; -0.0200425 \\ -0.00564412 &amp; -0.011024 &amp; 0.00933521 &amp; 0.0112507 \\ 0.00222059 &amp; 0.00165751 &amp; -0.00118369 &amp; -0.00423324 \\ 0.00223276 &amp; 0.00638406 &amp; -0.0153346 &amp; -0.0119237 \\ -0.00896396 &amp; -0.0106169 &amp; 0.0272358 &amp; 0.0230479 \\ -0.00941945 &amp; -0.0152489 &amp; 0.0456323 &amp; 0.0330044 \\ 0.0470134 &amp; 0.0703021 &amp; -0.170627 &amp; -0.121383 \\ -0.0232815 &amp; -0.036102 &amp; 0.0941953 &amp; 0.068255 \\ -0.0227796 &amp; -0.0330688 &amp; 0.0740154 &amp; 0.0474348\end{array}\right)' title='V - R\ V = \left(\begin{array}{cccc} 0.00221622 &amp; 0.0115115 &amp; -0.0249851 &amp; -0.0145408 \\ 0.0137721 &amp; 0.012178 &amp; -0.0243583 &amp; -0.0200425 \\ -0.00564412 &amp; -0.011024 &amp; 0.00933521 &amp; 0.0112507 \\ 0.00222059 &amp; 0.00165751 &amp; -0.00118369 &amp; -0.00423324 \\ 0.00223276 &amp; 0.00638406 &amp; -0.0153346 &amp; -0.0119237 \\ -0.00896396 &amp; -0.0106169 &amp; 0.0272358 &amp; 0.0230479 \\ -0.00941945 &amp; -0.0152489 &amp; 0.0456323 &amp; 0.0330044 \\ 0.0470134 &amp; 0.0703021 &amp; -0.170627 &amp; -0.121383 \\ -0.0232815 &amp; -0.036102 &amp; 0.0941953 &amp; 0.068255 \\ -0.0227796 &amp; -0.0330688 &amp; 0.0740154 &amp; 0.0474348\end{array}\right)' class='latex' /></p>
<p>Let me round that to the nearest .01&#8230;</p>
<p><img src='http://l.wordpress.com/latex.php?latex=V+-+R+V+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bcccc%7D+0+%26+0.01+%26+-0.02+%26+-0.01+%5C%5C+0.01+%26+0.01+%26+-0.02+%26+-0.02+%5C%5C+-0.01+%26+-0.01+%26+0.01+%26+0.01+%5C%5C+0+%26+0+%26+0+%26+0+%5C%5C+0+%26+0.01+%26+-0.02+%26+-0.01+%5C%5C+-0.01+%26+-0.01+%26+0.03+%26+0.02+%5C%5C+-0.01+%26+-0.02+%26+0.05+%26+0.03+%5C%5C+0.05+%26+0.07+%26+-0.17+%26+-0.12+%5C%5C+-0.02+%26+-0.04+%26+0.09+%26+0.07+%5C%5C+-0.02+%26+-0.03+%26+0.07+%26+0.05%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='V - R V = \left(\begin{array}{cccc} 0 &amp; 0.01 &amp; -0.02 &amp; -0.01 \\ 0.01 &amp; 0.01 &amp; -0.02 &amp; -0.02 \\ -0.01 &amp; -0.01 &amp; 0.01 &amp; 0.01 \\ 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0.01 &amp; -0.02 &amp; -0.01 \\ -0.01 &amp; -0.01 &amp; 0.03 &amp; 0.02 \\ -0.01 &amp; -0.02 &amp; 0.05 &amp; 0.03 \\ 0.05 &amp; 0.07 &amp; -0.17 &amp; -0.12 \\ -0.02 &amp; -0.04 &amp; 0.09 &amp; 0.07 \\ -0.02 &amp; -0.03 &amp; 0.07 &amp; 0.05\end{array}\right)' title='V - R V = \left(\begin{array}{cccc} 0 &amp; 0.01 &amp; -0.02 &amp; -0.01 \\ 0.01 &amp; 0.01 &amp; -0.02 &amp; -0.02 \\ -0.01 &amp; -0.01 &amp; 0.01 &amp; 0.01 \\ 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0.01 &amp; -0.02 &amp; -0.01 \\ -0.01 &amp; -0.01 &amp; 0.03 &amp; 0.02 \\ -0.01 &amp; -0.02 &amp; 0.05 &amp; 0.03 \\ 0.05 &amp; 0.07 &amp; -0.17 &amp; -0.12 \\ -0.02 &amp; -0.04 &amp; 0.09 &amp; 0.07 \\ -0.02 &amp; -0.03 &amp; 0.07 &amp; 0.05\end{array}\right)' class='latex' /></p>
<p>I should put that array of differences into perspective. Recall V:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=V+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bcccc%7D+0.48+%26+0.09+%26+0.17+%26+0.14+%5C%5C+0.49+%26+0.15+%26+0.18+%26+-0.03+%5C%5C+0.35+%26+0.22+%26+0.24+%26+0.22+%5C%5C+0.26+%26+0.+%26+0.64+%26+0.2+%5C%5C+0.49+%26+0.16+%26+0.02+%26+0.15+%5C%5C+0.05+%26+0.34+%26+0.6+%26+-0.09+%5C%5C+0.2+%26+0.51+%26+0.18+%26+-0.07+%5C%5C+0.1+%26+0.54+%26+-0.02+%26+0.32+%5C%5C+0.1+%26+0.13+%26+0.07+%26+0.83+%5C%5C+0.17+%26+0.46+%26+0.28+%26+0.26%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='V = \left(\begin{array}{cccc} 0.48 &amp; 0.09 &amp; 0.17 &amp; 0.14 \\ 0.49 &amp; 0.15 &amp; 0.18 &amp; -0.03 \\ 0.35 &amp; 0.22 &amp; 0.24 &amp; 0.22 \\ 0.26 &amp; 0. &amp; 0.64 &amp; 0.2 \\ 0.49 &amp; 0.16 &amp; 0.02 &amp; 0.15 \\ 0.05 &amp; 0.34 &amp; 0.6 &amp; -0.09 \\ 0.2 &amp; 0.51 &amp; 0.18 &amp; -0.07 \\ 0.1 &amp; 0.54 &amp; -0.02 &amp; 0.32 \\ 0.1 &amp; 0.13 &amp; 0.07 &amp; 0.83 \\ 0.17 &amp; 0.46 &amp; 0.28 &amp; 0.26\end{array}\right)' title='V = \left(\begin{array}{cccc} 0.48 &amp; 0.09 &amp; 0.17 &amp; 0.14 \\ 0.49 &amp; 0.15 &amp; 0.18 &amp; -0.03 \\ 0.35 &amp; 0.22 &amp; 0.24 &amp; 0.22 \\ 0.26 &amp; 0. &amp; 0.64 &amp; 0.2 \\ 0.49 &amp; 0.16 &amp; 0.02 &amp; 0.15 \\ 0.05 &amp; 0.34 &amp; 0.6 &amp; -0.09 \\ 0.2 &amp; 0.51 &amp; 0.18 &amp; -0.07 \\ 0.1 &amp; 0.54 &amp; -0.02 &amp; 0.32 \\ 0.1 &amp; 0.13 &amp; 0.07 &amp; 0.83 \\ 0.17 &amp; 0.46 &amp; 0.28 &amp; 0.26\end{array}\right)' class='latex' /></p>
<p>This reinforces my belief that we have a problem. Some of the differences we found are larger than some of the values of V itself. I can see that V is not in the column space of P, and while it&#8217;s not extremely far away, it&#8217;s not close either. (This seems more definitive than &#8220;the hypothetical transition matrix T doesn&#8217;t quite work&#8221;.)</p>
<p>As before, however, we are tip-toeing around the real question: Is every column vector in V a linear combination of the columns of P?</p>
<p>Easy enough. Do a regression. Actually 4 of them, one for each column of V.</p>
<p>Let me name the individual columns of the P matrix, and let me set the first column of V (v1) as &#8220;y&#8221;, and the columns of V as independent variables.</p>
<p><a href="http://rip94550.files.wordpress.com/2009/11/v1-on-p-in.png"><img src="http://rip94550.files.wordpress.com/2009/11/v1-on-p-in.png?w=841&#038;h=313" alt="" title="v1 on P in" width="841" height="313" class="alignnone size-full wp-image-2554" /></a></p>
<p>(Some smaller pictures follow, in which you can see that the final option is &#8220;IncludeConstantBasis -&gt; False&#8221;.) The results are:</p>
<p><a href="http://rip94550.files.wordpress.com/2009/11/v1-on-p-out.png"><img src="http://rip94550.files.wordpress.com/2009/11/v1-on-p-out.png?w=543&#038;h=211" alt="" title="v1 on P out" width="543" height="211" class="alignnone size-full wp-image-2553" /></a></p>
<p>Not bad at all. In fact, rather close to perfect.</p>
<p>What was the first row of T?</p>
<p>{0.905145, -0.386677, 0.0882059, -0.141151}.</p>
<p>Yes, those are the <img src='http://l.wordpress.com/latex.php?latex=%5Cbeta+s&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\beta s' title='\beta s' class='latex' /> (&#8220;Estimates&#8221;) for that regression; first row of T is first column of T&#8217; is regression coefficients for the first column of V as the dependent variable.</p>
<p>Let me emphasize another relationship. For the first regression, yhat should be the projection of v1 (the 1st column of V) onto the column space of P. But we have that projection directly as R v1:</p>
<p>R v1 = {0.477784,0.476228,0.355644,0.257779,0.487767,<br />
0.058964,0.209419,0.0529866,0.123281,0.19278}</p>
<p>&#8230; and we have the yhat from the regression:</p>
<p>yhat = {0.477784,0.476228,0.355644,0.257779,0.487767,<br />
0.058964,0.209419,0.0529866,0.123281,0.19278}</p>
<p>Good, they are the same. So if regression works better for you than the projection operator, then use regression. Personally, I prefer the projection operator because I can apply it to all of V at once. (And because sometimes I have a use for the orthonormal basis u1.)</p>
<p>Largely to display the R^2, let me run the other three regressions. (Oh, I also reduced the magnification in my Mathematica notebook, so the pictures are smaller and the right side of the regression command isn&#8217;t cut off, at least on my screen.)</p>
<p>Here&#8217;s v2 as the dependent variable:</p>
<p><a href="http://rip94550.files.wordpress.com/2009/11/v2-on-p.png"><img src="http://rip94550.files.wordpress.com/2009/11/v2-on-p.png?w=678&#038;h=247" alt="" title="v2 on P" width="678" height="247" class="alignnone size-full wp-image-2572" /></a></p>
<p>Here&#8217;s v3 as the dependent variable:</p>
<p><a href="http://rip94550.files.wordpress.com/2009/11/v3-on-p.png"><img src="http://rip94550.files.wordpress.com/2009/11/v3-on-p.png?w=675&#038;h=244" alt="" title="v3 on P" width="675" height="244" class="alignnone size-full wp-image-2571" /></a></p>
<p>Here&#8217;s v4 as the dependent variable:</p>
<p><a href="http://rip94550.files.wordpress.com/2009/11/v4-on-p.png"><img src="http://rip94550.files.wordpress.com/2009/11/v4-on-p.png?w=679&#038;h=248" alt="" title="v4 on P" width="679" height="248" class="alignnone size-full wp-image-2570" /></a></p>
<p>We see that the <img src='http://l.wordpress.com/latex.php?latex=R%5E2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='R^2' title='R^2' class='latex' /> is over 99% for v2, falls to 95% for v3, and is 97.6% for v4. Those last two are just not large enough, not for this question.</p>
<p>I&#8217;m certain that V and P do not span the same subspace, but that&#8217;s about all I know.</p>
<p>We could, however, have made the dual choice, projecting P onto V instead of V onto P. Are they the same?</p>
<p>No.</p>
<p>We already know &#8212; from the T matrix, from the projection operator, or from the regressions &#8212; that the P and V matrices do not represent the same data in two different coordinate systems. But there might be &#8212; and in this case, there is! &#8212; more information available by making the other choice.</p>
<p>Let&#8217;s get the projection onto V instead of onto P. We need the SVD of V&#8230;</p>
<p><img src='http://l.wordpress.com/latex.php?latex=V+%3D+u%5C+w%5C+v%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='V = u\ w\ v^T\ ' title='V = u\ w\ v^T\ ' class='latex' />.</p>
<p>We need the 4 leftmost columns (u1) of u&#8230;</p>
<p><img src='http://l.wordpress.com/latex.php?latex=u1+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bcccc%7D+-0.292636+%26+0.0434068+%26+-0.33927+%26+0.269896+%5C%5C+-0.274013+%26+0.218205+%26+-0.238496+%26+0.365998+%5C%5C+-0.337357+%26+-0.00723082+%26+-0.119568+%26+0.0745101+%5C%5C+-0.355459+%26+0.224109+%26+-0.415783+%26+-0.490416+%5C%5C+-0.2739+%26+-0.0500253+%26+-0.225463+%26+0.452829+%5C%5C+-0.308498+%26+0.463936+%26+0.232078+%26+-0.416388+%5C%5C+-0.287334+%26+0.227908+%26+0.427185+%26+0.212631+%5C%5C+-0.303344+%26+-0.281983+%26+0.503807+%26+0.152613+%5C%5C+-0.329068+%26+-0.741253+%26+-0.129874+%26+-0.304713+%5C%5C+-0.382183+%26+-0.0396735+%26+0.288053+%26+-0.0857624%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='u1 = \left(\begin{array}{cccc} -0.292636 &amp; 0.0434068 &amp; -0.33927 &amp; 0.269896 \\ -0.274013 &amp; 0.218205 &amp; -0.238496 &amp; 0.365998 \\ -0.337357 &amp; -0.00723082 &amp; -0.119568 &amp; 0.0745101 \\ -0.355459 &amp; 0.224109 &amp; -0.415783 &amp; -0.490416 \\ -0.2739 &amp; -0.0500253 &amp; -0.225463 &amp; 0.452829 \\ -0.308498 &amp; 0.463936 &amp; 0.232078 &amp; -0.416388 \\ -0.287334 &amp; 0.227908 &amp; 0.427185 &amp; 0.212631 \\ -0.303344 &amp; -0.281983 &amp; 0.503807 &amp; 0.152613 \\ -0.329068 &amp; -0.741253 &amp; -0.129874 &amp; -0.304713 \\ -0.382183 &amp; -0.0396735 &amp; 0.288053 &amp; -0.0857624\end{array}\right)' title='u1 = \left(\begin{array}{cccc} -0.292636 &amp; 0.0434068 &amp; -0.33927 &amp; 0.269896 \\ -0.274013 &amp; 0.218205 &amp; -0.238496 &amp; 0.365998 \\ -0.337357 &amp; -0.00723082 &amp; -0.119568 &amp; 0.0745101 \\ -0.355459 &amp; 0.224109 &amp; -0.415783 &amp; -0.490416 \\ -0.2739 &amp; -0.0500253 &amp; -0.225463 &amp; 0.452829 \\ -0.308498 &amp; 0.463936 &amp; 0.232078 &amp; -0.416388 \\ -0.287334 &amp; 0.227908 &amp; 0.427185 &amp; 0.212631 \\ -0.303344 &amp; -0.281983 &amp; 0.503807 &amp; 0.152613 \\ -0.329068 &amp; -0.741253 &amp; -0.129874 &amp; -0.304713 \\ -0.382183 &amp; -0.0396735 &amp; 0.288053 &amp; -0.0857624\end{array}\right)' class='latex' /></p>
<p>We construct the projection operator&#8230;</p>
<p><img src='http://l.wordpress.com/latex.php?latex=R+%3D+u1%5C+u1%5ET&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='R = u1\ u1^T' title='R = u1\ u1^T' class='latex' /></p>
<p>Now we apply it to P, and compute the difference P &#8211; R P:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=P+-+R+P+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bcccc%7D+0.00186923+%26+-0.00646007+%26+-0.00165699+%26+0.0293708+%5C%5C+-0.00396322+%26+0.00598219+%26+0.00143136+%26+0.0162366+%5C%5C+0.0035053+%26+0.00255499+%26+-0.00525352+%26+-0.0232869+%5C%5C+0.000382829+%26+0.00307153+%26+0.00267228+%26+0.124774+%5C%5C+0.000923133+%26+-0.00219591+%26+0.00142733+%26+-0.0228012+%5C%5C+0.0000472374+%26+-0.00300758+%26+-0.00291228+%26+-0.00287352+%5C%5C+-0.00462961+%26+-0.00220958+%26+-0.0000400809+%26+-0.149176+%5C%5C+0.00305495+%26+0.00376593+%26+-0.000439512+%26+0.29618+%5C%5C+-0.00367312+%26+-0.00153518+%26+-0.000838857+%26+-0.106747+%5C%5C+0.00147883+%26+-0.000459218+%26+0.00482354+%26+-0.141981%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='P - R P = \left(\begin{array}{cccc} 0.00186923 &amp; -0.00646007 &amp; -0.00165699 &amp; 0.0293708 \\ -0.00396322 &amp; 0.00598219 &amp; 0.00143136 &amp; 0.0162366 \\ 0.0035053 &amp; 0.00255499 &amp; -0.00525352 &amp; -0.0232869 \\ 0.000382829 &amp; 0.00307153 &amp; 0.00267228 &amp; 0.124774 \\ 0.000923133 &amp; -0.00219591 &amp; 0.00142733 &amp; -0.0228012 \\ 0.0000472374 &amp; -0.00300758 &amp; -0.00291228 &amp; -0.00287352 \\ -0.00462961 &amp; -0.00220958 &amp; -0.0000400809 &amp; -0.149176 \\ 0.00305495 &amp; 0.00376593 &amp; -0.000439512 &amp; 0.29618 \\ -0.00367312 &amp; -0.00153518 &amp; -0.000838857 &amp; -0.106747 \\ 0.00147883 &amp; -0.000459218 &amp; 0.00482354 &amp; -0.141981\end{array}\right)' title='P - R P = \left(\begin{array}{cccc} 0.00186923 &amp; -0.00646007 &amp; -0.00165699 &amp; 0.0293708 \\ -0.00396322 &amp; 0.00598219 &amp; 0.00143136 &amp; 0.0162366 \\ 0.0035053 &amp; 0.00255499 &amp; -0.00525352 &amp; -0.0232869 \\ 0.000382829 &amp; 0.00307153 &amp; 0.00267228 &amp; 0.124774 \\ 0.000923133 &amp; -0.00219591 &amp; 0.00142733 &amp; -0.0228012 \\ 0.0000472374 &amp; -0.00300758 &amp; -0.00291228 &amp; -0.00287352 \\ -0.00462961 &amp; -0.00220958 &amp; -0.0000400809 &amp; -0.149176 \\ 0.00305495 &amp; 0.00376593 &amp; -0.000439512 &amp; 0.29618 \\ -0.00367312 &amp; -0.00153518 &amp; -0.000838857 &amp; -0.106747 \\ 0.00147883 &amp; -0.000459218 &amp; 0.00482354 &amp; -0.141981\end{array}\right)' class='latex' /></p>
<p>So what?</p>
<p>Round it off:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=P+-+R+P+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bcccc%7D+0+%26+-0.01+%26+0+%26+0.03+%5C%5C+0+%26+0.01+%26+0+%26+0.02+%5C%5C+0+%26+0+%26+-0.01+%26+-0.02+%5C%5C+0+%26+0+%26+0+%26+0.12+%5C%5C+0+%26+0+%26+0+%26+-0.02+%5C%5C+0+%26+0+%26+0+%26+0+%5C%5C+0+%26+0+%26+0+%26+-0.15+%5C%5C+0+%26+0+%26+0+%26+0.3+%5C%5C+0+%26+0+%26+0+%26+-0.11+%5C%5C+0+%26+0+%26+0+%26+-0.14%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='P - R P = \left(\begin{array}{cccc} 0 &amp; -0.01 &amp; 0 &amp; 0.03 \\ 0 &amp; 0.01 &amp; 0 &amp; 0.02 \\ 0 &amp; 0 &amp; -0.01 &amp; -0.02 \\ 0 &amp; 0 &amp; 0 &amp; 0.12 \\ 0 &amp; 0 &amp; 0 &amp; -0.02 \\ 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; -0.15 \\ 0 &amp; 0 &amp; 0 &amp; 0.3 \\ 0 &amp; 0 &amp; 0 &amp; -0.11 \\ 0 &amp; 0 &amp; 0 &amp; -0.14\end{array}\right)' title='P - R P = \left(\begin{array}{cccc} 0 &amp; -0.01 &amp; 0 &amp; 0.03 \\ 0 &amp; 0.01 &amp; 0 &amp; 0.02 \\ 0 &amp; 0 &amp; -0.01 &amp; -0.02 \\ 0 &amp; 0 &amp; 0 &amp; 0.12 \\ 0 &amp; 0 &amp; 0 &amp; -0.02 \\ 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; -0.15 \\ 0 &amp; 0 &amp; 0 &amp; 0.3 \\ 0 &amp; 0 &amp; 0 &amp; -0.11 \\ 0 &amp; 0 &amp; 0 &amp; -0.14\end{array}\right)' class='latex' /></p>
<p>Ah ha! It&#8217;s time for Robin to squeak out, &#8220;Holy moly, Batman!&#8221; </p>
<p><strong>The fourth column of P does not lie in the subspace spanned by the 4 columns of V, while the first three do</strong>. That is the problem. I don&#8217;t why or where it happened, but I know exactly what&#8217;s wrong: the 4th column of P is the only problem.</p>
<p>Somebody blew it somewhere. (OK, since I don&#8217;t know how a varimax rotation is computed, I have to entertain the possibility that V is not supposed to be P under a change of basis. But I can&#8217;t believe that, because V and Q have a common column space, and 3 of the 4 columns of P lie in that common column space. If that&#8217;s an accident, what does a deliberate act look like?)</p>
<p>Is the mistake in the orignal paper? Were P and V computed from the same correlation matrix but by independent algorithms? Or was V computed incorectly from P (and then Q computed from V)? </p>
<p>Or did someone copy P incorrectly? (P should be primary, but then how the heck does the 4th column of P fail to be in the column space of V? I would sooner have expected an error in V, given P.)</p>
<p>Or did they rotate the first 3 PCs, and then apply that transformation to the 4th column? (No. I&#8217;ve checked. You can too.)</p>
<p>Let me emphasize that we would get the same result from four regressions each with one column of P as the dependent variable and all the columns of V as the independent variables. The first three regressions would be extremely good fits, but the fourth would not be. We would, again, conclude that the fourth column of P was not exactly &#8212; or even to a fair approximation &#8212; a linear combination of the columns of V.</p>
<p><strong>Summary: theory</strong></p>
<p>Given two matrices, say P and V, which are alleged to be the same data in different coordinate systems, we may check that assertion very quickly (if both are of full rank):</p>
<p>Define</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T%27+%3D+%28P%27P%29%5E%7B-1%7D+P%27%5C+V%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T&#039; = (P&#039;P)^{-1} P&#039;\ V\ ' title='T&#039; = (P&#039;P)^{-1} P&#039;\ V\ ' class='latex' />.</p>
<p>If we find it true that</p>
<p>V&#8217; = T P&#8217;,</p>
<p>then T is a transition matrix between two bases, and P and V are indeed the same data in different coordinate systems. We&#8217;re done.</p>
<p>If, however, the equality fails, <img src='http://l.wordpress.com/latex.php?latex=V%27+%5Cne+T%5C+P%27%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='V&#039; \ne T\ P&#039;\ ' title='V&#039; \ne T\ P&#039;\ ' class='latex' />,</p>
<p>then T is not a transition matrix, and P and V are not the same data in different coordinate systems. Unless we want more information, we&#8217;re done.</p>
<p>Finally, we have seen that, numerically, we may have T &#8220;close to&#8221; a transition matrix. (In Part 1, V and Q are very nearly the same data; in the color posts, the xyx bar and rgb bar tables are very nearly the same data.)</p>
<p><strong>Summary: practice</strong></p>
<p>Computing T tells us if something is wrong, but not much more. It&#8217;s quick, easy, and gives a simple answer: &#8220;good&#8221; or &#8220;no good&#8221;.</p>
<p>Computing both projection operators P onto V and V onto P (not just one of them) would likewise tell us whether or not something is wrong, and, in addition, the projection operators might isolate the problem.</p>
<p>We could use regression instead of computing explicit projection operators.</p>
<p><strong>Summary: this example</strong></p>
<p>We found that V and Q are the same data in two different coordinate systems, but that P is not. In addition, we actually know that the problem is limited to the 4th column of P: it does not lie in the space spanned by the columns of V (i.e. it does not lie in the column space of V, which is also the column space of Q).</p>
<p><strong>Question: </strong><br />
Can someone tell me if these P, V and Q match the original paper by Yule et al.?</p>
<p>And there&#8217;s a question you might have.<br />
How many examples did I have to search through to find such a good (because it was such a bad) example?</p>
<p>One. This was the very first case I checked, outside of the 1931 CIE tables.</p>
<p>That&#8217;s scary.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rip94550.wordpress.com/2566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rip94550.wordpress.com/2566/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rip94550.wordpress.com/2566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rip94550.wordpress.com/2566/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rip94550.wordpress.com/2566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rip94550.wordpress.com/2566/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rip94550.wordpress.com/2566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rip94550.wordpress.com/2566/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rip94550.wordpress.com/2566/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rip94550.wordpress.com/2566/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&blog=2063738&post=2566&subd=rip94550&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://rip94550.wordpress.com/2009/11/29/example-is-it-a-transition-matrix-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eda25c1223d5c501eea15aab3feba8ac?s=96&#38;d=identicon" medium="image">
			<media:title type="html">rip</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/v1-on-p-in.png" medium="image">
			<media:title type="html">v1 on P in</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/v1-on-p-out.png" medium="image">
			<media:title type="html">v1 on P out</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/v2-on-p.png" medium="image">
			<media:title type="html">v2 on P</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/v3-on-p.png" medium="image">
			<media:title type="html">v3 on P</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/v4-on-p.png" medium="image">
			<media:title type="html">v4 on P</media:title>
		</media:content>
	</item>
		<item>
		<title>Example: Is it a transition matrix? Part 1</title>
		<link>http://rip94550.wordpress.com/2009/11/22/example-is-it-a-transition-matrix-part-1/</link>
		<comments>http://rip94550.wordpress.com/2009/11/22/example-is-it-a-transition-matrix-part-1/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 21:46:43 +0000</pubDate>
		<dc:creator>rip</dc:creator>
				<category><![CDATA[math linear algebra]]></category>
		<category><![CDATA[attitude and/or transition matrices]]></category>
		<category><![CDATA[Jolliffe]]></category>
		<category><![CDATA[mathematics]]></category>
		<category><![CDATA[OLS ordinary least squares regression]]></category>
		<category><![CDATA[PCA FA principal components factor analysis]]></category>
		<category><![CDATA[SVD singular value decomposition linear algebra]]></category>

		<guid isPermaLink="false">http://rip94550.wordpress.com/?p=2523</guid>
		<description><![CDATA[This example comes from PCA / FA (principal component analysis, factor analysis), namely from Jolliffe (see the bibliography). But it illustrates some very nice linear algebra.
More precisely, the source of this example is:
Yule, W., Berger, M., Butler, S., Newham, V. and Tizard, J. (1969). The WPPSL: An empirical evaluation with a British sample. Brit. J. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&blog=2063738&post=2523&subd=rip94550&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This example comes from PCA / FA (principal component analysis, factor analysis), namely from Jolliffe (see the bibliography). But it illustrates some very nice linear algebra.</p>
<p>More precisely, the source of this example is:<br />
Yule, W., Berger, M., Butler, S., Newham, V. and Tizard, J. (1969). The WPPSL: An empirical evaluation with a British sample. Brit. J. Educ. Psychol., 39, 1-13.</p>
<p>I have not been able to find the original paper. There is a problem here, and I do not know whether the problem lies in the original paper or in Jolliffe&#8217;s version of it. If anyone out there can let me know, I&#8217;d be grateful. (I will present 3 matrices, taken from Jolliffe; my question is, does the original paper contain the same 3 matrices?)</p>
<p>Like the previous post on this topic, this one is self-contained. In fact, it has almost nothing to do with PCA, and everything to do with finding &#8212; or failing to find! &#8212; a transition matrix relating two matrices.</p>
<p>On p. 163, Jolliffe provides a matrix of &#8220;principal components&#8221;: </p>
<p><img src='http://l.wordpress.com/latex.php?latex=P+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bcccc%7D+0.34+%26+-0.39+%26+0.09+%26+-0.08+%5C%5C+0.34+%26+-0.37+%26+-0.08+%26+-0.23+%5C%5C+0.35+%26+-0.1+%26+0.05+%26+0.03+%5C%5C+0.3+%26+-0.24+%26+-0.2+%26+0.63+%5C%5C+0.34+%26+-0.32+%26+0.19+%26+-0.28+%5C%5C+0.27+%26+0.24+%26+-0.57+%26+0.3+%5C%5C+0.32+%26+0.27+%26+-0.27+%26+-0.34+%5C%5C+0.3+%26+0.51+%26+0.19+%26+0.27+%5C%5C+0.23+%26+0.22+%26+0.69+%26+0.43+%5C%5C+0.36+%26+0.33+%26+-0.03+%26+0.02%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='P = \left(\begin{array}{cccc} 0.34 &amp; -0.39 &amp; 0.09 &amp; -0.08 \\ 0.34 &amp; -0.37 &amp; -0.08 &amp; -0.23 \\ 0.35 &amp; -0.1 &amp; 0.05 &amp; 0.03 \\ 0.3 &amp; -0.24 &amp; -0.2 &amp; 0.63 \\ 0.34 &amp; -0.32 &amp; 0.19 &amp; -0.28 \\ 0.27 &amp; 0.24 &amp; -0.57 &amp; 0.3 \\ 0.32 &amp; 0.27 &amp; -0.27 &amp; -0.34 \\ 0.3 &amp; 0.51 &amp; 0.19 &amp; 0.27 \\ 0.23 &amp; 0.22 &amp; 0.69 &amp; 0.43 \\ 0.36 &amp; 0.33 &amp; -0.03 &amp; 0.02\end{array}\right)' title='P = \left(\begin{array}{cccc} 0.34 &amp; -0.39 &amp; 0.09 &amp; -0.08 \\ 0.34 &amp; -0.37 &amp; -0.08 &amp; -0.23 \\ 0.35 &amp; -0.1 &amp; 0.05 &amp; 0.03 \\ 0.3 &amp; -0.24 &amp; -0.2 &amp; 0.63 \\ 0.34 &amp; -0.32 &amp; 0.19 &amp; -0.28 \\ 0.27 &amp; 0.24 &amp; -0.57 &amp; 0.3 \\ 0.32 &amp; 0.27 &amp; -0.27 &amp; -0.34 \\ 0.3 &amp; 0.51 &amp; 0.19 &amp; 0.27 \\ 0.23 &amp; 0.22 &amp; 0.69 &amp; 0.43 \\ 0.36 &amp; 0.33 &amp; -0.03 &amp; 0.02\end{array}\right)' class='latex' /></p>
<p>On the same page, he provides two matrices of the &#8220;rotated factor loadings&#8221;. One is &#8220;Varimax&#8221;&#8230;</p>
<p><img src='http://l.wordpress.com/latex.php?latex=V+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bcccc%7D+0.48+%26+0.09+%26+0.17+%26+0.14+%5C%5C+0.49+%26+0.15+%26+0.18+%26+-0.03+%5C%5C+0.35+%26+0.22+%26+0.24+%26+0.22+%5C%5C+0.26+%26+0.+%26+0.64+%26+0.2+%5C%5C+0.49+%26+0.16+%26+0.02+%26+0.15+%5C%5C+0.05+%26+0.34+%26+0.6+%26+-0.09+%5C%5C+0.2+%26+0.51+%26+0.18+%26+-0.07+%5C%5C+0.1+%26+0.54+%26+-0.02+%26+0.32+%5C%5C+0.1+%26+0.13+%26+0.07+%26+0.83+%5C%5C+0.17+%26+0.46+%26+0.28+%26+0.26%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='V = \left(\begin{array}{cccc} 0.48 &amp; 0.09 &amp; 0.17 &amp; 0.14 \\ 0.49 &amp; 0.15 &amp; 0.18 &amp; -0.03 \\ 0.35 &amp; 0.22 &amp; 0.24 &amp; 0.22 \\ 0.26 &amp; 0. &amp; 0.64 &amp; 0.2 \\ 0.49 &amp; 0.16 &amp; 0.02 &amp; 0.15 \\ 0.05 &amp; 0.34 &amp; 0.6 &amp; -0.09 \\ 0.2 &amp; 0.51 &amp; 0.18 &amp; -0.07 \\ 0.1 &amp; 0.54 &amp; -0.02 &amp; 0.32 \\ 0.1 &amp; 0.13 &amp; 0.07 &amp; 0.83 \\ 0.17 &amp; 0.46 &amp; 0.28 &amp; 0.26\end{array}\right)' title='V = \left(\begin{array}{cccc} 0.48 &amp; 0.09 &amp; 0.17 &amp; 0.14 \\ 0.49 &amp; 0.15 &amp; 0.18 &amp; -0.03 \\ 0.35 &amp; 0.22 &amp; 0.24 &amp; 0.22 \\ 0.26 &amp; 0. &amp; 0.64 &amp; 0.2 \\ 0.49 &amp; 0.16 &amp; 0.02 &amp; 0.15 \\ 0.05 &amp; 0.34 &amp; 0.6 &amp; -0.09 \\ 0.2 &amp; 0.51 &amp; 0.18 &amp; -0.07 \\ 0.1 &amp; 0.54 &amp; -0.02 &amp; 0.32 \\ 0.1 &amp; 0.13 &amp; 0.07 &amp; 0.83 \\ 0.17 &amp; 0.46 &amp; 0.28 &amp; 0.26\end{array}\right)' class='latex' /></p>
<p>&#8230; and the other is &#8220;direct quartimin&#8221;:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=Q+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bcccc%7D+0.51+%26+-0.05+%26+0.05+%26+0.05+%5C%5C+0.53+%26+0.04+%26+0.05+%26+-0.14+%5C%5C+0.32+%26+0.13+%26+0.16+%26+0.15+%5C%5C+0.17+%26+-0.19+%26+0.65+%26+0.2+%5C%5C+0.54+%26+0.06+%26+-0.13+%26+0.05+%5C%5C+-0.07+%26+0.28+%26+0.67+%26+-0.12+%5C%5C+0.16+%26+0.53+%26+0.13+%26+-0.17+%5C%5C+0.03+%26+0.62+%26+-0.09+%26+0.26+%5C%5C+0.+%26+0.09+%26+0.02+%26+0.87+%5C%5C+0.08+%26+0.45+%26+0.24+%26+0.21%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='Q = \left(\begin{array}{cccc} 0.51 &amp; -0.05 &amp; 0.05 &amp; 0.05 \\ 0.53 &amp; 0.04 &amp; 0.05 &amp; -0.14 \\ 0.32 &amp; 0.13 &amp; 0.16 &amp; 0.15 \\ 0.17 &amp; -0.19 &amp; 0.65 &amp; 0.2 \\ 0.54 &amp; 0.06 &amp; -0.13 &amp; 0.05 \\ -0.07 &amp; 0.28 &amp; 0.67 &amp; -0.12 \\ 0.16 &amp; 0.53 &amp; 0.13 &amp; -0.17 \\ 0.03 &amp; 0.62 &amp; -0.09 &amp; 0.26 \\ 0. &amp; 0.09 &amp; 0.02 &amp; 0.87 \\ 0.08 &amp; 0.45 &amp; 0.24 &amp; 0.21\end{array}\right)' title='Q = \left(\begin{array}{cccc} 0.51 &amp; -0.05 &amp; 0.05 &amp; 0.05 \\ 0.53 &amp; 0.04 &amp; 0.05 &amp; -0.14 \\ 0.32 &amp; 0.13 &amp; 0.16 &amp; 0.15 \\ 0.17 &amp; -0.19 &amp; 0.65 &amp; 0.2 \\ 0.54 &amp; 0.06 &amp; -0.13 &amp; 0.05 \\ -0.07 &amp; 0.28 &amp; 0.67 &amp; -0.12 \\ 0.16 &amp; 0.53 &amp; 0.13 &amp; -0.17 \\ 0.03 &amp; 0.62 &amp; -0.09 &amp; 0.26 \\ 0. &amp; 0.09 &amp; 0.02 &amp; 0.87 \\ 0.08 &amp; 0.45 &amp; 0.24 &amp; 0.21\end{array}\right)' class='latex' /></p>
<p>I presume &#8212; not knowing how to comute a varimax rotation! &#8212; that each of these matrices represents the same data, i.e. the same 4D subspace of R^{10} (since we have 4 column vectors of length 10 in each matrix). It would seem silly if a varimax rotation of PCs was not supposed to represent rotated PCs within the same subspace.</p>
<p>That presumption is wrong: they do not all represent the same subspaces.</p>
<p>How do I know this?</p>
<p>Because given two matrices of the same shape, I know how to find the transition matrix if it exists. <a href="http://rip94550.wordpress.com/2009/11/15/transition-matrix-to-be-or-not-to-be/">We did this here.</a></p>
<p>Let me elaborate on what I&#8217;m doing. Imagine that our matrices had 2 columns and 3 rows. Those 3D column vectors lie in a 2D subspace &#8212; a plane &#8212; in <img src='http://l.wordpress.com/latex.php?latex=R%5E3%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='R^3\ ' title='R^3\ ' class='latex' />. By doing 2D transformations within that plane, I might find a particularly nice basis for representing that data.</p>
<p>If, instead, I apply a 3D transformation, I would be moving that data into a different plane. What I am doing here is looking at 4D transformations within the 4D subspace. Everything is predicated on my belief that the PCs in P, and the varimax rotation of them in V, and the direct quartimin data in Q are all supposed to be in the same subspace.</p>
<p>Not knowing how they were supposed to be computed, I could be seriously wrong here. OTOH, since we will find that V and Q <span style="text-decoration:underline;">are the same subspace</span>, and the first 3 of the 4 columns of P <span style="text-decoration:underline;">also lie in that common subspace</span>, I really believe that the 4th column of P should too. That it does not strikes me as an error.</p>
<p>Let me make one simplification up front. Are the matrices P, V, Q of full rank (4)?</p>
<p>Yes. The Mathematica command MatrixRank says that each of those matrices is of rank 4.</p>
<p>Let us consider V and Q. If the observations in each are related by a transition matrix T, and if we arbitrarily take V to be the &#8220;old&#8221; data, then each column of V&#8217; (the transpose of V) is found by applying the transition matrix to the corresponding column of Q&#8217;.</p>
<p>V&#8217; = T Q&#8217;</p>
<p>i.e.</p>
<p>V = Q T&#8217;.</p>
<p>Then, as I showed before, I imagine briefly that I can &#8220;solve&#8221; for T&#8217;&#8230;</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T%27+%3D+Q%5E%7B-1%7D+V%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T&#039; = Q^{-1} V\ ' title='T&#039; = Q^{-1} V\ ' class='latex' />,</p>
<p>but quickly replace the non-existent inverse of Q by the appropriate pseudo-inverse</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T%27+%3D+%28Q%27Q%29%5E%7B-1%7D+Q%27%5C+V%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T&#039; = (Q&#039;Q)^{-1} Q&#039;\ V\ ' title='T&#039; = (Q&#039;Q)^{-1} Q&#039;\ V\ ' class='latex' />.</p>
<p>(It&#8217;s worth repeating that the <span style="text-decoration:underline;"> inappropriate </span>pseudo-inverse would use QQ&#8217;, but that can&#8217;t work because QQ&#8217; is 10&#215;10 but of rank 4 at most, hence not invertible.)</p>
<p>If Q&#8217;Q is invertible, that recipe always gives me a matrix T, but T need not be a transition matrix. The resulting  T is a transition matrix if and only if we actually have</p>
<p>V = Q T&#8217;,</p>
<p>(given that V and Q are of the same full rank).</p>
<p>Do we have V = Q T&#8217; ?</p>
<p>By direct computation I get</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bcccc%7D+0.9273+%26+0.0921888+%26+0.15161+%26+0.101824+%5C%5C+0.22944+%26+0.864017+%26+0.176744+%26+0.0556721+%5C%5C+0.251353+%26+0.0599739+%26+0.913081+%26+0.0549228+%5C%5C+0.185642+%26+0.11154+%26+0.00492819+%26+0.941728%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T = \left(\begin{array}{cccc} 0.9273 &amp; 0.0921888 &amp; 0.15161 &amp; 0.101824 \\ 0.22944 &amp; 0.864017 &amp; 0.176744 &amp; 0.0556721 \\ 0.251353 &amp; 0.0599739 &amp; 0.913081 &amp; 0.0549228 \\ 0.185642 &amp; 0.11154 &amp; 0.00492819 &amp; 0.941728\end{array}\right)' title='T = \left(\begin{array}{cccc} 0.9273 &amp; 0.0921888 &amp; 0.15161 &amp; 0.101824 \\ 0.22944 &amp; 0.864017 &amp; 0.176744 &amp; 0.0556721 \\ 0.251353 &amp; 0.0599739 &amp; 0.913081 &amp; 0.0549228 \\ 0.185642 &amp; 0.11154 &amp; 0.00492819 &amp; 0.941728\end{array}\right)' class='latex' /></p>
<p>and then I look at V &#8211; Q T&#8217;&#8230;. You know, it&#8217;s easy enough to put them side by side.</p>
<p><img src='http://l.wordpress.com/latex.php?latex=V+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bcccc%7D+0.48+%26+0.09+%26+0.17+%26+0.14+%5C%5C+0.49+%26+0.15+%26+0.18+%26+-0.03+%5C%5C+0.35+%26+0.22+%26+0.24+%26+0.22+%5C%5C+0.26+%26+0.+%26+0.64+%26+0.2+%5C%5C+0.49+%26+0.16+%26+0.02+%26+0.15+%5C%5C+0.05+%26+0.34+%26+0.6+%26+-0.09+%5C%5C+0.2+%26+0.51+%26+0.18+%26+-0.07+%5C%5C+0.1+%26+0.54+%26+-0.02+%26+0.32+%5C%5C+0.1+%26+0.13+%26+0.07+%26+0.83+%5C%5C+0.17+%26+0.46+%26+0.28+%26+0.26%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='V = \left(\begin{array}{cccc} 0.48 &amp; 0.09 &amp; 0.17 &amp; 0.14 \\ 0.49 &amp; 0.15 &amp; 0.18 &amp; -0.03 \\ 0.35 &amp; 0.22 &amp; 0.24 &amp; 0.22 \\ 0.26 &amp; 0. &amp; 0.64 &amp; 0.2 \\ 0.49 &amp; 0.16 &amp; 0.02 &amp; 0.15 \\ 0.05 &amp; 0.34 &amp; 0.6 &amp; -0.09 \\ 0.2 &amp; 0.51 &amp; 0.18 &amp; -0.07 \\ 0.1 &amp; 0.54 &amp; -0.02 &amp; 0.32 \\ 0.1 &amp; 0.13 &amp; 0.07 &amp; 0.83 \\ 0.17 &amp; 0.46 &amp; 0.28 &amp; 0.26\end{array}\right)' title='V = \left(\begin{array}{cccc} 0.48 &amp; 0.09 &amp; 0.17 &amp; 0.14 \\ 0.49 &amp; 0.15 &amp; 0.18 &amp; -0.03 \\ 0.35 &amp; 0.22 &amp; 0.24 &amp; 0.22 \\ 0.26 &amp; 0. &amp; 0.64 &amp; 0.2 \\ 0.49 &amp; 0.16 &amp; 0.02 &amp; 0.15 \\ 0.05 &amp; 0.34 &amp; 0.6 &amp; -0.09 \\ 0.2 &amp; 0.51 &amp; 0.18 &amp; -0.07 \\ 0.1 &amp; 0.54 &amp; -0.02 &amp; 0.32 \\ 0.1 &amp; 0.13 &amp; 0.07 &amp; 0.83 \\ 0.17 &amp; 0.46 &amp; 0.28 &amp; 0.26\end{array}\right)' class='latex' /> <img src='http://l.wordpress.com/latex.php?latex=Q%5C+T%27+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bcccc%7D+0.48+%26+0.09+%26+0.17+%26+0.14+%5C%5C+0.49+%26+0.16+%26+0.17+%26+-0.03+%5C%5C+0.35+%26+0.22+%26+0.24+%26+0.22+%5C%5C+0.26+%26+0+%26+0.64+%26+0.2+%5C%5C+0.49+%26+0.16+%26+0.02+%26+0.15+%5C%5C+0.05+%26+0.34+%26+0.6+%26+-0.09+%5C%5C+0.2+%26+0.51+%26+0.18+%26+-0.07+%5C%5C+0.1+%26+0.54+%26+-0.02+%26+0.32+%5C%5C+0.1+%26+0.13+%26+0.07+%26+0.83+%5C%5C+0.17+%26+0.46+%26+0.28+%26+0.26%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='Q\ T&#039; = \left(\begin{array}{cccc} 0.48 &amp; 0.09 &amp; 0.17 &amp; 0.14 \\ 0.49 &amp; 0.16 &amp; 0.17 &amp; -0.03 \\ 0.35 &amp; 0.22 &amp; 0.24 &amp; 0.22 \\ 0.26 &amp; 0 &amp; 0.64 &amp; 0.2 \\ 0.49 &amp; 0.16 &amp; 0.02 &amp; 0.15 \\ 0.05 &amp; 0.34 &amp; 0.6 &amp; -0.09 \\ 0.2 &amp; 0.51 &amp; 0.18 &amp; -0.07 \\ 0.1 &amp; 0.54 &amp; -0.02 &amp; 0.32 \\ 0.1 &amp; 0.13 &amp; 0.07 &amp; 0.83 \\ 0.17 &amp; 0.46 &amp; 0.28 &amp; 0.26\end{array}\right)' title='Q\ T&#039; = \left(\begin{array}{cccc} 0.48 &amp; 0.09 &amp; 0.17 &amp; 0.14 \\ 0.49 &amp; 0.16 &amp; 0.17 &amp; -0.03 \\ 0.35 &amp; 0.22 &amp; 0.24 &amp; 0.22 \\ 0.26 &amp; 0 &amp; 0.64 &amp; 0.2 \\ 0.49 &amp; 0.16 &amp; 0.02 &amp; 0.15 \\ 0.05 &amp; 0.34 &amp; 0.6 &amp; -0.09 \\ 0.2 &amp; 0.51 &amp; 0.18 &amp; -0.07 \\ 0.1 &amp; 0.54 &amp; -0.02 &amp; 0.32 \\ 0.1 &amp; 0.13 &amp; 0.07 &amp; 0.83 \\ 0.17 &amp; 0.46 &amp; 0.28 &amp; 0.26\end{array}\right)' class='latex' /></p>
<p>Even the difference of the rounded-off matrices is satisfying small. That is,<br />
<strong>Round[V,.01]-Round[Q.TT,.01]//Chop//MatrixForm</strong> is</p>
<p><img src='http://l.wordpress.com/latex.php?latex=%5Cleft%28%5Cbegin%7Barray%7D%7Bcccc%7D+0+%26+0+%26+0+%26+0+%5C%5C+0+%26+-0.01+%26+0.01+%26+0+%5C%5C+0+%26+0+%26+0+%26+0+%5C%5C+0+%26+0+%26+0+%26+0+%5C%5C+0+%26+0+%26+0+%26+0+%5C%5C+0+%26+0+%26+0+%26+0+%5C%5C+0+%26+0+%26+0+%26+0+%5C%5C+0+%26+0+%26+0+%26+0+%5C%5C+0+%26+0+%26+0+%26+0+%5C%5C+0+%26+0+%26+0+%26+0%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\left(\begin{array}{cccc} 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; -0.01 &amp; 0.01 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 0\end{array}\right)' title='\left(\begin{array}{cccc} 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; -0.01 &amp; 0.01 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 0\end{array}\right)' class='latex' /></p>
<p>Judging that the difference is negligible, I conclude that the matrices V and Q do span the same subspace of <img src='http://l.wordpress.com/latex.php?latex=R%5E%7B10%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='R^{10}\ ' title='R^{10}\ ' class='latex' />; they are the same 4D subspace with two different coordinate systems (two sets of basis vectors).</p>
<p>While we&#8217;re here, let&#8217;s do this another way. After all, <strong>the fundamental question is: can the columns of V be written as linear combinations of the columns of Q?</strong> Alternatively, can each column of Q be written as a linear combination of the columns of V?</p>
<p>Bear in mind that we have already established that Q and V are of the same full rank. In that case, the alternatives are equivalent.</p>
<p>We can answer the fundamental question by trying to regress each column of V on Q.  Just remember to tell the regression to drop the constant!</p>
<p>To be specific, here&#8217;s the first column of V as a linear combination of the 4 columns of Q. Here&#8217;s the parameter table and <img src='http://l.wordpress.com/latex.php?latex=R%5E2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='R^2' title='R^2' class='latex' /> &#8212; not the adjusted <img src='http://l.wordpress.com/latex.php?latex=R%5E2%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='R^2\ ' title='R^2\ ' class='latex' />: I really want to know how good this fit is, never mind how many variables it has. </p>
<p>Here&#8217;s a snapshot of the Mathematica commands (version 7). (Oh, darn. The last option in the LinearModelFit command, which replaced &#8220;Regress&#8221; is &#8220;IncludeConstant-&gt;False&#8221;. And I print the names just to confirm that none of those symbols has a left-over numerical value!)</p>
<p><a href="http://rip94550.files.wordpress.com/2009/11/v1-on-q-in.png"><img src="http://rip94550.files.wordpress.com/2009/11/v1-on-q-in.png?w=852&#038;h=377" alt="" title="v1 on Q in" width="852" height="377" class="alignnone size-full wp-image-2555" /></a></p>
<p>(Let me just remind you that the <img src='http://l.wordpress.com/latex.php?latex=R%5E2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='R^2' title='R^2' class='latex' /> is a measure of a how close the fit is. When we add another independent variable, however, the <img src='http://l.wordpress.com/latex.php?latex=R%5E2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='R^2' title='R^2' class='latex' /> cannot decrease; it is not a good measure of the value &#8212; i.e. the worth &#8212; of that latest independent variable. The adjusted <img src='http://l.wordpress.com/latex.php?latex=R%5E2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='R^2' title='R^2' class='latex' /> can decrease; in fact, in my experience, if the t-statistic of that latest variable is greater than 1 (in magnitude), then the adjusted <img src='http://l.wordpress.com/latex.php?latex=R%5E2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='R^2' title='R^2' class='latex' /> goes up. As I said, in this case, I really want the <img src='http://l.wordpress.com/latex.php?latex=R%5E2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='R^2' title='R^2' class='latex' /> rather than adjusted <img src='http://l.wordpress.com/latex.php?latex=R%5E2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='R^2' title='R^2' class='latex' /> because I know exactly how many independent variables I am supposed to use. That said, there isn&#8217;t a whole lot of difference between the two in this case.)</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/v1-on-q.png?w=518&#038;h=126" alt="v1 on Q" title="v1 on Q" width="518" height="126" class="alignnone size-full wp-image-2524" /></p>
<p>That&#8217;s a really good fit. And it should be. And that column of <img src='http://l.wordpress.com/latex.php?latex=%5Cbeta%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\beta\ ' title='\beta\ ' class='latex' />, i.e. &#8220;Estimate&#8221;? It&#8217;s the first column of T&#8217;, i.e. the first row of T:</p>
<p>{0.9273, 0.0921888, 0.15161, 0.101824}</p>
<p>We could run 3 more regressions, but they&#8217;d only confirm what we believe: T&#8217; could, in fact, be computed as regression coefficients. If the two subspaces coincide, then T is also a transition matrix between two bases in one and the same space.</p>
<p>There is yet another way to look at that. We know that in regression, yhat is the projection of y onto the subspace spanned by the columns of X. If y itself is in that subspace, then yhat = y, and the relatonship is given by a transition matrix.</p>
<p>So we could do this a third way. We know how to compute a projection operator onto the subspace spanned by the columns of X. In this case, X is Q, so we find its SVD (Singular Value Decomposition)&#8230;</p>
<p><img src='http://l.wordpress.com/latex.php?latex=Q+%3D+u%5C+w%5C+v%5ET&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='Q = u\ w\ v^T' title='Q = u\ w\ v^T' class='latex' /></p>
<p>Then the 4 leftmost columns (u1) of u are an orthonormal basis for the range of Q&#8230;.</p>
<p><img src='http://l.wordpress.com/latex.php?latex=u1+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bcccc%7D+-0.203473+%26+0.27677+%26+0.353491+%26+0.188167+%5C%5C+-0.188235+%26+0.423093+%26+0.310857+%26+0.0177813+%5C%5C+-0.30583+%26+0.10025+%26+0.140569+%26+0.094808+%5C%5C+-0.313324+%26+0.177504+%26+-0.285416+%26+0.609666+%5C%5C+-0.194156+%26+0.220796+%26+0.497051+%26+0.0101643+%5C%5C+-0.354903+%26+0.228756+%26+-0.604256+%26+-0.00173818+%5C%5C+-0.320761+%26+0.191153+%26+-0.0758258+%26+-0.463325+%5C%5C+-0.379019+%26+-0.300366+%26+0.0912622+%26+-0.459411+%5C%5C+-0.365508+%26+-0.681435+%26+0.196437+%26+0.360653+%5C%5C+-0.43321+%26+-0.103153+%26+-0.111086+%26+-0.166404%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='u1 = \left(\begin{array}{cccc} -0.203473 &amp; 0.27677 &amp; 0.353491 &amp; 0.188167 \\ -0.188235 &amp; 0.423093 &amp; 0.310857 &amp; 0.0177813 \\ -0.30583 &amp; 0.10025 &amp; 0.140569 &amp; 0.094808 \\ -0.313324 &amp; 0.177504 &amp; -0.285416 &amp; 0.609666 \\ -0.194156 &amp; 0.220796 &amp; 0.497051 &amp; 0.0101643 \\ -0.354903 &amp; 0.228756 &amp; -0.604256 &amp; -0.00173818 \\ -0.320761 &amp; 0.191153 &amp; -0.0758258 &amp; -0.463325 \\ -0.379019 &amp; -0.300366 &amp; 0.0912622 &amp; -0.459411 \\ -0.365508 &amp; -0.681435 &amp; 0.196437 &amp; 0.360653 \\ -0.43321 &amp; -0.103153 &amp; -0.111086 &amp; -0.166404\end{array}\right)' title='u1 = \left(\begin{array}{cccc} -0.203473 &amp; 0.27677 &amp; 0.353491 &amp; 0.188167 \\ -0.188235 &amp; 0.423093 &amp; 0.310857 &amp; 0.0177813 \\ -0.30583 &amp; 0.10025 &amp; 0.140569 &amp; 0.094808 \\ -0.313324 &amp; 0.177504 &amp; -0.285416 &amp; 0.609666 \\ -0.194156 &amp; 0.220796 &amp; 0.497051 &amp; 0.0101643 \\ -0.354903 &amp; 0.228756 &amp; -0.604256 &amp; -0.00173818 \\ -0.320761 &amp; 0.191153 &amp; -0.0758258 &amp; -0.463325 \\ -0.379019 &amp; -0.300366 &amp; 0.0912622 &amp; -0.459411 \\ -0.365508 &amp; -0.681435 &amp; 0.196437 &amp; 0.360653 \\ -0.43321 &amp; -0.103153 &amp; -0.111086 &amp; -0.166404\end{array}\right)' class='latex' /></p>
<p>That is, u1&#8242; u1 = I, if the column space of X is of full rank. Check it:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=u1%5ET+u1+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bcccc%7D+1.+%26+0+%26+0+%26+0+%5C%5C+0+%26+1.+%26+0+%26+0+%5C%5C+0+%26+0+%26+1.+%26+0+%5C%5C+0+%26+0+%26+0+%26+1.%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='u1^T u1 = \left(\begin{array}{cccc} 1. &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 1. &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 1. &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 1.\end{array}\right)' title='u1^T u1 = \left(\begin{array}{cccc} 1. &amp; 0 &amp; 0 &amp; 0 \\ 0 &amp; 1. &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 1. &amp; 0 \\ 0 &amp; 0 &amp; 0 &amp; 1.\end{array}\right)' class='latex' /></p>
<p>Bur the reversed matrix product </p>
<p>R = u1 u1&#8242; </p>
<p>gives us a projection operator R onto the range of Q:</p>
<p>We can check it. (I won&#8217;t print it: it&#8217;s 10&#215;10.) One, R is a projection operator if and only if it is idempotent, i.e. R R = R. And by computation, I see that is true.</p>
<p>Two, applied to each column of Q, it reproduces that column of Q; i.e. applied to Q as a whole, it reproduces Q, i.e. R Q = Q. Again, computation shows that is true, too.</p>
<p>Having checked that R is a projection onto the column space of Q, let&#8217;s use it: apply it to V. If V lies in the subspace spanned by the columns of Q, then R V will reproduce V&#8230;.</p>
<p>I find that the largest difference between the elements of R V and V is 0.00720726 .</p>
<p>That&#8217;s as close as the other two calculations. Not exactly zero, but then, our regression didn&#8217;t fit exactly: like the RGB and XYZ tables <a href="http://rip94550.wordpress.com/2009/11/15/transition-matrix-to-be-or-not-to-be/">in the earlier post</a>, V and Q are almost but not exactly related by a transition matrix.</p>
<p>So we have seen three ways of looking at this. All three tell the same story: the column spaces of V and Q are the same.</p>
<p>Let me say a little more about two of them, the projection operator and the explicit regression.</p>
<p>The projection operator R came from the SVD. The regression can also be written using a projection operator, namely the hat matrix H. I keep getting mixed up about the relationship between T and R and H, so let me write it out.</p>
<p>The normal equations for</p>
<p><img src='http://l.wordpress.com/latex.php?latex=%5Chat%7By%7D+%3D+X%5C+%5Cbeta&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\hat{y} = X\ \beta' title='\hat{y} = X\ \beta' class='latex' /></p>
<p>are</p>
<p><img src='http://l.wordpress.com/latex.php?latex=%5Cbeta+%3D+%28X%27X%29%5E%7B-1%7D%5C+X%27%5C+y%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\beta = (X&#039;X)^{-1}\ X&#039;\ y\ ' title='\beta = (X&#039;X)^{-1}\ X&#039;\ y\ ' class='latex' />.</p>
<p>(I showed you a quick and dirty way to recover that equation in the earlier post.)</p>
<p>Then</p>
<p><img src='http://l.wordpress.com/latex.php?latex=%5Chat%7By%7D+%3D+X%5C+%5Cbeta+%3D+X%5C+%28X%27X%29%5E%7B-1%7D%5C+X%27%5C+y&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\hat{y} = X\ \beta = X\ (X&#039;X)^{-1}\ X&#039;\ y' title='\hat{y} = X\ \beta = X\ (X&#039;X)^{-1}\ X&#039;\ y' class='latex' /></p>
<p>and so we may write</p>
<p>yhat = H y</p>
<p>with the hat matrix H defined as</p>
<p><img src='http://l.wordpress.com/latex.php?latex=H+%3D+X%5C+%28X%27X%29%5E%7B-1%7D%5C+X%27%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='H = X\ (X&#039;X)^{-1}\ X&#039;\ ' title='H = X\ (X&#039;X)^{-1}\ X&#039;\ ' class='latex' />.</p>
<p>For our regression, we took y to be the first column of V, and X to be the four colums of Q, so our hat matrix would be</p>
<p><img src='http://l.wordpress.com/latex.php?latex=H+%3D+Q%5C+%28Q%27Q%29%5E%7B-1%7D%5C+Q%27%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='H = Q\ (Q&#039;Q)^{-1}\ Q&#039;\ ' title='H = Q\ (Q&#039;Q)^{-1}\ Q&#039;\ ' class='latex' />.</p>
<p>It is a projection operator onto the range of Q. But that&#8217;s exactly what R was. Go ahead and check: you will find that</p>
<p>H = R.</p>
<p>This means that we could compute R as the hat matrix, instead of using the SVD. Personally, I know how to use the SVD, whereas I would have to work out the definition of the hat matrix every time. But that&#8217;s a preference; you may choose to compute the hat matrix instead. (And that is how Malinowski was doing it!)</p>
<p>Going a little further, T&#8217; was</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T%27+%3D+%28Q%27Q%29%5E%7B-1%7D%5C+Q%27%5C+V&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T&#039; = (Q&#039;Q)^{-1}\ Q&#039;\ V' title='T&#039; = (Q&#039;Q)^{-1}\ Q&#039;\ V' class='latex' /> </p>
<p>so we have</p>
<p>Q T&#8217; = H V.</p>
<p>We&#8217;ll look at the relationship between P and V in Part 2.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rip94550.wordpress.com/2523/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rip94550.wordpress.com/2523/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rip94550.wordpress.com/2523/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rip94550.wordpress.com/2523/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rip94550.wordpress.com/2523/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rip94550.wordpress.com/2523/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rip94550.wordpress.com/2523/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rip94550.wordpress.com/2523/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rip94550.wordpress.com/2523/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rip94550.wordpress.com/2523/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&blog=2063738&post=2523&subd=rip94550&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://rip94550.wordpress.com/2009/11/22/example-is-it-a-transition-matrix-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eda25c1223d5c501eea15aab3feba8ac?s=96&#38;d=identicon" medium="image">
			<media:title type="html">rip</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/v1-on-q-in.png" medium="image">
			<media:title type="html">v1 on Q in</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/v1-on-q.png" medium="image">
			<media:title type="html">v1 on Q</media:title>
		</media:content>
	</item>
		<item>
		<title>Books Added: Color 3</title>
		<link>http://rip94550.wordpress.com/2009/11/18/books-added-color-3/</link>
		<comments>http://rip94550.wordpress.com/2009/11/18/books-added-color-3/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 01:49:54 +0000</pubDate>
		<dc:creator>rip</dc:creator>
				<category><![CDATA[books added]]></category>
		<category><![CDATA[color]]></category>

		<guid isPermaLink="false">http://rip94550.wordpress.com/?p=2215</guid>
		<description><![CDATA[discussion
Having picked up color again, there are three books I want to add to the bibliography.
One of them is a book I have mentioned in this post.  &#8220;Color Harmony In Your Paintings&#8221; by Margaret Kessler. This, like Wilcox and like Quiller, is another book for artists about choosing and mixing pigments, and about choosing [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&blog=2063738&post=2215&subd=rip94550&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h2>discussion</h2>
<p>Having picked up color again, there are three books I want to add to the bibliography.</p>
<p>One of them is <a href="http://rip94550.wordpress.com/2009/03/08/color-odds-ends/">a book I have mentioned in this post</a>.  &#8220;Color Harmony In Your Paintings&#8221; by Margaret <strong>Kessler</strong>. This, like <strong>Wilcox</strong> and like <strong>Quiller</strong>, is another book for artists about choosing and mixing pigments, and about choosing appropriate colors when painting. I like what she has to say about such choices, I like her paintings, and I especially like the fact that she mixes other colors from a palette of only 15. She also discusses the Munsell color wheel.</p>
<p>The second book is a thin one which I had forgotten I bought, and didn&#8217;t see when I was picking things off the shelf. &#8220;Color Vision and Colorimetry, Theory and Applications&#8221; by Daniel <strong>Malacara</strong>. It is a monograph (i.e. it has no exercises), with more detail than <strong>Fortner &amp; Meyer</strong>, but still an introductory book. I won&#8217;t forget this book again.</p>
<p>I have discovered that the reference <strong>Wyszecki &amp; Stiles</strong>&#8216; &#8220;Color Science&#8221; is overwhelming in its detail; <strong>Malacara</strong> is a good place to look first, and then confirm in <strong>Wyszecki &amp; Stiles</strong>. (I must confess that I am bothered by some of the mathematics in both of these books, but I was glad to see that <strong>Malacara</strong> was consistent with the reference even though I think both are misguided.)</p>
<p>Having done more work – in particular, having gotten tables of color matching functions – I am forced to say that there are two tables in <strong>Malacara</strong> which can be checked easily, and both are wrong. Admittedly, one has only a single typo, but the other has a section where negative signs are missng from some values. Nevertheless, I used Malacara to check the graphs I got of the data in Wyszecki &amp; Stiles; and for the derivation of the XYZ coordinate system from RGB tri-stimulus values.</p>
<p>He&#8217;s still a very good read, but don&#8217;t buy Malacara for his tables. Get them from <strong>Wyszecki &amp; Stiles</strong>.</p>
<p>The third book is actually a two-volume set: &#8220;Principles of Digital Image Sysnthesis&#8221; by Andrew S. <strong>Glassner</strong>. These two volumes are an overview of a whole lot of material, ranging from the structure of the human eye to an introduction to Fourier analysis. <a href="http://glassner.com/andrew/index.htm">For more info, go to his website</a> .</p>
<p>I have to say, however, that I found one mistake in one of the sections I read carefully, namely &#8220;wavelet transforms&#8221;. OK, so he was wide-ranging and didn&#8217;t get all the details right. For all I know, this could be the only mistake in the book.</p>
<p>I suppose I can&#8217;t leave you in the dark. He says that the hat functions and two others generate &#8220;the Schauder basis&#8221;. No: <span style="text-decoration:underline;">a</span> Schauder basis; they&#8217;re not unique. Every basis whose existence is asserted in our multi-resolution analysis theorem is actually a Schauder basis. I&#8217;m also not sure that he needs the other two functions &#8212; but he could: the hat functions do not satisfy the hypotheses of our theorem. </p>
<p>Although I expect to read more in this set, what I&#8217;m using it for now for is appendix G at the end of the second volume. The beginning says, &#8220;You may also repost or redistribute the information in this appendix freely.&#8221; Much of the information in Appendix G is contained in Wysecki &amp; Stiles &#8212; but G.5 has spectra and (x,y) coordinates for the Macbeth color checker&#8230; G.6 has spectra for real objects such as flowers, blue jeans, and even pancakes. (Someone clearly went wild with a piece of equipment.)</p>
<p>Unfortunately, that data is no longer available at the listed website. <a href="ftp://ftp.eos.ncsu.edu/pub/eos/pub/spectra/">Similar data, especially for Munsell color chips, is available here</a> .</p>
<h2>the books added</h2>
<p>Glassner, Andrew S.;<b>Principles of Digital Image Synthesis</b>. Morgan Kaufmann Publishers, 1995 (two volumes).<br />
ISBN 1 55860 276 3.<br />
[color theory, computer graphics; 18 Nov 2009]<br />
&#8220;My purpose here is to discuss the underlying principles – the ideas that have slowly emerged as the core of our discipline. There are three such basic fields: human vision, signal processing, and physics.&#8221;</p>
<p>Kessler, Margaret; <b>Color harmony in Your Paintings</b>. North Light Books, 2004.<br />
ISBN 1 58180 401 6.<br />
[art, color combinations; 18 Nov 2009]<br />
Choosing a palette, mixing other colors, and selecting color combinations for art.</p>
<p>Malacara, Daniel;<b>Color Vision and Colorimetry, Theory and applications</b>. SPIE Press, 2002.<br />
ISBN 0 8194 4228 3.<br />
[color theory; 18 Nov 2009]<br />
This is a marvelous introduction to the rather overwhelming Wyszecki &amp; Stiles.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rip94550.wordpress.com/2215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rip94550.wordpress.com/2215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rip94550.wordpress.com/2215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rip94550.wordpress.com/2215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rip94550.wordpress.com/2215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rip94550.wordpress.com/2215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rip94550.wordpress.com/2215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rip94550.wordpress.com/2215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rip94550.wordpress.com/2215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rip94550.wordpress.com/2215/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&blog=2063738&post=2215&subd=rip94550&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://rip94550.wordpress.com/2009/11/18/books-added-color-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eda25c1223d5c501eea15aab3feba8ac?s=96&#38;d=identicon" medium="image">
			<media:title type="html">rip</media:title>
		</media:content>
	</item>
		<item>
		<title>Transition matrix: to be or not to be</title>
		<link>http://rip94550.wordpress.com/2009/11/15/transition-matrix-to-be-or-not-to-be/</link>
		<comments>http://rip94550.wordpress.com/2009/11/15/transition-matrix-to-be-or-not-to-be/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 22:54:09 +0000</pubDate>
		<dc:creator>rip</dc:creator>
				<category><![CDATA[color]]></category>
		<category><![CDATA[math linear algebra]]></category>
		<category><![CDATA[attitude and/or transition matrices]]></category>
		<category><![CDATA[Cohen]]></category>
		<category><![CDATA[coordinate transformations]]></category>
		<category><![CDATA[linear algebra]]></category>

		<guid isPermaLink="false">http://rip94550.wordpress.com/?p=2491</guid>
		<description><![CDATA[Cohen (&#8220;Visual Color &#38; Color Mixture&#8221;, see the bibliography) did something very interesting. In fact, he did something useful which I had never seen before.
Although this post uses some matrices which we saw in the color posts, I think this can stand on its own: you need not have read the color posts. But if [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&blog=2063738&post=2491&subd=rip94550&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong>Cohen</strong> (&#8220;Visual Color &amp; Color Mixture&#8221;, see the bibliography) did something very interesting. In fact, he did something useful which I had never seen before.</p>
<p>Although this post uses some matrices which we saw in the color posts, I think this can stand on its own: you need not have read the color posts. But if you are specifically interested in color, or in Cohen&#8217;s work, this post is very relevant.</p>
<p><strong>He was trying to describe how to find a transition matrix between two given data matrices.</strong> This will come in handy &#8212; very handy! &#8212; whenever people give the alleged result of an unspecified linear transformation of a data matrix.</p>
<p>On p. 93, he wrote</p>
<p>D T = C in general</p>
<p>F T = A in particular</p>
<p>with</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T+%3D+%28D%27D%29%5E%7B-1%7D+D%27%5C+C%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T = (D&#039;D)^{-1} D&#039;\ C\ ' title='T = (D&#039;D)^{-1} D&#039;\ C\ ' class='latex' />.</p>
<p>Because D&#8217;D (that is, <img src='http://l.wordpress.com/latex.php?latex=D%5ET%5C+D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='D^T\ D\ ' title='D^T\ D\ ' class='latex' />) is invertible, we infer that D and C are taller than wide, like the A matrix&#8230; like our usual data or design matrix X.</p>
<p>We also infer that T is a small matrix: its size is cxc, where c is the number of columns of D. D and C are the same size.</p>
<p>I do have to point out that in his equation (and his notation)</p>
<p>D T = C,</p>
<p>T is an attitude matrix! I will change that. (Trust me: you want me to change that.)</p>
<p>Since we have both XYZ (i.e. 1931 xyz bar) and RGB (1931 rgb bar) tables, and since they are supposed to be related by the transformation matrix T31&#8230;</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T31+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+2.76888+%26+1.75175+%26+1.13016+%5C%5C+1+%26+4.5907+%26+0.0601+%5C%5C+0+%26+0.05651+%26+5.59427%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T31 = \left(\begin{array}{ccc} 2.76888 &amp; 1.75175 &amp; 1.13016 \\ 1 &amp; 4.5907 &amp; 0.0601 \\ 0 &amp; 0.05651 &amp; 5.59427\end{array}\right)' title='T31 = \left(\begin{array}{ccc} 2.76888 &amp; 1.75175 &amp; 1.13016 \\ 1 &amp; 4.5907 &amp; 0.0601 \\ 0 &amp; 0.05651 &amp; 5.59427\end{array}\right)' class='latex' /></p>
<p>&#8230; we should try the idea embodied in that equation for T. Assuming that there is a transition matrix T, let J and K stand for the XYZ and RGB matrices respectively.</p>
<p>As usual, let me use 20 nm intervals instead of the published 5 nm intervals. We have</p>
<p><img src='http://l.wordpress.com/latex.php?latex=J+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+0.00003+%26+-0.00001+%26+0.00117+%5C%5C+0.0003+%26+-0.00014+%26+0.01214+%5C%5C+0.00211+%26+-0.0011+%26+0.11541+%5C%5C+-0.00261+%26+0.00149+%26+0.31228+%5C%5C+-0.02608+%26+0.01485+%26+0.29821+%5C%5C+-0.04939+%26+0.03914+%26+0.14494+%5C%5C+-0.07173+%26+0.08536+%26+0.04776+%5C%5C+-0.09264+%26+0.17468+%26+0.01221+%5C%5C+-0.03152+%26+0.21466+%26+0.00146+%5C%5C+0.0906+%26+0.19702+%26+-0.0013+%5C%5C+0.24526+%26+0.1361+%26+-0.00108+%5C%5C+0.34429+%26+0.06246+%26+-0.00049+%5C%5C+0.29708+%26+0.01828+%26+-0.00015+%5C%5C+0.15968+%26+0.00334+%26+-0.00003+%5C%5C+0.05932+%26+0.00037+%26+0+%5C%5C+0.01687+%26+0.00003+%26+0+%5C%5C+0.0041+%26+0+%26+0+%5C%5C+0.00105+%26+0+%26+0+%5C%5C+0.00025+%26+0+%26+0+%5C%5C+0.00006+%26+0+%26+0+%5C%5C+0+%26+0+%26+0%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='J = \left(\begin{array}{ccc} 0.00003 &amp; -0.00001 &amp; 0.00117 \\ 0.0003 &amp; -0.00014 &amp; 0.01214 \\ 0.00211 &amp; -0.0011 &amp; 0.11541 \\ -0.00261 &amp; 0.00149 &amp; 0.31228 \\ -0.02608 &amp; 0.01485 &amp; 0.29821 \\ -0.04939 &amp; 0.03914 &amp; 0.14494 \\ -0.07173 &amp; 0.08536 &amp; 0.04776 \\ -0.09264 &amp; 0.17468 &amp; 0.01221 \\ -0.03152 &amp; 0.21466 &amp; 0.00146 \\ 0.0906 &amp; 0.19702 &amp; -0.0013 \\ 0.24526 &amp; 0.1361 &amp; -0.00108 \\ 0.34429 &amp; 0.06246 &amp; -0.00049 \\ 0.29708 &amp; 0.01828 &amp; -0.00015 \\ 0.15968 &amp; 0.00334 &amp; -0.00003 \\ 0.05932 &amp; 0.00037 &amp; 0 \\ 0.01687 &amp; 0.00003 &amp; 0 \\ 0.0041 &amp; 0 &amp; 0 \\ 0.00105 &amp; 0 &amp; 0 \\ 0.00025 &amp; 0 &amp; 0 \\ 0.00006 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0\end{array}\right)' title='J = \left(\begin{array}{ccc} 0.00003 &amp; -0.00001 &amp; 0.00117 \\ 0.0003 &amp; -0.00014 &amp; 0.01214 \\ 0.00211 &amp; -0.0011 &amp; 0.11541 \\ -0.00261 &amp; 0.00149 &amp; 0.31228 \\ -0.02608 &amp; 0.01485 &amp; 0.29821 \\ -0.04939 &amp; 0.03914 &amp; 0.14494 \\ -0.07173 &amp; 0.08536 &amp; 0.04776 \\ -0.09264 &amp; 0.17468 &amp; 0.01221 \\ -0.03152 &amp; 0.21466 &amp; 0.00146 \\ 0.0906 &amp; 0.19702 &amp; -0.0013 \\ 0.24526 &amp; 0.1361 &amp; -0.00108 \\ 0.34429 &amp; 0.06246 &amp; -0.00049 \\ 0.29708 &amp; 0.01828 &amp; -0.00015 \\ 0.15968 &amp; 0.00334 &amp; -0.00003 \\ 0.05932 &amp; 0.00037 &amp; 0 \\ 0.01687 &amp; 0.00003 &amp; 0 \\ 0.0041 &amp; 0 &amp; 0 \\ 0.00105 &amp; 0 &amp; 0 \\ 0.00025 &amp; 0 &amp; 0 \\ 0.00006 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0\end{array}\right)' class='latex' /></p>
<p><img src='http://l.wordpress.com/latex.php?latex=K+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+0.0014+%26+0.+%26+0.0065+%5C%5C+0.0143+%26+0.0004+%26+0.0679+%5C%5C+0.1344+%26+0.004+%26+0.6456+%5C%5C+0.3483+%26+0.023+%26+1.7471+%5C%5C+0.2908+%26+0.06+%26+1.6692+%5C%5C+0.0956+%26+0.139+%26+0.813+%5C%5C+0.0049+%26+0.323+%26+0.272+%5C%5C+0.0633+%26+0.71+%26+0.0782+%5C%5C+0.2904+%26+0.954+%26+0.0203+%5C%5C+0.5945+%26+0.995+%26+0.0039+%5C%5C+0.9163+%26+0.87+%26+0.0017+%5C%5C+1.0622+%26+0.631+%26+0.0008+%5C%5C+0.8544+%26+0.381+%26+0.0002+%5C%5C+0.4479+%26+0.175+%26+0.+%5C%5C+0.1649+%26+0.061+%26+0.+%5C%5C+0.0468+%26+0.017+%26+0.+%5C%5C+0.0114+%26+0.0041+%26+0.+%5C%5C+0.0029+%26+0.001+%26+0.+%5C%5C+0.0007+%26+0.0003+%26+0.+%5C%5C+0.0002+%26+0.0001+%26+0.+%5C%5C+0.+%26+0.+%26+0.%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='K = \left(\begin{array}{ccc} 0.0014 &amp; 0. &amp; 0.0065 \\ 0.0143 &amp; 0.0004 &amp; 0.0679 \\ 0.1344 &amp; 0.004 &amp; 0.6456 \\ 0.3483 &amp; 0.023 &amp; 1.7471 \\ 0.2908 &amp; 0.06 &amp; 1.6692 \\ 0.0956 &amp; 0.139 &amp; 0.813 \\ 0.0049 &amp; 0.323 &amp; 0.272 \\ 0.0633 &amp; 0.71 &amp; 0.0782 \\ 0.2904 &amp; 0.954 &amp; 0.0203 \\ 0.5945 &amp; 0.995 &amp; 0.0039 \\ 0.9163 &amp; 0.87 &amp; 0.0017 \\ 1.0622 &amp; 0.631 &amp; 0.0008 \\ 0.8544 &amp; 0.381 &amp; 0.0002 \\ 0.4479 &amp; 0.175 &amp; 0. \\ 0.1649 &amp; 0.061 &amp; 0. \\ 0.0468 &amp; 0.017 &amp; 0. \\ 0.0114 &amp; 0.0041 &amp; 0. \\ 0.0029 &amp; 0.001 &amp; 0. \\ 0.0007 &amp; 0.0003 &amp; 0. \\ 0.0002 &amp; 0.0001 &amp; 0. \\ 0. &amp; 0. &amp; 0.\end{array}\right)' title='K = \left(\begin{array}{ccc} 0.0014 &amp; 0. &amp; 0.0065 \\ 0.0143 &amp; 0.0004 &amp; 0.0679 \\ 0.1344 &amp; 0.004 &amp; 0.6456 \\ 0.3483 &amp; 0.023 &amp; 1.7471 \\ 0.2908 &amp; 0.06 &amp; 1.6692 \\ 0.0956 &amp; 0.139 &amp; 0.813 \\ 0.0049 &amp; 0.323 &amp; 0.272 \\ 0.0633 &amp; 0.71 &amp; 0.0782 \\ 0.2904 &amp; 0.954 &amp; 0.0203 \\ 0.5945 &amp; 0.995 &amp; 0.0039 \\ 0.9163 &amp; 0.87 &amp; 0.0017 \\ 1.0622 &amp; 0.631 &amp; 0.0008 \\ 0.8544 &amp; 0.381 &amp; 0.0002 \\ 0.4479 &amp; 0.175 &amp; 0. \\ 0.1649 &amp; 0.061 &amp; 0. \\ 0.0468 &amp; 0.017 &amp; 0. \\ 0.0114 &amp; 0.0041 &amp; 0. \\ 0.0029 &amp; 0.001 &amp; 0. \\ 0.0007 &amp; 0.0003 &amp; 0. \\ 0.0002 &amp; 0.0001 &amp; 0. \\ 0. &amp; 0. &amp; 0.\end{array}\right)' class='latex' /></p>
<p>In case you have not read the color posts, all I am saying is that J and K and T31 are given matrices, and T31 is supposed to be a transition matrix between J and K.</p>
<p>We do know &#8212; or take it as given &#8212; that for the transition matrix T31, old is XYZ ~ K, so let me write</p>
<p>K&#8217; = T J&#8217;		</p>
<p>That says T is a transition matrix which, applied to each column vector of J&#8217;, delivers the corresponding column of K&#8217;.</p>
<p>Transpose:</p>
<p>K = J T&#8217;</p>
<p>and then pretend  <img src='http://l.wordpress.com/latex.php?latex=J%5E%7B-1%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='J^{-1}' title='J^{-1}' class='latex' /> exists (even though J is rectangular)</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T%27+%09%3D+J%5E%7B-1%7D+K+%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T&#039; 	= J^{-1} K \ ' title='T&#039; 	= J^{-1} K \ ' class='latex' /></p>
<p>and then substitute the appropriate pseudo-inverse:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T%27+%3D+%28J%27J%29%5E%7B-1%7D+J%27%5C+K%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T&#039; = (J&#039;J)^{-1} J&#039;\ K\ ' title='T&#039; = (J&#039;J)^{-1} J&#039;\ K\ ' class='latex' />.</p>
<p>(The <span style="text-decoration:underline;">inappropriate</span> pseudo-inverse would use JJ&#8217; instead &#8212; which cannot be of full rank, given the assumed shape of J, hence  cannot be invertible.)</p>
<p>That equation defined the transpose T&#8217;, but here&#8217;s T:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+2.76887+%26+1.75176+%26+1.13013+%5C%5C+1.00002+%26+4.59072+%26+0.06008+%5C%5C+0.00004+%26+0.05661+%26+5.59443%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T = \left(\begin{array}{ccc} 2.76887 &amp; 1.75176 &amp; 1.13013 \\ 1.00002 &amp; 4.59072 &amp; 0.06008 \\ 0.00004 &amp; 0.05661 &amp; 5.59443\end{array}\right)' title='T = \left(\begin{array}{ccc} 2.76887 &amp; 1.75176 &amp; 1.13013 \\ 1.00002 &amp; 4.59072 &amp; 0.06008 \\ 0.00004 &amp; 0.05661 &amp; 5.59443\end{array}\right)' class='latex' /></p>
<p>Recall the given T31:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T31+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+2.76888+%26+1.75175+%26+1.13016+%5C%5C+1+%26+4.5907+%26+0.0601+%5C%5C+0+%26+0.05651+%26+5.59427%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T31 = \left(\begin{array}{ccc} 2.76888 &amp; 1.75175 &amp; 1.13016 \\ 1 &amp; 4.5907 &amp; 0.0601 \\ 0 &amp; 0.05651 &amp; 5.59427\end{array}\right)' title='T31 = \left(\begin{array}{ccc} 2.76888 &amp; 1.75175 &amp; 1.13016 \\ 1 &amp; 4.5907 &amp; 0.0601 \\ 0 &amp; 0.05651 &amp; 5.59427\end{array}\right)' class='latex' /></p>
<p>By doing it my way, I constructed the counterpart to T31, which is the published transition matrix between XYZ and RGB (1931) with XYZ considered the &#8220;old&#8221; basis.</p>
<p>T and T31 are very close, but not the same.</p>
<p>Even if I used the full tables, at 5 nm intervals, we would not get T31.</p>
<p>First, I am certain that if there were a transition matrix T, then we must have computed it. Since this computation did not yield T31, I infer that T31 is not the transition matrix.</p>
<p>Second, is T the transition matrix? We should apply T to the appropriate table and see what we get. We had assumed</p>
<p>K&#8217; = T J&#8217;, or equivalently</p>
<p>K = J T&#8217;</p>
<p>so let&#8217;s compute a counterpart to K, namely Q = J T&#8217;:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=Q+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+0.00139+%26+0.00005+%26+0.00654+%5C%5C+0.01431+%26+0.00039+%26+0.06791+%5C%5C+0.13434+%26+0.00399+%26+0.64559+%5C%5C+0.3483+%26+0.02299+%26+1.74711+%5C%5C+0.29082+%26+0.06001+%26+1.66915+%5C%5C+0.09561+%26+0.139+%26+0.81307+%5C%5C+0.00489+%26+0.323+%26+0.27202+%5C%5C+0.06329+%26+0.71+%26+0.07819+%5C%5C+0.29041+%26+0.95401+%26+0.02032+%5C%5C+0.59452+%26+0.99499+%26+0.00388+%5C%5C+0.91629+%26+0.87+%26+0.00167+%5C%5C+1.06216+%26+0.631+%26+0.00081+%5C%5C+0.85443+%26+0.38099+%26+0.00021+%5C%5C+0.44795+%26+0.17501+%26+0.00003+%5C%5C+0.1649+%26+0.06102+%26+0.00002+%5C%5C+0.04676+%26+0.01701+%26+0+%5C%5C+0.01135+%26+0.0041+%26+0+%5C%5C+0.00291+%26+0.00105+%26+0+%5C%5C+0.00069+%26+0.00025+%26+0+%5C%5C+0.00017+%26+0.00006+%26+0+%5C%5C+0+%26+0+%26+0%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='Q = \left(\begin{array}{ccc} 0.00139 &amp; 0.00005 &amp; 0.00654 \\ 0.01431 &amp; 0.00039 &amp; 0.06791 \\ 0.13434 &amp; 0.00399 &amp; 0.64559 \\ 0.3483 &amp; 0.02299 &amp; 1.74711 \\ 0.29082 &amp; 0.06001 &amp; 1.66915 \\ 0.09561 &amp; 0.139 &amp; 0.81307 \\ 0.00489 &amp; 0.323 &amp; 0.27202 \\ 0.06329 &amp; 0.71 &amp; 0.07819 \\ 0.29041 &amp; 0.95401 &amp; 0.02032 \\ 0.59452 &amp; 0.99499 &amp; 0.00388 \\ 0.91629 &amp; 0.87 &amp; 0.00167 \\ 1.06216 &amp; 0.631 &amp; 0.00081 \\ 0.85443 &amp; 0.38099 &amp; 0.00021 \\ 0.44795 &amp; 0.17501 &amp; 0.00003 \\ 0.1649 &amp; 0.06102 &amp; 0.00002 \\ 0.04676 &amp; 0.01701 &amp; 0 \\ 0.01135 &amp; 0.0041 &amp; 0 \\ 0.00291 &amp; 0.00105 &amp; 0 \\ 0.00069 &amp; 0.00025 &amp; 0 \\ 0.00017 &amp; 0.00006 &amp; 0 \\ 0 &amp; 0 &amp; 0\end{array}\right)' title='Q = \left(\begin{array}{ccc} 0.00139 &amp; 0.00005 &amp; 0.00654 \\ 0.01431 &amp; 0.00039 &amp; 0.06791 \\ 0.13434 &amp; 0.00399 &amp; 0.64559 \\ 0.3483 &amp; 0.02299 &amp; 1.74711 \\ 0.29082 &amp; 0.06001 &amp; 1.66915 \\ 0.09561 &amp; 0.139 &amp; 0.81307 \\ 0.00489 &amp; 0.323 &amp; 0.27202 \\ 0.06329 &amp; 0.71 &amp; 0.07819 \\ 0.29041 &amp; 0.95401 &amp; 0.02032 \\ 0.59452 &amp; 0.99499 &amp; 0.00388 \\ 0.91629 &amp; 0.87 &amp; 0.00167 \\ 1.06216 &amp; 0.631 &amp; 0.00081 \\ 0.85443 &amp; 0.38099 &amp; 0.00021 \\ 0.44795 &amp; 0.17501 &amp; 0.00003 \\ 0.1649 &amp; 0.06102 &amp; 0.00002 \\ 0.04676 &amp; 0.01701 &amp; 0 \\ 0.01135 &amp; 0.0041 &amp; 0 \\ 0.00291 &amp; 0.00105 &amp; 0 \\ 0.00069 &amp; 0.00025 &amp; 0 \\ 0.00017 &amp; 0.00006 &amp; 0 \\ 0 &amp; 0 &amp; 0\end{array}\right)' class='latex' /></p>
<p>and compare it to K, via Q &#8211; K:</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/picture-6.png?w=482&#038;h=559" alt="Picture 6" title="Picture 6" width="482" height="559" class="alignnone size-full wp-image-2493" /></p>
<p>(I keep using pictures for things like that, namely scientific notation, just because it&#8217;s easier than editing the LaTeX.)</p>
<p>The largest entry in absolute value is&#8230; 0.000069765 . The three columns of Q look like this:</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/picture-5.png?w=458&#038;h=377" alt="Picture 5" title="Picture 5" width="458" height="377" class="alignnone size-full wp-image-2494" /></p>
<p>Pretty small, and pretty random, but still not really zero. Well, maybe it wouldn&#8217;t be. Let&#8217;s try our magic formula on J and Q, since they <span style="text-decoration:underline;"> are </span>related by the transition matrix T. From</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T%27+%3D+%28J%27J%29%5E%7B-1%7D+J%27%5C+K%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T&#039; = (J&#039;J)^{-1} J&#039;\ K\ ' title='T&#039; = (J&#039;J)^{-1} J&#039;\ K\ ' class='latex' />,</p>
<p>I compute what I call t&#8217;:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=t%27+%3D+%28J%27J%29%5E%7B-1%7D+J%27%5C+Q%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='t&#039; = (J&#039;J)^{-1} J&#039;\ Q\ ' title='t&#039; = (J&#039;J)^{-1} J&#039;\ Q\ ' class='latex' />,</p>
<p>and then display the transpose of the transpose, t&#8221; = t:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=t+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+2.76887+%26+1.75176+%26+1.13013+%5C%5C+1.00002+%26+4.59072+%26+0.0600843+%5C%5C+0.0000430892+%26+0.0566067+%26+5.59443%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='t = \left(\begin{array}{ccc} 2.76887 &amp; 1.75176 &amp; 1.13013 \\ 1.00002 &amp; 4.59072 &amp; 0.0600843 \\ 0.0000430892 &amp; 0.0566067 &amp; 5.59443\end{array}\right)' title='t = \left(\begin{array}{ccc} 2.76887 &amp; 1.75176 &amp; 1.13013 \\ 1.00002 &amp; 4.59072 &amp; 0.0600843 \\ 0.0000430892 &amp; 0.0566067 &amp; 5.59443\end{array}\right)' class='latex' /></p>
<p>Recall T:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+2.76887+%26+1.75176+%26+1.13013+%5C%5C+1.00002+%26+4.59072+%26+0.0600843+%5C%5C+0.0000430892+%26+0.0566067+%26+5.59443%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T = \left(\begin{array}{ccc} 2.76887 &amp; 1.75176 &amp; 1.13013 \\ 1.00002 &amp; 4.59072 &amp; 0.0600843 \\ 0.0000430892 &amp; 0.0566067 &amp; 5.59443\end{array}\right)' title='T = \left(\begin{array}{ccc} 2.76887 &amp; 1.75176 &amp; 1.13013 \\ 1.00002 &amp; 4.59072 &amp; 0.0600843 \\ 0.0000430892 &amp; 0.0566067 &amp; 5.59443\end{array}\right)' class='latex' /></p>
<p>So. That equation for T&#8217; does recover the transition matrix if there is one. The discrepancy between T and T31 is real.</p>
<p>Maybe I&#8217;m making too big a deal of this. I infer that the XYZ and RGB tables do not span exactly the same subspace. They almost do, but not quite. </p>
<p><strong>To be more explicit: the 1931 XYZ (xbar, ybar, zbar) and RGB (rbar, gbar, bbar) tables are not exactly related by any transition matrix whatsoever, although the published T31 is close to being one for them.</strong></p>
<p>I have found a marvelous example &#8212; disappointing as a published result but marvelous as a bad example &#8212; where the discrepancy is significant. I expect to show it in another post, soon.</p>
<p>We&#8217;ve been looking at the computation in one way: if there is a transition matrix T such that</p>
<p>K&#8217; = T J&#8217;		</p>
<p>then</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T%27+%3D+%28J%27J%29%5E%7B-1%7D+J%27%5C+K%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T&#039; = (J&#039;J)^{-1} J&#039;\ K\ ' title='T&#039; = (J&#039;J)^{-1} J&#039;\ K\ ' class='latex' />.</p>
<p>What if there is no such transition matrix T? We can still define T by that equation, and compute <img src='http://l.wordpress.com/latex.php?latex=%28J%27J%29%5E%7B-1%7D+J%27%5C+K%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(J&#039;J)^{-1} J&#039;\ K\ ' title='(J&#039;J)^{-1} J&#039;\ K\ ' class='latex' /> (still assuming J is of full rank, with more rows than columns), but what are we getting, if T itself does not exist as a transition matrix?</p>
<p>That is, what if we compute T, and find that</p>
<p><img src='http://l.wordpress.com/latex.php?latex=K%27+%5Cne+T%5C+J%27%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='K&#039; \ne T\ J&#039;\ ' title='K&#039; \ne T\ J&#039;\ ' class='latex' />?</p>
<p>Well, this will be clearer in the next post, but&#8230;. That equation for T&#8217; looks an awful lot like the normal equations for a least-squares fit.</p>
<p>What I will illustrate in the next post is that <img src='http://l.wordpress.com/latex.php?latex=%28J%27J%29%5E%7B-1%7D+J%27%5C+K%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(J&#039;J)^{-1} J&#039;\ K\ ' title='(J&#039;J)^{-1} J&#039;\ K\ ' class='latex' /> generates a transition matrix to the subspace spanned by J. That is, T is a transition matrix &#8212; any invertible matrix is! &#8212; but it relates J to a subspace other than (the one spanned by) K.</p>
<p>(In our case, we had 21 observations; the 3 columns of J and of K define 3D subspaces of <img src='http://l.wordpress.com/latex.php?latex=R%5E%7B21%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='R^{21}\ ' title='R^{21}\ ' class='latex' />. Those two 3D subspaces are almost the same, but not exactly.)</p>
<p>Let me try to explain here it without a good (I mean, bad) example. If J and K span the same subspace, then any one column of K (think of it as the dependent variable y) can be written as a linear combination of the columns of J (think of it as the X matrix).</p>
<p>But if J and K do not span the same space, then the best we can do is to find that linear combination (call it yhat !) of columns of X which is as close to y as possible. </p>
<p>They really are examples of y and yhat and X.</p>
<p>And what is T&#8217; ? Well, if we write it with y and X&#8230;</p>
<p><img src='http://l.wordpress.com/latex.php?latex=%28X%27X%29%5E%7B-1%7D+X%27%5C+y%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(X&#039;X)^{-1} X&#039;\ y\ ' title='(X&#039;X)^{-1} X&#039;\ y\ ' class='latex' /></p>
<p>we might recognize that as <img src='http://l.wordpress.com/latex.php?latex=%5Cbeta&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\beta' title='\beta' class='latex' /> in ordinary least squares.</p>
<p>Let me show you that, while providing another example of the utility of the pseudo-inverse.</p>
<p>The derivation of the normal equations for ordinary least squares is fairly complicated, if only because it involves the derivative of a matrix. But the pseudo-inverse would let us recover the equations themselves.</p>
<p>Deriving them is one thing; recovering the form of them once we know they exist is another.</p>
<p>We write our model (this is a quick &amp; dirty recollection of the answer, not a derivation):</p>
<p><img src='http://l.wordpress.com/latex.php?latex=y+%3D+X+%5C+%5Cbeta%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='y = X \ \beta\ ' title='y = X \ \beta\ ' class='latex' />.</p>
<p>(I guess I have to talk about that. True is <img src='http://l.wordpress.com/latex.php?latex=yhat+%3D+X%5C+%5Cbeta%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='yhat = X\ \beta\ ' title='yhat = X\ \beta\ ' class='latex' />. But I write y instead of yhat, as though we have equality rather than a projection onto a subspace.)</p>
<p>We pretend that X is invertible, and write</p>
<p><img src='http://l.wordpress.com/latex.php?latex=%5Cbeta+%3D++X%5E%7B-1%7D+y%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\beta =  X^{-1} y\ ' title='\beta =  X^{-1} y\ ' class='latex' />.</p>
<p>Since X is <span style="text-decoration:underline;"> not </span>invertible, but X&#8217;X is (by assumption X is of full rank with more rows than columns), we replace the non-existent inverse by the pseudo-inverse and write</p>
<p><img src='http://l.wordpress.com/latex.php?latex=%5Cbeta+%3D+%28X%27X%29%5E%7B-1%7D+X%27%5C+y%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\beta = (X&#039;X)^{-1} X&#039;\ y\ ' title='\beta = (X&#039;X)^{-1} X&#039;\ y\ ' class='latex' />.</p>
<p>The real derivation gave us that very answer. Once I know that, I never need to compare them again. I have a plausibility argument that gives me the known right answer.</p>
<p>This is analagous to confirming in the previous color post, among others, that if I compute</p>
<p><img src='http://l.wordpress.com/latex.php?latex=E%27+%3D+%28A%27A%29%5E%7B-1%7D+A%27%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E&#039; = (A&#039;A)^{-1} A&#039;\ ' title='E&#039; = (A&#039;A)^{-1} A&#039;\ ' class='latex' /></p>
<p>then I have a dual (or reciprocal or biorthogonal) basis E such that</p>
<p>E&#8217;A = I.</p>
<p>In that case, I prefer to verify it computationally every time.</p>
<p>Incidentally, this trickery with the pseudo-inverse would also generate a true result if I had started with yhat instead of y &#8212; it is true that <img src='http://l.wordpress.com/latex.php?latex=%5Cbeta+%3D+%28X%27X%29%5E%7B-1%7D+X%27%5C+%5Chat%7By%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\beta = (X&#039;X)^{-1} X&#039;\ \hat{y}\ ' title='\beta = (X&#039;X)^{-1} X&#039;\ \hat{y}\ ' class='latex' />, but it&#8217;s not very useful because we don&#8217;t know yhat!</p>
<p>You might have noticed that <img src='http://l.wordpress.com/latex.php?latex=%5Cbeta&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\beta' title='\beta' class='latex' /> corresponds, algebraically, to a column of T&#8217;. Asking if the first column of K is a linear combination of all the columns of J gives us the first column of T&#8217;; asking if the ith column of K is a linear combination of all the columns of J gives us the ith column of T&#8217;. This, too, will be in the next related post.</p>
<h2>Summary</h2>
<p>Given two data matrices J and K, tall and thin, we can define and compute</p>
<p><img src='http://l.wordpress.com/latex.php?latex=T%27+%3D+%28J%27J%29%5E%7B-1%7D+J%27%5C+K%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T&#039; = (J&#039;J)^{-1} J&#039;\ K\ ' title='T&#039; = (J&#039;J)^{-1} J&#039;\ K\ ' class='latex' />.</p>
<p>If the individual observations are in fact related by a transition matrix M, so that</p>
<p>K&#8217; = M J&#8217;,</p>
<p>then our computed T is M:</p>
<p>T = M.</p>
<p>This is pretty slick. <strong>Any time someone hands us some data and the alleged result of applying an unspecified linear transformation to it &#8212; we can find that linear transformation if it exists, or demonstrate that it does not exist (in which case, they goofed).</strong></p>
<p>And if there is no such matrix M? Well, it&#8217;s simple enough: if there is no such M &#8212; and J and K are both of full rank &#8212; then our computed T must be something else, so we do not have equality:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=K%27+%5Cne+T%5C+J%27%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='K&#039; \ne T\ J&#039;\ ' title='K&#039; \ne T\ J&#039;\ ' class='latex' />.</p>
<p>That&#8217;s all it takes for us to know that there is no transition matrix M between J&#8217; and K&#8217;. If there were, it would be T, but that didn&#8217;t work.</p>
<p>(That&#8217;s if J and K are both of full rank; if only one is not, then one of J&#8217;J or K&#8217;K is actually not invertible &#8212; as JJ&#8217; and KK&#8217; are not invertible &#8212; and T can only be computed in one direction. I expect that T is not invertible if J and K are not both of full rank.)</p>
<p>And when there is no transition matrix M, we nevertheless get a transition matrix T, but it&#8217;s between J&#8217; and Q&#8217; = T J&#8217;.</p>
<p>I will freely confess that I did not know any part of this before I read Cohen: neither that we could find the transition matrix so easily; nor what we were finding if it were not a  transition matrix.</p>
<p>(Cohen implicitly assumes that there exists a transition M; he does not discuss what happens if there isn&#8217;t one.)</p>
<p>Next post on this topic, a numerical illustration.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rip94550.wordpress.com/2491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rip94550.wordpress.com/2491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rip94550.wordpress.com/2491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rip94550.wordpress.com/2491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rip94550.wordpress.com/2491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rip94550.wordpress.com/2491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rip94550.wordpress.com/2491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rip94550.wordpress.com/2491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rip94550.wordpress.com/2491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rip94550.wordpress.com/2491/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&blog=2063738&post=2491&subd=rip94550&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://rip94550.wordpress.com/2009/11/15/transition-matrix-to-be-or-not-to-be/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eda25c1223d5c501eea15aab3feba8ac?s=96&#38;d=identicon" medium="image">
			<media:title type="html">rip</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/picture-6.png" medium="image">
			<media:title type="html">Picture 6</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/picture-5.png" medium="image">
			<media:title type="html">Picture 5</media:title>
		</media:content>
	</item>
		<item>
		<title>Color: decomposing the RGB A transpose matrix</title>
		<link>http://rip94550.wordpress.com/2009/11/08/color-decomposing-the-rgb-a-transpose-matrix/</link>
		<comments>http://rip94550.wordpress.com/2009/11/08/color-decomposing-the-rgb-a-transpose-matrix/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 01:50:47 +0000</pubDate>
		<dc:creator>rip</dc:creator>
				<category><![CDATA[color]]></category>
		<category><![CDATA[reciprocal basis dual basis]]></category>
		<category><![CDATA[SVD singular value decomposition linear algebra]]></category>

		<guid isPermaLink="false">http://rip94550.wordpress.com/?p=2462</guid>
		<description><![CDATA[(abuse of) terminology
Sometimes I get tired of writing &#8220;xbar, ybar, zbar tables&#8221; &#8212; and I just write &#8220;xyz bar tables&#8221; or even &#8220;XYZ tables&#8221;. Similarly for rbar, gbar, bbar tables &#8212; rgb bar. I&#8217;m not talking about anything new, just abbreviating the names.
Introduction
This is the third post about the example on p. 160 of W&#38;S. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&blog=2063738&post=2462&subd=rip94550&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h2>(abuse of) terminology</h2>
<p>Sometimes I get tired of writing &#8220;xbar, ybar, zbar tables&#8221; &#8212; and I just write &#8220;xyz bar tables&#8221; or even &#8220;XYZ tables&#8221;. Similarly for rbar, gbar, bbar tables &#8212; rgb bar. I&#8217;m not talking about anything new, just abbreviating the names.</p>
<h2>Introduction</h2>
<p>This is the third post about the example on p. 160 of W&amp;S. Once again, I am going to decompose the reflected spectrum into its fundamental and its residual.</p>
<p>This time, however, I&#8217;m going to use the rbar, gbar, bbar tables (RGB) instead of the xbar, ybar, zbar (XYZ) tables. They did not do this.</p>
<p>I&#8217;ll tell you now there is one little twist in these calculations. We will need the ybar table, because we still need to use it to scale our results.</p>
<p>In addition to showing, as I did previously, the dual basis spectra and the orthonormal basis spectra for the non-nullspace, I will display the orthonormal basis for the nullspace.</p>
<p>As usual, I am using the CIE 1931 tables, and I am working at 20 nm intervals.</p>
<p>Our ingredients were: a reflectance spectrum, an illiminant spectrum, and some choice of color matching functions. For this post, I am choosing a different set of color matching functions.</p>
<p>Our results in the previous post were a few sets of 3 numbers. The final result was called xyz &#8212; meaning the triple (x, y, z) &#8212; for plotting a point on the CIE chromaticity chart. We will not do this again.</p>
<p>That result came from a triple denoted XYZ, which are values in XYZ color-space. That space has the advantage of being device-independent. We could &#8212; and did &#8212; convert those values to an RGB color space, specifically the one defined by the rgb bar (i.e. rbar, gbar, bbar) color-matching tables.</p>
<p>This post will compute the RGB values directly, and we will find that we get almost exactly the same RGB values. (We really ought to.)</p>
<p>The XYZ result in turn came from a triple for which I have no convenient notation, but I keep saying without proof, and confirming by computation, that that triple is the components of the fundamental of the reflected spectrum wrt the basis dual to the chosen color-matching functions.</p>
<p>Let us go see that, this time for the rbar, gbar, bbar tables instead of xbar, ybar, zbar.</p>
<h2>The same old calculations, but with a twist</h2>
<p>But first, let me review the calculations. Feel free to skip to the next section.</p>
<p>Our first computation is to get the reflected spectrum, which is the pointwise product of the illuminant spectrum and the reflectance spectrum. For this problem, the reflected spectrum is the perceived spectrum, the input to the eye of &#8220;the standard observer&#8221;. The data itself is in the fourth case of <a href="http://rip94550.wordpress.com/2009/10/26/color-from-spectrum-to-tristimulus/">the first post about this example</a>.</p>
<p>Here is what the three of those spectra looked like:</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1107a.png?w=371&#038;h=368" alt="g1107a" title="g1107a" width="371" height="368" class="alignnone size-full wp-image-2463" /></p>
<p>As before, I&#8217;ve decided to avoid red, green, and blue &#8212; except where they are appropriate. For this post, they will be appropriate in some cases. The illuminant is shown in white, the reflectance spectrum is shown in purple, and the reflected spectrum is shown in yellow.</p>
<p>Having said that, I am going to use red, green, blue colors for the three columns of our A matrix, because these entires are rbar, gbar, bbar values. These are the 1931 color matching functions (i.e. a subset, at 20 nm intervals)</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1107b.png?w=312&#038;h=285" alt="g1107b" title="g1107b" width="312" height="285" class="alignnone size-full wp-image-2464" /></p>
<p>BTW, we can tell that we are using RGB (i.e. rbar, gbar, bbar tables) because one of these functions is clearly negative over part of its range. In fact all of them are negative somewhere, but it&#8217;s only obvious for the red one.</p>
<p>Since I&#8217;ve just introduced new data, let me display it:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=A+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+0.00003+%26+-0.00001+%26+0.00117+%5C%5C+0.0003+%26+-0.00014+%26+0.01214+%5C%5C+0.00211+%26+-0.0011+%26+0.11541+%5C%5C+-0.00261+%26+0.00149+%26+0.31228+%5C%5C+-0.02608+%26+0.01485+%26+0.29821+%5C%5C+-0.04939+%26+0.03914+%26+0.14494+%5C%5C+-0.07173+%26+0.08536+%26+0.04776+%5C%5C+-0.09264+%26+0.17468+%26+0.01221+%5C%5C+-0.03152+%26+0.21466+%26+0.00146+%5C%5C+0.0906+%26+0.19702+%26+-0.0013+%5C%5C+0.24526+%26+0.1361+%26+-0.00108+%5C%5C+0.34429+%26+0.06246+%26+-0.00049+%5C%5C+0.29708+%26+0.01828+%26+-0.00015+%5C%5C+0.15968+%26+0.00334+%26+-0.00003+%5C%5C+0.05932+%26+0.00037+%26+0+%5C%5C+0.01687+%26+0.00003+%26+0+%5C%5C+0.0041+%26+0+%26+0+%5C%5C+0.00105+%26+0+%26+0+%5C%5C+0.00025+%26+0+%26+0+%5C%5C+0.00006+%26+0+%26+0+%5C%5C+0+%26+0+%26+0%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A = \left(\begin{array}{ccc} 0.00003 &amp; -0.00001 &amp; 0.00117 \\ 0.0003 &amp; -0.00014 &amp; 0.01214 \\ 0.00211 &amp; -0.0011 &amp; 0.11541 \\ -0.00261 &amp; 0.00149 &amp; 0.31228 \\ -0.02608 &amp; 0.01485 &amp; 0.29821 \\ -0.04939 &amp; 0.03914 &amp; 0.14494 \\ -0.07173 &amp; 0.08536 &amp; 0.04776 \\ -0.09264 &amp; 0.17468 &amp; 0.01221 \\ -0.03152 &amp; 0.21466 &amp; 0.00146 \\ 0.0906 &amp; 0.19702 &amp; -0.0013 \\ 0.24526 &amp; 0.1361 &amp; -0.00108 \\ 0.34429 &amp; 0.06246 &amp; -0.00049 \\ 0.29708 &amp; 0.01828 &amp; -0.00015 \\ 0.15968 &amp; 0.00334 &amp; -0.00003 \\ 0.05932 &amp; 0.00037 &amp; 0 \\ 0.01687 &amp; 0.00003 &amp; 0 \\ 0.0041 &amp; 0 &amp; 0 \\ 0.00105 &amp; 0 &amp; 0 \\ 0.00025 &amp; 0 &amp; 0 \\ 0.00006 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0\end{array}\right)' title='A = \left(\begin{array}{ccc} 0.00003 &amp; -0.00001 &amp; 0.00117 \\ 0.0003 &amp; -0.00014 &amp; 0.01214 \\ 0.00211 &amp; -0.0011 &amp; 0.11541 \\ -0.00261 &amp; 0.00149 &amp; 0.31228 \\ -0.02608 &amp; 0.01485 &amp; 0.29821 \\ -0.04939 &amp; 0.03914 &amp; 0.14494 \\ -0.07173 &amp; 0.08536 &amp; 0.04776 \\ -0.09264 &amp; 0.17468 &amp; 0.01221 \\ -0.03152 &amp; 0.21466 &amp; 0.00146 \\ 0.0906 &amp; 0.19702 &amp; -0.0013 \\ 0.24526 &amp; 0.1361 &amp; -0.00108 \\ 0.34429 &amp; 0.06246 &amp; -0.00049 \\ 0.29708 &amp; 0.01828 &amp; -0.00015 \\ 0.15968 &amp; 0.00334 &amp; -0.00003 \\ 0.05932 &amp; 0.00037 &amp; 0 \\ 0.01687 &amp; 0.00003 &amp; 0 \\ 0.0041 &amp; 0 &amp; 0 \\ 0.00105 &amp; 0 &amp; 0 \\ 0.00025 &amp; 0 &amp; 0 \\ 0.00006 &amp; 0 &amp; 0 \\ 0 &amp; 0 &amp; 0\end{array}\right)' class='latex' /></p>
<p>Our second computation (or third, this order doesn&#8217;t matter) should be to apply the matrix A^T &#8212; the (transpose of) the color matching functions A &#8212; to the reflected spectrum S:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+S+%3D+%5C%7B70.5889%2C%5C+61.249%2C%5C+47.8412%5C%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ S = \{70.5889,\ 61.249,\ 47.8412\}\ ' title='A^T\ S = \{70.5889,\ 61.249,\ 47.8412\}\ ' class='latex' />.</p>
<p>As before these numbers are components of (the fundamental of) the reflected spectrum wrt the basis dual to <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' />. In Cohen&#8217;s notation, these 3 numbers are the components wrt the columns of the E matrix.</p>
<p>The other computation, whether we do it second or third, is to find the constant for normalizing things, using the illuminant spectrum; that is, to set the white point (1,1,1) in our color space.</p>
<p><strong>Here&#8217;s the twist</strong>. We still have to use the second column of the XYZ (xyz bar) tables; not one of the columns of our new A is the total cone response. (Nor is the sum of them, and I&#8217;ll confess that I don&#8217;t know why. My WAG (my guess) is that the three color matching functions each have to be weighted differently in order to sum to the total cone response.)</p>
<p>The number we got by applying the second column of the XYZ tables to the illuminant was 529.764 .</p>
<p>Now we move on to the fourth computation:  we divide our 3 values <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+S&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ S' title='A^T\ S' class='latex' /> by that to get RGB.</p>
<p>RGB = {0.133246, 0.115616, 0.0903067}.</p>
<p>It is encouraging to see that these RGB values are in [0, 1]. These are tristimulus values in an RGB color space, namely the one I keep showing on the chromaticity chart.</p>
<p>Let me be clear. The red, green, and blue dots on this diagram are the projections of (1,0,0), (0,1,0) and (0,0,1) onto xy-space. The values I just got are in this RGB space.<br />
<img src="http://rip94550.files.wordpress.com/2009/10/cie-with-orig-rgb.png?w=373&#038;h=363" alt="CIE with orig RGB" title="CIE with orig RGB" width="373" height="363" class="alignnone size-full wp-image-2340" /></p>
<p>Oh, in <a href="http://rip94550.wordpress.com/2009/11/02/color-decomposing-the-a-transpose-matrix-and-the-reflected-spectrum/">the previous post</a> we transformed the computed XYZ values into RGB; what did we get?</p>
<p>{0.133246, 0.115616, 0.0903103}</p>
<p>So. Almost exactly the same answers: only the B value differs. That&#8217;s good. I said I would confirm this equivalence.</p>
<p>The blue value is off a tiny bit. (The simple fact is that the two sets of tables &#8212; xyz bar and rgb bar &#8212; and the transition matrix between them are not consistent. In fact, it appears that the columns of the two tables do not quite span the same 3D space. If I&#8217;m right, I could fix this by using one table and the transition matrix to construct a very slightly different version of the second table. But bear in mind that I am printing far more digits than W&amp;S showed.)</p>
<h2>the dual basis</h2>
<p>Now, let&#8217;s get the dual basis E. We recall that instead of</p>
<p><img src='http://l.wordpress.com/latex.php?latex=E%5ET+%3D+A%5E%7B-1%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E^T = A^{-1}\ ' title='E^T = A^{-1}\ ' class='latex' />,</p>
<p>we use the pseudo inverse and write</p>
<p><img src='http://l.wordpress.com/latex.php?latex=E%5ET+%3D+%28A%27A%29%5E%7B-1%7D%5C+A%27%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E^T = (A&#039;A)^{-1}\ A&#039;\ ' title='E^T = (A&#039;A)^{-1}\ A&#039;\ ' class='latex' /></p>
<p>It is easier to work with <img src='http://l.wordpress.com/latex.php?latex=E%5ET&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E^T' title='E^T' class='latex' /> but easier to display E:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=E+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+0.000561675+%26+-0.000849316+%26+0.00535311+%5C%5C+0.00583075+%26+-0.00906171+%26+0.0555629+%5C%5C+0.0527362+%26+-0.0836627+%26+0.52778+%5C%5C+0.110419+%26+-0.184984+%26+1.42203+%5C%5C+0.0130902+%26+-0.0537785+%26+1.34031+%5C%5C+-0.149518+%26+0.244672+%26+0.616947+%5C%5C+-0.311401+%26+0.664664+%26+0.135783+%5C%5C+-0.492205+%26+1.35497+%26+-0.0912093+%5C%5C+-0.339342+%26+1.5831+%26+-0.142044+%5C%5C+0.0806418+%26+1.32314+%26+-0.0962321+%5C%5C+0.656427+%26+0.713092+%26+0.00326589+%5C%5C+1.0634+%26+0.072223+%26+0.0910496+%5C%5C+0.956881+%26+-0.194913+%26+0.10246+%5C%5C+0.521479+%26+-0.151607+%26+0.0594277+%5C%5C+0.194688+%26+-0.0626132+%26+0.0226816+%5C%5C+0.0554502+%26+-0.0183495+%26+0.00649827+%5C%5C+0.0134844+%26+-0.00451219+%26+0.00158394+%5C%5C+0.00345331+%26+-0.00115556+%26+0.000405644+%5C%5C+0.000822217+%26+-0.000275134+%26+0.0000965819+%5C%5C+0.000197332+%26+-0.0000660321+%26+0.0000231797+%5C%5C+0.+%26+0.+%26+0.%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E = \left(\begin{array}{ccc} 0.000561675 &amp; -0.000849316 &amp; 0.00535311 \\ 0.00583075 &amp; -0.00906171 &amp; 0.0555629 \\ 0.0527362 &amp; -0.0836627 &amp; 0.52778 \\ 0.110419 &amp; -0.184984 &amp; 1.42203 \\ 0.0130902 &amp; -0.0537785 &amp; 1.34031 \\ -0.149518 &amp; 0.244672 &amp; 0.616947 \\ -0.311401 &amp; 0.664664 &amp; 0.135783 \\ -0.492205 &amp; 1.35497 &amp; -0.0912093 \\ -0.339342 &amp; 1.5831 &amp; -0.142044 \\ 0.0806418 &amp; 1.32314 &amp; -0.0962321 \\ 0.656427 &amp; 0.713092 &amp; 0.00326589 \\ 1.0634 &amp; 0.072223 &amp; 0.0910496 \\ 0.956881 &amp; -0.194913 &amp; 0.10246 \\ 0.521479 &amp; -0.151607 &amp; 0.0594277 \\ 0.194688 &amp; -0.0626132 &amp; 0.0226816 \\ 0.0554502 &amp; -0.0183495 &amp; 0.00649827 \\ 0.0134844 &amp; -0.00451219 &amp; 0.00158394 \\ 0.00345331 &amp; -0.00115556 &amp; 0.000405644 \\ 0.000822217 &amp; -0.000275134 &amp; 0.0000965819 \\ 0.000197332 &amp; -0.0000660321 &amp; 0.0000231797 \\ 0. &amp; 0. &amp; 0.\end{array}\right)' title='E = \left(\begin{array}{ccc} 0.000561675 &amp; -0.000849316 &amp; 0.00535311 \\ 0.00583075 &amp; -0.00906171 &amp; 0.0555629 \\ 0.0527362 &amp; -0.0836627 &amp; 0.52778 \\ 0.110419 &amp; -0.184984 &amp; 1.42203 \\ 0.0130902 &amp; -0.0537785 &amp; 1.34031 \\ -0.149518 &amp; 0.244672 &amp; 0.616947 \\ -0.311401 &amp; 0.664664 &amp; 0.135783 \\ -0.492205 &amp; 1.35497 &amp; -0.0912093 \\ -0.339342 &amp; 1.5831 &amp; -0.142044 \\ 0.0806418 &amp; 1.32314 &amp; -0.0962321 \\ 0.656427 &amp; 0.713092 &amp; 0.00326589 \\ 1.0634 &amp; 0.072223 &amp; 0.0910496 \\ 0.956881 &amp; -0.194913 &amp; 0.10246 \\ 0.521479 &amp; -0.151607 &amp; 0.0594277 \\ 0.194688 &amp; -0.0626132 &amp; 0.0226816 \\ 0.0554502 &amp; -0.0183495 &amp; 0.00649827 \\ 0.0134844 &amp; -0.00451219 &amp; 0.00158394 \\ 0.00345331 &amp; -0.00115556 &amp; 0.000405644 \\ 0.000822217 &amp; -0.000275134 &amp; 0.0000965819 \\ 0.000197332 &amp; -0.0000660321 &amp; 0.0000231797 \\ 0. &amp; 0. &amp; 0.\end{array}\right)' class='latex' /></p>
<p>Check that we do have <img src='http://l.wordpress.com/latex.php?latex=E%5ET%5C+A+%3D+I%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E^T\ A = I\ ' title='E^T\ A = I\ ' class='latex' />. I didn&#8217;t say it last time, so let me emphasize: I didn&#8217;t prove that the pseudo-inverse would give me the dual basis. <strong>This easy &#8220;check&#8221; is the real confirmation that my recipe actually works. This check is crucial, not merely convenient.</strong></p>
<p>Let me call the basis vectors E1, E2, E3, and let&#8217;s look at them. In fact, let me juxtapose the dual basis (right) with the color matching functions (left). </p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1107c.png?w=638&#038;h=290" alt="g1107c" title="g1107c" width="638" height="290" class="alignnone size-full wp-image-2465" /></p>
<p>If we multiply each of those dual basis vectors (E1, E2, E3) by our original three numbers&#8230;</p>
<p>{70.5889, 61.249, 47.8412}</p>
<p>and add the results.. we get numbers&#8230;</p>
<p> {0.243727,2.51476,23.848,64.4959,61.7521,33.9471,25.2246,<br />
 43.8826,66.214,82.1295,90.1689,83.8434,60.5088,30.3679,<br />
 10.993,3.10116,0.751257,0.192395,0.0458083,0.010994,0.}</p>
<p>and a picture&#8230;</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1107e.png?w=312&#038;h=287" alt="g1107e" title="g1107e" width="312" height="287" class="alignnone size-full wp-image-2466" /></p>
<p>where I have shown the sum in white.</p>
<p>Let&#8217;s look quickly at the reflected spectrum (in yellow) and that sum (still in white):</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1107f.png?w=371&#038;h=368" alt="g1107f" title="g1107f" width="371" height="368" class="alignnone size-full wp-image-2467" /></p>
<p>Yes, we&#8217;ve seen that before. And as before, that white curve is the fundamental. It differs from the yellow curve by a metameric black, a spectrum in the null space of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' />.</p>
<p>As before, we could stop here. We have gotten RGB values from the reflected spectrum&#8230; we have found the dual basis&#8230; we have found the fundamental of the reflected spectrum&#8230; we know that the first three numbers we computed (<img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+S%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ S\ ' title='A^T\ S\ ' class='latex' />) are the components of the fundamental wrt the dual basis.</p>
<h2>The SVD, orthonormal basis, and projection operator</h2>
<p>Now let&#8217;s do the SVD (Singular Value Decomposition), because we can get a nice orthonormal basis for the entire domain of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' /> including its null space, i.e. for spectra including the metameric blacks.</p>
<p>As before, we will get an orthonormal basis v1 for the pre-image of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' />, then a projection operator R onto that pre-image, then recompute the fundamental by applying the projection operator to the reflected spectrum.</p>
<p>First, let</p>
<p><img src='http://l.wordpress.com/latex.php?latex=A%5ET+%3D+u%5C+w%5C+v%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T = u\ w\ v^T\ ' title='A^T = u\ w\ v^T\ ' class='latex' />.</p>
<p>(The first time I did this, I let <img src='http://l.wordpress.com/latex.php?latex=B+%3D+A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='B = A^T\ ' title='B = A^T\ ' class='latex' />. Now we&#8217;re more experienced, but if you want to use B instead of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' />, feel free.)</p>
<p>As always, our vectors have length 21 because we used 20 nm intervals from 380 to 780 nm. Then, the leftmost 3 columns of v are an orthonormal basis for the pre-image of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' />, and the rightmost 18 (i.e. 21-3) are an orthonormal basis for the nullspace of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' />.</p>
<p>Here are the leftmost 3 columns of v, denoted v1 as is my habit:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=v1+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+0.000242117+%26+0.00237304+%26+0.000773655+%5C%5C+0.00254521+%26+0.0246016+%26+0.00811386+%5C%5C+0.0253371+%26+0.23387+%26+0.0760077+%5C%5C+0.0806111+%26+0.633731+%26+0.188135+%5C%5C+0.110853+%26+0.608184+%26+0.12797+%5C%5C+0.102268+%26+0.306133+%26+-0.04696+%5C%5C+0.0972532+%26+0.129667+%26+-0.243487+%5C%5C+0.0880827+%26+0.101349+%26+-0.512971+%5C%5C+-0.0317461+%26+0.111471+%26+-0.580417+%5C%5C+-0.228205+%26+0.117862+%26+-0.449608+%5C%5C+-0.460923+%26+0.112998+%26+-0.181177+%5C%5C+-0.596203+%26+0.0923988+%26+0.0811638+%5C%5C+-0.500375+%26+0.0613641+%26+0.162946+%5C%5C+-0.266387+%26+0.0296408+%26+0.104503+%5C%5C+-0.0986158+%26+0.0105714+%26+0.0410965+%5C%5C+-0.0280157+%26+0.00296645+%26+0.0118833+%5C%5C+-0.00680593+%26+0.000717077+%26+0.00290704+%5C%5C+-0.00174298+%26+0.000183642+%26+0.000744487+%5C%5C+-0.000414996+%26+0.0000437242+%26+0.000177259+%5C%5C+-0.000099599+%26+0.0000104938+%26+0.0000425421+%5C%5C+0.+%26+0.+%26+0.%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='v1 = \left(\begin{array}{ccc} 0.000242117 &amp; 0.00237304 &amp; 0.000773655 \\ 0.00254521 &amp; 0.0246016 &amp; 0.00811386 \\ 0.0253371 &amp; 0.23387 &amp; 0.0760077 \\ 0.0806111 &amp; 0.633731 &amp; 0.188135 \\ 0.110853 &amp; 0.608184 &amp; 0.12797 \\ 0.102268 &amp; 0.306133 &amp; -0.04696 \\ 0.0972532 &amp; 0.129667 &amp; -0.243487 \\ 0.0880827 &amp; 0.101349 &amp; -0.512971 \\ -0.0317461 &amp; 0.111471 &amp; -0.580417 \\ -0.228205 &amp; 0.117862 &amp; -0.449608 \\ -0.460923 &amp; 0.112998 &amp; -0.181177 \\ -0.596203 &amp; 0.0923988 &amp; 0.0811638 \\ -0.500375 &amp; 0.0613641 &amp; 0.162946 \\ -0.266387 &amp; 0.0296408 &amp; 0.104503 \\ -0.0986158 &amp; 0.0105714 &amp; 0.0410965 \\ -0.0280157 &amp; 0.00296645 &amp; 0.0118833 \\ -0.00680593 &amp; 0.000717077 &amp; 0.00290704 \\ -0.00174298 &amp; 0.000183642 &amp; 0.000744487 \\ -0.000414996 &amp; 0.0000437242 &amp; 0.000177259 \\ -0.000099599 &amp; 0.0000104938 &amp; 0.0000425421 \\ 0. &amp; 0. &amp; 0.\end{array}\right)' title='v1 = \left(\begin{array}{ccc} 0.000242117 &amp; 0.00237304 &amp; 0.000773655 \\ 0.00254521 &amp; 0.0246016 &amp; 0.00811386 \\ 0.0253371 &amp; 0.23387 &amp; 0.0760077 \\ 0.0806111 &amp; 0.633731 &amp; 0.188135 \\ 0.110853 &amp; 0.608184 &amp; 0.12797 \\ 0.102268 &amp; 0.306133 &amp; -0.04696 \\ 0.0972532 &amp; 0.129667 &amp; -0.243487 \\ 0.0880827 &amp; 0.101349 &amp; -0.512971 \\ -0.0317461 &amp; 0.111471 &amp; -0.580417 \\ -0.228205 &amp; 0.117862 &amp; -0.449608 \\ -0.460923 &amp; 0.112998 &amp; -0.181177 \\ -0.596203 &amp; 0.0923988 &amp; 0.0811638 \\ -0.500375 &amp; 0.0613641 &amp; 0.162946 \\ -0.266387 &amp; 0.0296408 &amp; 0.104503 \\ -0.0986158 &amp; 0.0105714 &amp; 0.0410965 \\ -0.0280157 &amp; 0.00296645 &amp; 0.0118833 \\ -0.00680593 &amp; 0.000717077 &amp; 0.00290704 \\ -0.00174298 &amp; 0.000183642 &amp; 0.000744487 \\ -0.000414996 &amp; 0.0000437242 &amp; 0.000177259 \\ -0.000099599 &amp; 0.0000104938 &amp; 0.0000425421 \\ 0. &amp; 0. &amp; 0.\end{array}\right)' class='latex' /></p>
<p>OK, I have to know: did v1 change? Yes. I&#8217;ll show you, soon.</p>
<p>Let me juxtapose the orthonormal basis v1 (right) with the dual basis E vectors. Both bases span the same space, the pre-image of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' />, but they are different.</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1107g.png?w=634&#038;h=287" alt="g1107g" title="g1107g" width="634" height="287" class="alignnone size-full wp-image-2468" /></p>
<p>And in this case, I can&#8217;t see that any vectors in one basis look similar to vectors in the other basis.</p>
<p>Let me recall an image from the previous post: here are the dual basis  E and the o/n basis v1 from the previous post. This is the old counterpart to the preceding drawing.</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1107h.png?w=631&#038;h=283" alt="g1107h" title="g1107h" width="631" height="283" class="alignnone size-full wp-image-2469" /></p>
<p>And the right hand pieces of those two drawings are the new v1 and the old v1. We can see that they are quite different.</p>
<p>Having an orthonormal basis for the preimage of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' />, we know that we can construct a projection operator R from the domain of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' /> onto the preimage; we just take the product of v1 and <img src='http://l.wordpress.com/latex.php?latex=v1%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='v1^T\ ' title='v1^T\ ' class='latex' /> in the other order:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=R+%3D+v1%5C+v1%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='R = v1\ v1^T\ ' title='R = v1\ v1^T\ ' class='latex' />.</p>
<p>It&#8217;s 21&#215;21, as before, so I&#8217;m not going to show it to you. But, for checking, I&#8217;ll show you the first column:</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1107i.png?w=142&#038;h=425" alt="g1107i" title="g1107i" width="142" height="425" class="alignnone size-full wp-image-2470" /></p>
<p>And I&#8217;ll tell you that the last column, as before, is identically 0.</p>
<h2>the fundamental and the residual</h2>
<p>So. Apply the projection operator R to the reflected spectrum S to get the fundamental f&#8230; </p>
<p>f = {0.243727,2.51476,23.848,64.4959,61.7521,33.9471,25.2246,<br />
43.8826,66.214,82.1295,90.1689,83.8434,60.5088,30.3679,<br />
10.993,3.10116,0.751257,0.192395,0.0458083,0.010994,0.}</p>
<p>and subtract to get the residual n = S &#8211; f&#8230;</p>
<p>n = {4.85627,26.2996,19.116,-14.6684,-7.32845,18.6715,27.0686,<br />
15.2246,3.00319,-13.0295,-23.7795,-12.7434,13.5977,41.0282,<br />
59.1236,63.6887,60.2519,52.106,59.2832,33.0258,39.625}</p>
<p>Did we get the same fundamental? They are very close. Again, I think the real problem is that the two tables are not exactly consistent. Here&#8217;s </p>
<p>old f minus new f = </p>
<p>{-0.00362232,0.000221807,0.00281357,-0.00101889,-0.00138667,<br />
-0.00346164,-0.00173991,-0.00126245,-0.00325203,-0.000486578,<br />
0.00271479,0.00422385,0.00120929,-0.00248099,-0.00107542,<br />
0.0013427,0.00223839,-0.00306751,0.00309787,0.00376061,0.}</p>
<p>We already know that the fundamental is the same whether we compute it using the dual basis or using the projection operator. Let me illustrate that the fundamental computed using RGB is the same as the fundamental computed using XYZ.</p>
<p>I have plotted points using the previous fundamental, and I have plotted a piecewise linear curve using the new fundamental:</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1107j1.png?w=369&#038;h=369" alt="g1107j" title="g1107j" width="369" height="369" class="alignnone size-full wp-image-2483" /></p>
<p>I should probably emphasize that although this drawing looks like one from the previous post, it illustrates something else. The apparently identical drawing in the previous post showed the equivalence of the fundamental computed two ways using XYZ; this drawing shows the equivalence of the fundamental from the previous post with the fundamental from this post.</p>
<p>And the null? Close, too. We have </p>
<p>old n minus new n = </p>
<p>{0.00362232,-0.000221807,-0.00281357,0.00101889,0.00138667,<br />
0.00346164,0.00173991,0.00126245,0.00325203,0.000486578,<br />
-0.00271479,-0.00422385,-0.00120929,0.00248099,0.00107542,<br />
-0.0013427,-0.00223839,0.00306751,-0.00309787,-0.00376061,0.}</p>
<p>We can check that n is in the nullspace of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' /> by computing <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+n%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ n\ ' title='A^T\ n\ ' class='latex' />:</p>
<p>{-6.77791*10^-14, 6.72509*10^-15, -3.50254*10^-14}.</p>
<p>We should also check that the fundamental has the same 3 components as the entire reflected spectrum. That is, we had</p>
<p><img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+S+%3D+%5C%7B70.5889%2C%5C+61.249%2C%5C+47.8412%5C%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ S = \{70.5889,\ 61.249,\ 47.8412\}\ ' title='A^T\ S = \{70.5889,\ 61.249,\ 47.8412\}\ ' class='latex' />.</p>
<p>for <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' /> applied to the reflected spectrum. If we apply <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' /> to the fundamental, we get</p>
<p><img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+f+%3D+%5C%7B70.5889%2C%5C+61.249%2C%5C+47.8412%5C%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ f = \{70.5889,\ 61.249,\ 47.8412\}' title='A^T\ f = \{70.5889,\ 61.249,\ 47.8412\}' class='latex' />.</p>
<p>The same. As they should be.</p>
<p>You know what? There&#8217;s another pair of calculations I can do, to make a point.</p>
<p>What are the components of the fundamental wrt the orthonormal basis v1? We just dot f into the v1 matrix, because its columns are orthonormal basis vectors:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=f+%5Ccdot+v1+%3D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='f \cdot v1 =\ ' title='f \cdot v1 =\ ' class='latex' /><br />
{-129.491,141.916,-79.7421,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}.</p>
<p>That confirms that no part of the fundamental lies in the nullspace. That was the whole point of the projection operator.</p>
<p>And what are the components of the residual? I hope you&#8217;ve got it: exactly the first three are zero:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=n+%5Ccdot+v1+%3D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n \cdot v1 =\ ' title='n \cdot v1 =\ ' class='latex' /><br />
{0,0,0,-24.6623,-15.3786,17.8955,33.3365,29.6755,19.4414,<br />
-0.412828,-18.9652,-15.4907,8.59491,37.8598,57.8821,63.3301,<br />
60.1642,52.0835,59.2778,33.0245,39.625}.</p>
<p>The decomposition looks the same as in the previous post. The reflected spectrum is in yellow, the fundamental in white, and their difference n, the residual, is in black.</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1107j2.png?w=373&#038;h=347" alt="g1107j2" title="g1107j2" width="373" height="347" class="alignnone size-full wp-image-2472" /></p>
<p>NOTE that although reflected and fundamental are non-negative, the residual is not. The good news is that, in principle, we could generate the fundamental spectrum, as well as the reflected. But I can&#8217;t imagine how to generate a spectrum with negative values.</p>
<p>We face this problem not just for the residual, but for just about every basis vector we&#8217;ve computed! </p>
<p>(The middle vector of the orthonormal basis, i.e. the middle column of v1, is the only exception so far; it is everywhere non-negative. But that&#8217;s only for the orthonormal basis for the RGB color matching functions; for the previous post, every column of v1 has some negative values.)</p>
<p>Because the basis vectors are, frankly, weird spectra, don&#8217;t expect anything nice if you try to find their RGB, XYZ, or xyz values. Most of them lie outside the CIE chromaticity chart! Incidentally, I have computed Cohen&#8217;s F1 and F2 bases for this case, and some of them are still negative, too. Well, they have to be: things have to cancel out so that the dot products among the orthonormal vectors are actually zero.</p>
<p>But while we&#8217;re looking at the linear algebra, let&#8217;s take a look at the orthonormal basis for the null space.</p>
<h2>the null space basis</h2>
<p>Now for something new.</p>
<p>We have 18 basis vectors (metameric black spectra) for the nullspace. It&#8217;s rather confusing to look at all of them&#8230; it&#8217;s not much better to look at a few of them close together. In the top left, we have the 1st 5th, 9th, and 13th (1,5,9,13)&#8230; the top right is 2,6,10,14&#8230; bottom left is 3,7,11,15&#8230; bottom right is 4,8,12,16:</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1107j3.png?w=656&#038;h=631" alt="g1107j3" title="g1107j3" width="656" height="631" class="alignnone size-full wp-image-2473" /></p>
<p>There are two more to show (17 &amp; 18) and I thought I show a few more adjacent pairs, too. I have added 1 &amp; 2 and 9 &amp; 10:</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1107k.png?w=662&#038;h=642" alt="g1107k" title="g1107k" width="662" height="642" class="alignnone size-full wp-image-2474" /></p>
<p>While I&#8217;m playing around&#8230;. What about four spectra centered around 500? And add them up, to get another metameric black.</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1107m.png?w=637&#038;h=287" alt="g1107m" title="g1107m" width="637" height="287" class="alignnone size-full wp-image-2475" /></p>
<p>Let me do one last thing.</p>
<h2>Graphs at 5 nm</h2>
<p>What would the bases look like if I used the full 5 nm tables? The fundamental depended on the reflected spctrum, but the bases depend only on my choice of color matching functions. <strong>So, let me show them for the 1931 CIE rgb bar tables at 5nm intervals.</strong></p>
<p>Here are the orthonormal basis vectors &#8220;v1&#8243; &#8212; at 20 nm on the left, 5 nm on the right:</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1107n.png?w=635&#038;h=287" alt="g1107n" title="g1107n" width="635" height="287" class="alignnone size-full wp-image-2476" /></p>
<p>And the dual basis vectors &#8220;E&#8221;:</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1107o.png?w=637&#038;h=285" alt="g1107o" title="g1107o" width="637" height="285" class="alignnone size-full wp-image-2477" /></p>
<p>And the dual basis &#8220;E&#8221; juxtaposed with the orthonormal basis &#8220;v1&#8243;:</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1107p.png?w=635&#038;h=284" alt="g1107p" title="g1107p" width="635" height="284" class="alignnone size-full wp-image-2478" /></p>
<p>I might as well do this for the XYZ color matching functions, too. <strong>The more detailed curves are from the 1931 xyz bar tables, at 5 nm intervals.</strong></p>
<p>Here are the orthonormal basis vectors &#8220;v1&#8243;:</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1107p2.png?w=634&#038;h=283" alt="g1107p2" title="g1107p2" width="634" height="283" class="alignnone size-full wp-image-2479" /></p>
<p>The dual basis vectors &#8220;E&#8221;:</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1107q.png?w=633&#038;h=279" alt="g1107q" title="g1107q" width="633" height="279" class="alignnone size-full wp-image-2480" /></p>
<p>And the dual basis &#8220;E&#8221; juxtaposed with the orthonormal basis &#8220;v1&#8243;:</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1107r.png?w=632&#038;h=282" alt="g1107r" title="g1107r" width="632" height="282" class="alignnone size-full wp-image-2481" /></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rip94550.wordpress.com/2462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rip94550.wordpress.com/2462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rip94550.wordpress.com/2462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rip94550.wordpress.com/2462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rip94550.wordpress.com/2462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rip94550.wordpress.com/2462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rip94550.wordpress.com/2462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rip94550.wordpress.com/2462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rip94550.wordpress.com/2462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rip94550.wordpress.com/2462/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&blog=2063738&post=2462&subd=rip94550&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://rip94550.wordpress.com/2009/11/08/color-decomposing-the-rgb-a-transpose-matrix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eda25c1223d5c501eea15aab3feba8ac?s=96&#38;d=identicon" medium="image">
			<media:title type="html">rip</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1107a.png" medium="image">
			<media:title type="html">g1107a</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1107b.png" medium="image">
			<media:title type="html">g1107b</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/10/cie-with-orig-rgb.png" medium="image">
			<media:title type="html">CIE with orig RGB</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1107c.png" medium="image">
			<media:title type="html">g1107c</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1107e.png" medium="image">
			<media:title type="html">g1107e</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1107f.png" medium="image">
			<media:title type="html">g1107f</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1107g.png" medium="image">
			<media:title type="html">g1107g</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1107h.png" medium="image">
			<media:title type="html">g1107h</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1107i.png" medium="image">
			<media:title type="html">g1107i</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1107j1.png" medium="image">
			<media:title type="html">g1107j</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1107j2.png" medium="image">
			<media:title type="html">g1107j2</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1107j3.png" medium="image">
			<media:title type="html">g1107j3</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1107k.png" medium="image">
			<media:title type="html">g1107k</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1107m.png" medium="image">
			<media:title type="html">g1107m</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1107n.png" medium="image">
			<media:title type="html">g1107n</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1107o.png" medium="image">
			<media:title type="html">g1107o</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1107p.png" medium="image">
			<media:title type="html">g1107p</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1107p2.png" medium="image">
			<media:title type="html">g1107p2</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1107q.png" medium="image">
			<media:title type="html">g1107q</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1107r.png" medium="image">
			<media:title type="html">g1107r</media:title>
		</media:content>
	</item>
		<item>
		<title>Color: decomposing the A transpose matrix and the reflected spectrum</title>
		<link>http://rip94550.wordpress.com/2009/11/02/color-decomposing-the-a-transpose-matrix-and-the-reflected-spectrum/</link>
		<comments>http://rip94550.wordpress.com/2009/11/02/color-decomposing-the-a-transpose-matrix-and-the-reflected-spectrum/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 00:57:59 +0000</pubDate>
		<dc:creator>rip</dc:creator>
				<category><![CDATA[color]]></category>
		<category><![CDATA[reciprocal basis dual basis]]></category>
		<category><![CDATA[SVD singular value decomposition linear algebra]]></category>

		<guid isPermaLink="false">http://rip94550.wordpress.com/?p=2428</guid>
		<description><![CDATA[This is the second post about the example on p. 160 of W&#38;S. Here&#8217;s the first.  (Incidentally, I am going to decompose the reflected spectrum into its fundamental and its residual. I do not think that they did this. Oh, this is what I did for Cohen&#8217;s toy example, but now it&#8217;s for real. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&blog=2063738&post=2428&subd=rip94550&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is the second post about the example on p. 160 of W&amp;S. <a href="http://rip94550.wordpress.com/2009/10/26/color-from-spectrum-to-tristimulus/">Here&#8217;s the first.</a>  (Incidentally, I am going to decompose the reflected spectrum into its fundamental and its residual. I do not think that they did this. Oh, this is <a href="http://rip94550.wordpress.com/2009/10/11/color-re-doing-cohens-example/">what I did for Cohen&#8217;s toy example</a>, but now it&#8217;s for real. Approximate, but for real.)</p>
<h2>review the XYZ for this</h2>
<p>Let&#8217;s review one case from the previous post: 1931 CIE at 20 nm intervals. As is my custom, I took a subset of their values &#8212; I did not average the numbers to account for the data I omitted. If this approximation isn&#8217;t good enough, simply go to 5 nm or 1 nm intervals.</p>
<p>Our ingredients were: a reflectance spectrum, an illiminant spectrum, and some choice of color matching functions. </p>
<p>Our results were a few sets of 3 numbers. The final result was called xyz &#8212; meaning the triple (x, y, z) &#8212; for plotting a point on the CIE chromaticity chart.</p>
<p>That result came from a triple denoted XYZ, which are values in XYZ color-space. That space has the advantage of being device-independent. We could &#8212; and will shortly &#8212; convert those values to an RGB color space, specifically the one defined by the CIE 1931 rgb bar (i.e. rbar, gbar, bbar) color-matching tables.</p>
<p>That XYZ result in turn came from a triple for which I have no convenient notation, but I keep saying without demonstration that that triple is the components of the fundamental of the reflected spectrum wrt the basis dual to the chosen color-matching functions. (Try saying that with a mouthfull of rocks!)</p>
<p>Let us go see that.</p>
<p>But first, let me review the calculations. Feel free to skip to the next section.</p>
<p>Our first computation is to get the reflected spectrum, which is the pointwise product of the illuminant spectrum and the reflectance spectrum. For this problem, the reflected spectrum is the perceived spectrum, the input to the eye of &#8220;the standard observer&#8221;. </p>
<p>Here is what the three of those spectra looked like:</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1102a.png?w=370&#038;h=366" alt="g1102a" title="g1102a" width="370" height="366" class="alignnone size-full wp-image-2452" /></p>
<p>For this post, I&#8217;ve decided to avoid red, green, and blue, except where it is really appropriate. The illuminant is shown in white, the reflectance spectrum is shown in purple, and the reflected spectrum is shown in yellow.</p>
<p>For this example, I had chosen the 1931 xyzbar tables for our color functions, and they looked like this:</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1102b.png?w=372&#038;h=360" alt="g1102b" title="g1102b" width="372" height="360" class="alignnone size-full wp-image-2451" /></p>
<p>Once again, I&#8217;ve changed the colors. X is orange, Y is white, and Z is yellow. It might help if you remember that the Y column of this A is nothing like green, being instead the &#8220;photopic response&#8221; &#8212; the total energy received by the cones &#8212; of the standard observer; white seems a sensible color for it.</p>
<p>BTW, we can tell that we are using XYZ (i.e. xbar, ybar, zbar tables) because these functions are never negative; we recall that each of the rbar, gbar, bbar color matching functions has some negative values.</p>
<p>Our second computation (or third, it doesn&#8217;t matter) should be to apply the matrix <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' /> &#8212; the (transpose of) the color matching functions A &#8212; to the reflected spectrum S, getting:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+S+%3D+%5C%7B356.817%2C%5C+354.641%2C%5C+271.109%5C%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ S = \{356.817,\ 354.641,\ 271.109\}' title='A^T\ S = \{356.817,\ 354.641,\ 271.109\}' class='latex' /> </p>
<p>I claim that these numbers are components of the fundamental of the reflected spectrum wrt the basis dual to <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' />. In Cohen&#8217;s notation, these 3 numbers are the components wrt the columns of the E matrix.</p>
<p>Please be patient. We&#8217;ll get there real soon now.</p>
<p>The other computation, whether we do it second or third, is to normalize things using the illuminant spectrum; that is, to set the white point (1,1,1) in our XYZ space.</p>
<p>We did this easily because the second column of A &#8212; the second row of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' /> &#8212; is the total cone response &#8212; the photopic response &#8212; of the standard observer.</p>
<p>Here&#8217;s the second row of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' /> applied to D65: 529.764</p>
<p>Now we move on to the fourth computation:  we divide our 3 values by that to get X,Y,Z. </p>
<p>XYZ = {0.673539, 0.669432, 0.511754}</p>
<p>NOTE that the XYZ values are in [0, 1]. These are tristimulus values in a sort-of color space. (Let&#8217;s see. It is not HSI, even though that middle number is an intensity. In fact, it does not directly specify a color; that&#8217;s done by a change-of-basis. Maybe I should call it a pre-color space? Maybe I&#8217;m getting carried away here.)</p>
<p>And then our fifth computation is to get x,y,z. Here&#8217;s the sum X+Y+Z: 1.85472</p>
<p>and we divide XYZ by it to get xyz values: xyz = {0.363148, 0.360933, 0.275919}.</p>
<p>Where was that on the chromaticity chart? The yellow dot.</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1102c.png?w=312&#038;h=296" alt="g1102c" title="g1102c" width="312" height="296" class="alignnone size-full wp-image-2450" /></p>
<p>All that was done in the previous post. Now let&#8217;s move on.</p>
<h2>Moving on.</h2>
<h2>Get the RGB</h2>
<p>Let&#8217;s do one last thing before putting this down. I want to get RGB values from these XYZ. I have in my hands, <a href="http://rip94550.wordpress.com/2009/10/18/color-the-1931-cie-color-matching-functions-and-chromaticity-chart/">and have shown you before</a>, the transition matrix T31 (having once needed the 1964 CIE, I have renamed some things)&#8230; </p>
<p><img src='http://l.wordpress.com/latex.php?latex=T31+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+2.76888+%26+1.75175+%26+1.13016+%5C%5C+1+%26+4.5907+%26+0.0601+%5C%5C+0+%26+0.05651+%26+5.59427%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='T31 = \left(\begin{array}{ccc} 2.76888 &amp; 1.75175 &amp; 1.13016 \\ 1 &amp; 4.5907 &amp; 0.0601 \\ 0 &amp; 0.05651 &amp; 5.59427\end{array}\right)' title='T31 = \left(\begin{array}{ccc} 2.76888 &amp; 1.75175 &amp; 1.13016 \\ 1 &amp; 4.5907 &amp; 0.0601 \\ 0 &amp; 0.05651 &amp; 5.59427\end{array}\right)' class='latex' /> </p>
<p>It treats XYZ as old, RGB as new, so we have</p>
<p>XYZ = T31 RGB,</p>
<p>so</p>
<p><img src='http://l.wordpress.com/latex.php?latex=RGB+%3D+T31%5E%7B-1%7D%5C+XYZ+%3D+%5C%7B0.133246%2C%5C+0.115616%2C%5C+0.0903103%5C%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='RGB = T31^{-1}\ XYZ = \{0.133246,\ 0.115616,\ 0.0903103\}\ ' title='RGB = T31^{-1}\ XYZ = \{0.133246,\ 0.115616,\ 0.0903103\}\ ' class='latex' />.</p>
<p>We&#8217;ll come back to these in the next post. These should be RGB color-space values using the 3 sources shown on the CIE chromaticity diagram; alternatively, these should be the RGB values computed directly from the rbar, gbar, bbar tables. That&#8217;s what I&#8217;ll confirm in the next color post.</p>
<p>Moving on, finally, there are two things we need to do. Actually, we might get away with only one of them, and that&#8217;s the dual basis, so let&#8217;s go get it first.</p>
<h2>getting the dual basis E.</h2>
<p>As I have said before, given a basis with transition matrix A we can find a basis with transition matrix E dual to it by requiring that the dot products of the vectors satisfy</p>
<p><img src='http://l.wordpress.com/latex.php?latex=E%5ET+A+%3D+I%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E^T A = I\ ' title='E^T A = I\ ' class='latex' />.</p>
<p>That is, by laying out the E vectors as rows and the A vectors as columns, we compute all of the possible dot products as <img src='http://l.wordpress.com/latex.php?latex=E%5ET+A%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E^T A\ ' title='E^T A\ ' class='latex' />.</p>
<p><b>A digression on dual bases</b></p>
<p>I&#8217;ll remind you that we are working in finite dimensional vector spaces, and the dual basis and reciprocal basis look exactly the same. (So if you need to review, look at my posts on reciprocal bases. See the tag cloud.) But I think it&#8217;s worthwhile to think of reciprocal bases as living in the same vector space, while dual bases live in a vector space V and its dual V*.</p>
<p>Oh, the dual space V* is the vector space of all linear functionals whose domain is V, i.e. all real-valued linear operators from V to R.</p>
<p>I&#8217;ll also remind you that although one usually starts with a basis in V and finds &#8220;the dual basis&#8221; in V*, we are going backwards. The rows of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' /> are a basis for V*, and we wish to find a matrix E whose columns are a basis for V, and more, a dual basis to the rows of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' />.</p>
<p>What a tangled knot! In my head I was going backwards, but I computed it the other way! What I really computed was a basis <img src='http://l.wordpress.com/latex.php?latex=E%5ET&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E^T' title='E^T' class='latex' /> dual to A &#8212; but that is the same as finding a basis E dual to <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' />. The two equations</p>
<p><img src='http://l.wordpress.com/latex.php?latex=E%5ET+A+%3D+I&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E^T A = I' title='E^T A = I' class='latex' /></p>
<p>and</p>
<p><img src='http://l.wordpress.com/latex.php?latex=A%5ET+E+%3D+I&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T E = I' title='A^T E = I' class='latex' /></p>
<p>are equivalent. I chose to solve the first instead of the second, even though I was thinking of the second. (Aside: it&#8217;s a very good thing that the dual of the dual space is the original space, for finite dimensional vector spaces.)</p>
<p>Finally, I suppose I should say again that although we often compute the dot product of two vectors (u and v, say) by writing one as a row (say u) and the other (v) as a column, we may view that matrix product as the effect of applying the linear functional u to the vector v. And what I did was the equivalent of talking about u&#8217;v but computing the equivalent, v&#8217;u.</p>
<p>Why might we view it that way? Among other things, we can apply u to v without even having a dot product!</p>
<p>Let&#8217;s return to finding the dual basis E.<br />
<b>end digression</b></p>
<p>If A is square and of full rank &#8212; i.e. we really do have a basis, hence a linearly independent set of vectors &#8212; then we can invert A and write</p>
<p><img src='http://l.wordpress.com/latex.php?latex=E%5ET+A+%3D+I&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E^T A = I' title='E^T A = I' class='latex' /></p>
<p><img src='http://l.wordpress.com/latex.php?latex=E%5ET+%3D+A%5E%7B-1%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E^T = A^{-1}\ ' title='E^T = A^{-1}\ ' class='latex' />.</p>
<p>In this case, however &#8212; with A our color matching functions &#8211;as we first saw in the first Cohen post, A is not square and therefore cannot possibly be invertible. The 3&#215;3 matrix A&#8217;A (<img src='http://l.wordpress.com/latex.php?latex=A%5ET+A%5C+%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T A\ )' title='A^T A\ )' class='latex' />, however, is invertible, and we construct the pseudo-inverse</p>
<p><img src='http://l.wordpress.com/latex.php?latex=%28A%27A%29%5E%7B-1%7D+A%5ET&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(A&#039;A)^{-1} A^T' title='(A&#039;A)^{-1} A^T' class='latex' /></p>
<p>and substitute it for <img src='http://l.wordpress.com/latex.php?latex=A%5E%7B-1%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^{-1}\ ' title='A^{-1}\ ' class='latex' />, getting</p>
<p><img src='http://l.wordpress.com/latex.php?latex=E%5ET+%3D+A+%28A%27A%29%5E%7B-1%7D%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E^T = A (A&#039;A)^{-1}\ ' title='E^T = A (A&#039;A)^{-1}\ ' class='latex' />.</p>
<p>(We remember that A&#8217;A is symmetric, i.e. its own transpose.)</p>
<p>BTW, it is very convenient to write the equation that way, because to check that we have a dual basis we want to compute <img src='http://l.wordpress.com/latex.php?latex=E%5ET+A%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E^T A\ ' title='E^T A\ ' class='latex' />. We might as well have found <img src='http://l.wordpress.com/latex.php?latex=E%5ET&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E^T' title='E^T' class='latex' /> first.</p>
<p>When we check it, we see that <img src='http://l.wordpress.com/latex.php?latex=E%5ET+A+%3D+I%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E^T A = I\ ' title='E^T A = I\ ' class='latex' />.</p>
<p>Let me call the three dual basis vectors E1, E2, E3, and let&#8217;s look at them. Here they are in columns&#8230;</p>
<p><img src='http://l.wordpress.com/latex.php?latex=E+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+0.000358806+%26+-0.000360371+%26+0.000884809+%5C%5C+0.00330737+%26+-0.00334373+%26+0.00929769+%5C%5C+0.0302172+%26+-0.0308581+%26+0.0885709+%5C%5C+0.0643748+%26+-0.0678399+%26+0.241909+%5C%5C+0.0116003+%26+-0.0190679+%26+0.237446+%5C%5C+-0.0843071+%26+0.0839105+%26+0.126398+%5C%5C+-0.190772+%26+0.216831+%26+0.060478+%5C%5C+-0.329572+%26+0.420346+%26+0.0457603+%5C%5C+-0.286455+%26+0.453811+%26+0.0276004+%5C%5C+-0.0869933+%26+0.321465+%26+-0.00307957+%5C%5C+0.209686+%26+0.0758441+%26+-0.0425853+%5C%5C+0.438522+%26+-0.150742+%26+-0.0706912+%5C%5C+0.418257+%26+-0.20126+%26+-0.0640185+%5C%5C+0.232068+%26+-0.121142+%26+-0.0349616+%5C%5C+0.0872125+%26+-0.0467666+%26+-0.0130635+%5C%5C+0.0249132+%26+-0.0134701+%26+-0.00372503+%5C%5C+0.00608984+%26+-0.00330711+%26+-0.000909677+%5C%5C+0.00157141+%26+-0.000868448+%26+-0.000233816+%5C%5C+0.000348975+%26+-0.000172577+%26+-0.0000531557+%5C%5C+0.0000923158+%26+-0.0000402793+%26+-0.0000143874+%5C%5C+0.+%26+0.+%26+0.%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E = \left(\begin{array}{ccc} 0.000358806 &amp; -0.000360371 &amp; 0.000884809 \\ 0.00330737 &amp; -0.00334373 &amp; 0.00929769 \\ 0.0302172 &amp; -0.0308581 &amp; 0.0885709 \\ 0.0643748 &amp; -0.0678399 &amp; 0.241909 \\ 0.0116003 &amp; -0.0190679 &amp; 0.237446 \\ -0.0843071 &amp; 0.0839105 &amp; 0.126398 \\ -0.190772 &amp; 0.216831 &amp; 0.060478 \\ -0.329572 &amp; 0.420346 &amp; 0.0457603 \\ -0.286455 &amp; 0.453811 &amp; 0.0276004 \\ -0.0869933 &amp; 0.321465 &amp; -0.00307957 \\ 0.209686 &amp; 0.0758441 &amp; -0.0425853 \\ 0.438522 &amp; -0.150742 &amp; -0.0706912 \\ 0.418257 &amp; -0.20126 &amp; -0.0640185 \\ 0.232068 &amp; -0.121142 &amp; -0.0349616 \\ 0.0872125 &amp; -0.0467666 &amp; -0.0130635 \\ 0.0249132 &amp; -0.0134701 &amp; -0.00372503 \\ 0.00608984 &amp; -0.00330711 &amp; -0.000909677 \\ 0.00157141 &amp; -0.000868448 &amp; -0.000233816 \\ 0.000348975 &amp; -0.000172577 &amp; -0.0000531557 \\ 0.0000923158 &amp; -0.0000402793 &amp; -0.0000143874 \\ 0. &amp; 0. &amp; 0.\end{array}\right)' title='E = \left(\begin{array}{ccc} 0.000358806 &amp; -0.000360371 &amp; 0.000884809 \\ 0.00330737 &amp; -0.00334373 &amp; 0.00929769 \\ 0.0302172 &amp; -0.0308581 &amp; 0.0885709 \\ 0.0643748 &amp; -0.0678399 &amp; 0.241909 \\ 0.0116003 &amp; -0.0190679 &amp; 0.237446 \\ -0.0843071 &amp; 0.0839105 &amp; 0.126398 \\ -0.190772 &amp; 0.216831 &amp; 0.060478 \\ -0.329572 &amp; 0.420346 &amp; 0.0457603 \\ -0.286455 &amp; 0.453811 &amp; 0.0276004 \\ -0.0869933 &amp; 0.321465 &amp; -0.00307957 \\ 0.209686 &amp; 0.0758441 &amp; -0.0425853 \\ 0.438522 &amp; -0.150742 &amp; -0.0706912 \\ 0.418257 &amp; -0.20126 &amp; -0.0640185 \\ 0.232068 &amp; -0.121142 &amp; -0.0349616 \\ 0.0872125 &amp; -0.0467666 &amp; -0.0130635 \\ 0.0249132 &amp; -0.0134701 &amp; -0.00372503 \\ 0.00608984 &amp; -0.00330711 &amp; -0.000909677 \\ 0.00157141 &amp; -0.000868448 &amp; -0.000233816 \\ 0.000348975 &amp; -0.000172577 &amp; -0.0000531557 \\ 0.0000923158 &amp; -0.0000402793 &amp; -0.0000143874 \\ 0. &amp; 0. &amp; 0.\end{array}\right)' class='latex' /> </p>
<p>&#8230; and here is what they look like (yellow, violet, orange in order):</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1102d.png?w=308&#038;h=280" alt="g1102d" title="g1102d" width="308" height="280" class="alignnone size-full wp-image-2449" /></p>
<p>If we multiply each of those spectra by our original numbers {356.817,354.641,271.109}&#8230;  and add the results.. we get</p>
<p>Vdb = {0.240105,2.51498,23.8508,64.4948,61.7507,33.9437,25.2229,43.8813,<br />
66.2108,82.129,90.1716,83.8477,60.51,30.3654,10.9919,3.10251,0.753495,<br />
0.189327,0.0489062,0.0147546,0.}</p>
<p>which looks like this (you can see that the orange one shrank a little compared to the other two):</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1102e.png?w=306&#038;h=278" alt="g1102e" title="g1102e" width="306" height="278" class="alignnone size-full wp-image-2448" /></p>
<p>where I have shown the scaled basis vectors (i.e. the scalar component times each vector), and added their sum in white.</p>
<p>Let&#8217;s look quickly at the reflected spectrum (in yellow) and that sum (in white):</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1102f.png?w=369&#038;h=365" alt="g1102f" title="g1102f" width="369" height="365" class="alignnone size-full wp-image-2447" /></p>
<p>They are quite different. What&#8217;s going on?</p>
<h2>What does the dual basis describe?</h2>
<p>Well, look at the long wavelengths of the white curve. We &#8212; i.e. the standard observer &#8212; can&#8217;t see that part of the reflected spectrum at all. Parts of the reflected spectrum are invisible to us.</p>
<p>Duh. Been there, done that. &#8220;Metameric black&#8221;.</p>
<p>What we have &#8212; a basis of 3 vectors &#8212; is a basis for the visible-to-us part of the reflected spectrum &#8212; i.e. a basis for what we called the fundamental. We have in fact found that part of the reflected spectrum which the standard observer actually sees; and by subtraction we could find what part of it is&#8211; let&#8217;s call it the residual &#8212; what we have called a metameric black. (&#8220;Metameric&#8221; because it is a nonzero spectrum; it is perceptually black, but it is not physically the absence of light.)</p>
<p>We have the fundamental; it&#8217;s that white curve. But I haven&#8217;t really proved that. </p>
<p>It&#8217;s not hard. By definition, each of the 3 vectors in the dual basis is in the pre-image of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' />. And, since <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' /> has 3 rows, it is of rank at most 3, so its pre-image is of dimension at most 3. In fact, we know that this <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' /> is of full rank, hence of rank 3, and therefore its pre-image is of dimension 3.</p>
<p>If the 3 dual basis vectors are linearly independent (i.e. the E matrix is of full rank 3), they span a 3D space which is a subspace of the 3D pre-image &#8212; so they span the entire pre-image.</p>
<p>And I&#8217;m certain that <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' /> being of full rank guarantees that the dual basis is of full rank. </p>
<p>But exactly how do I prove that? Oh, the pre-image of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' /> is the range of A, hence of dimension 3.</p>
<p>Do you find it convincing?</p>
<p>Let&#8217;s look at it another way. But remember that we really did just get the fundamental f of the reflected spectrum S, and we could compute the residual n by subtraction; the residual is the reflected spectrum minus the fundamental.</p>
<p>n = S &#8211; f.</p>
<h2>An orthonormal basis for fundamental spectra.</h2>
<p>For the other way, we need a really nice basis for the entire domain of the <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' /> matrix, one which decomposes its domain into nullspace and not-nullspace (i.e. nullspace and preimage of the range). But we know how to do that.</p>
<p>The SVD (Singular Value Decomposition).</p>
<p>We will get an orthonormal basis v1 for the pre-image of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' />, then a projection operator R onto that pre-image, then get the fundamental by applying the projection operator to the reflected spectrum.</p>
<p>First, let</p>
<p><img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+%3D+u%5C+w%5C+v%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ = u\ w\ v^T\ ' title='A^T\ = u\ w\ v^T\ ' class='latex' />.</p>
<p>(The first time I did this, I let <img src='http://l.wordpress.com/latex.php?latex=B+%3D+A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='B = A^T\ ' title='B = A^T\ ' class='latex' /> . Now we&#8217;re more experienced, but if you want to use B instead of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' />, feel free.)</p>
<p>Now, v is 21&#215;21. Then the leftmost 3 (= rank of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' />) columns of v are an orthonormal basis for the preimage of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' />, and the rightmost 18 (= 21-3) are an orthonormal basis for the nullspace of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' />.</p>
<p>Here are the leftmost 3 columns of v:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=v1+%3D+%5Cleft%28%5Cbegin%7Barray%7D%7Bccc%7D+-0.00201177+%26+0.00143737+%26+0.000374614+%5C%5C+-0.0210175+%26+0.0149756+%26+0.00335666+%5C%5C+-0.199597+%26+0.142652+%26+0.0305073+%5C%5C+-0.539263+%26+0.385948+%26+0.0611556+%5C%5C+-0.513526+%26+0.367224+%26+-0.00344907+%5C%5C+-0.258102+%26+0.159433+%26+-0.11971+%5C%5C+-0.121682+%26+-0.0133979+%26+-0.265642+%5C%5C+-0.134798+%26+-0.177324+%26+-0.481195+%5C%5C+-0.193185+%26+-0.30181+%26+-0.471062+%5C%5C+-0.246728+%26+-0.377774+%26+-0.254046+%5C%5C+-0.283178+%26+-0.410206+%26+0.0979204+%5C%5C+-0.273373+%26+-0.377298+%26+0.391838+%5C%5C+-0.201477+%26+-0.270573+%26+0.408489+%5C%5C+-0.102016+%26+-0.135415+%26+0.232377+%5C%5C+-0.0370629+%26+-0.0489598+%26+0.0880787+%5C%5C+-0.0104736+%26+-0.0138137+%26+0.0252276+%5C%5C+-0.00254533+%26+-0.00335417+%26+0.00617542+%5C%5C+-0.000641283+%26+-0.000842035+%26+0.00160261+%5C%5C+-0.000163267+%26+-0.00021855+%26+0.000343642+%5C%5C+-0.0000487128+%26+-0.0000661713+%26+0.0000876566+%5C%5C+0.+%26+0.+%26+0.%5Cend%7Barray%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='v1 = \left(\begin{array}{ccc} -0.00201177 &amp; 0.00143737 &amp; 0.000374614 \\ -0.0210175 &amp; 0.0149756 &amp; 0.00335666 \\ -0.199597 &amp; 0.142652 &amp; 0.0305073 \\ -0.539263 &amp; 0.385948 &amp; 0.0611556 \\ -0.513526 &amp; 0.367224 &amp; -0.00344907 \\ -0.258102 &amp; 0.159433 &amp; -0.11971 \\ -0.121682 &amp; -0.0133979 &amp; -0.265642 \\ -0.134798 &amp; -0.177324 &amp; -0.481195 \\ -0.193185 &amp; -0.30181 &amp; -0.471062 \\ -0.246728 &amp; -0.377774 &amp; -0.254046 \\ -0.283178 &amp; -0.410206 &amp; 0.0979204 \\ -0.273373 &amp; -0.377298 &amp; 0.391838 \\ -0.201477 &amp; -0.270573 &amp; 0.408489 \\ -0.102016 &amp; -0.135415 &amp; 0.232377 \\ -0.0370629 &amp; -0.0489598 &amp; 0.0880787 \\ -0.0104736 &amp; -0.0138137 &amp; 0.0252276 \\ -0.00254533 &amp; -0.00335417 &amp; 0.00617542 \\ -0.000641283 &amp; -0.000842035 &amp; 0.00160261 \\ -0.000163267 &amp; -0.00021855 &amp; 0.000343642 \\ -0.0000487128 &amp; -0.0000661713 &amp; 0.0000876566 \\ 0. &amp; 0. &amp; 0.\end{array}\right)' title='v1 = \left(\begin{array}{ccc} -0.00201177 &amp; 0.00143737 &amp; 0.000374614 \\ -0.0210175 &amp; 0.0149756 &amp; 0.00335666 \\ -0.199597 &amp; 0.142652 &amp; 0.0305073 \\ -0.539263 &amp; 0.385948 &amp; 0.0611556 \\ -0.513526 &amp; 0.367224 &amp; -0.00344907 \\ -0.258102 &amp; 0.159433 &amp; -0.11971 \\ -0.121682 &amp; -0.0133979 &amp; -0.265642 \\ -0.134798 &amp; -0.177324 &amp; -0.481195 \\ -0.193185 &amp; -0.30181 &amp; -0.471062 \\ -0.246728 &amp; -0.377774 &amp; -0.254046 \\ -0.283178 &amp; -0.410206 &amp; 0.0979204 \\ -0.273373 &amp; -0.377298 &amp; 0.391838 \\ -0.201477 &amp; -0.270573 &amp; 0.408489 \\ -0.102016 &amp; -0.135415 &amp; 0.232377 \\ -0.0370629 &amp; -0.0489598 &amp; 0.0880787 \\ -0.0104736 &amp; -0.0138137 &amp; 0.0252276 \\ -0.00254533 &amp; -0.00335417 &amp; 0.00617542 \\ -0.000641283 &amp; -0.000842035 &amp; 0.00160261 \\ -0.000163267 &amp; -0.00021855 &amp; 0.000343642 \\ -0.0000487128 &amp; -0.0000661713 &amp; 0.0000876566 \\ 0. &amp; 0. &amp; 0.\end{array}\right)' class='latex' /> </p>
<p>We should look at those. First alone:</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1102g.png?w=310&#038;h=279" alt="g1102g" title="g1102g" width="310" height="279" class="alignnone size-full wp-image-2446" /></p>
<p>&#8230; and then juxtaposed with the dual basis:<br />
<img src="http://rip94550.files.wordpress.com/2009/11/g1102g2.png?w=627&#038;h=282" alt="g1102g2" title="g1102g2" width="627" height="282" class="alignnone size-full wp-image-2442" /></p>
<p>OK, the orthonormal basis is different from the dual basis. (Actually, one pair look similar. I&#8217;ll take a look in a moment.) These vectors (spectra) are orthonormal, the dual basis is not. (To check that, just compute <img src='http://l.wordpress.com/latex.php?latex=v1%5ET+v1%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='v1^T v1\ ' title='v1^T v1\ ' class='latex' />; it&#8217;s a 3&#215;3 identity matrix.)</p>
<p>Let me look at the two basis vectors that were similar. From the dual basis, the first vector; from the orthonormal basis, the 3rd vector.</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1102h.png?w=308&#038;h=279" alt="g1102h" title="g1102h" width="308" height="279" class="alignnone size-full wp-image-2443" /></p>
<p>Interesting. I do not know that this result has any significance, but what&#8217;s the point of drawing pictures and not looking at them?</p>
<p>Let&#8217;s continue.</p>
<h2>The projection operator R.</h2>
<p>Having an orthonormal basis for the preimage of A^T, we know that we can construct a projection operator R from the domain of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' /> onto the preimage; we just take the product of v1 and <img src='http://l.wordpress.com/latex.php?latex=v1%5ET&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='v1^T' title='v1^T' class='latex' /> in the other order:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=R+%3D+v1%5C+v1%5ET&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='R = v1\ v1^T' title='R = v1\ v1^T' class='latex' /></p>
<p>It&#8217;s 21&#215;21, so I&#8217;m not going to show it to you. But, for checking, I&#8217;ll show you the first column:</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1102-r.png?w=139&#038;h=423" alt="g1102 R" title="g1102 R" width="139" height="423" class="alignnone size-full wp-image-2441" /></p>
<p>And I&#8217;ll tell you that the last column is identically 0.</p>
<h2>The fundamental, again? and more.</h2>
<p>So. Apply the projection operator R to the reflected spectrum S to get the fundamental f&#8230; </p>
<p>R S = f = {0.240105,2.51498,23.8508,64.4948,61.7507,33.9437,25.2229,43.8813,<br />
66.2108,82.129,90.1716,83.8477,60.51,30.3654,10.9919,3.10251,0.753495,<br />
0.189327,0.0489062,0.0147546,0.}</p>
<p>and subtract to get the residual n = S &#8211; f:</p>
<p>S &#8211; f = n = {4.85989,26.2994,19.1132,-14.6673,-7.32707,18.6749,27.0703,15.2259,<br />
3.00644,-13.029,-23.7822,-12.7477,13.5965,41.0307,59.1247,63.6874,<br />
60.2497,52.1091,59.2801,33.022,39.625}</p>
<p>We can check that n is in the nullspace of <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' /> by computing <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+n%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ n\ ' title='A^T\ n\ ' class='latex' />:</p>
<p><img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+n+%3D+%5C%7B-1.01618%2A10%5E-13%2C%5C+-1.09023%2A10%5E-13%2C%5C+4.93919%2A10%5E-15%5C%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ n = \{-1.01618*10^-13,\ -1.09023*10^-13,\ 4.93919*10^-15\}' title='A^T\ n = \{-1.01618*10^-13,\ -1.09023*10^-13,\ 4.93919*10^-15\}' class='latex' /></p>
<p>We should also check that the fundamental has the same 3 values as the entire reflected spectrum. That is, we had</p>
<p><img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+S+%3D+%5C%7B356.817%2C%5C+354.641%2C%5C+271.109%5C%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ S = \{356.817,\ 354.641,\ 271.109\}' title='A^T\ S = \{356.817,\ 354.641,\ 271.109\}' class='latex' /></p>
<p>for <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' /> applied to the reflected spectrum. If we now apply <img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ ' title='A^T\ ' class='latex' /> to the fundamental, we get</p>
<p><img src='http://l.wordpress.com/latex.php?latex=A%5ET%5C+f+%3D+%5C%7B356.817%2C%5C+354.641%2C%5C+271.109%5C%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T\ f = \{356.817,\ 354.641,\ 271.109\}' title='A^T\ f = \{356.817,\ 354.641,\ 271.109\}' class='latex' /></p>
<p>The same. Of course. (I hope you think so.)</p>
<p>Let&#8217;s look at the decomposition. The reflected spectrum is in yellow, the fundamental in white, and their difference n, the residual, is in black.</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1102i.png?w=369&#038;h=347" alt="g1102i" title="g1102i" width="369" height="347" class="alignnone size-full wp-image-2445" /></p>
<p>Yes, where the fundamental is zero, the reflected spectrum and the residual coincide. </p>
<p>At the risk of annoying you, let me emphasize: the standard observer (at 20 nm intervals!) would perceive the yellow spectrum and the white spectrum as being exactly the same color. We would say they are metameric spectra. He is actually perceiving the yellow spectrum, but if we somehow generated the white one, it would look the same to him.</p>
<p>And now we should compare the fundamental with the vector Vdb constructed from the dual basis. We could look at the numbers, of course, but an easy way to see that they coincide is to plot only points for Vdb and only a piecewise-linear curve for the fundamental.</p>
<p><img src="http://rip94550.files.wordpress.com/2009/11/g1102j.png?w=368&#038;h=368" alt="g1102j" title="g1102j" width="368" height="368" class="alignnone size-full wp-image-2444" /></p>
<p>They are the same.</p>
<p>Thus we confirm that the 3 values <img src='http://l.wordpress.com/latex.php?latex=A%5ET+S&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A^T S' title='A^T S' class='latex' /> are the components of the fundamental (not of the entire reflected spectrum) wrt the basis E dual to A.</p>
<p><strong>The dual basis tells us what those first 3 numbers mean</strong>, and would let us construct the fundamental, and thence the residual.</p>
<p>The orthonormal basis, on the other hand, let us compute a projection operator, which gets us the fundamental by applying the projection operator to the reflected spectrum.</p>
<p>If i could only do one of these, it would be to construct the dual basis rather than the projection operator&#8230; but computing power is cheap and there&#8217;s no reason to do only one of these.</p>
<p>Incidentally, we could have simply appled the Gram-Schmidt orthogonalization procedure to the dual basis&#8230; but I really like having a basis for the null space, and that&#8217;s what the rest of the v matrix from the SVD got me.</p>
<p>I&#8217;m going to wait, however, before looking at the basis vectors for the null space.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rip94550.wordpress.com/2428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rip94550.wordpress.com/2428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rip94550.wordpress.com/2428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rip94550.wordpress.com/2428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rip94550.wordpress.com/2428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rip94550.wordpress.com/2428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rip94550.wordpress.com/2428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rip94550.wordpress.com/2428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rip94550.wordpress.com/2428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rip94550.wordpress.com/2428/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&blog=2063738&post=2428&subd=rip94550&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://rip94550.wordpress.com/2009/11/02/color-decomposing-the-a-transpose-matrix-and-the-reflected-spectrum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eda25c1223d5c501eea15aab3feba8ac?s=96&#38;d=identicon" medium="image">
			<media:title type="html">rip</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1102a.png" medium="image">
			<media:title type="html">g1102a</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1102b.png" medium="image">
			<media:title type="html">g1102b</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1102c.png" medium="image">
			<media:title type="html">g1102c</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1102d.png" medium="image">
			<media:title type="html">g1102d</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1102e.png" medium="image">
			<media:title type="html">g1102e</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1102f.png" medium="image">
			<media:title type="html">g1102f</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1102g.png" medium="image">
			<media:title type="html">g1102g</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1102g2.png" medium="image">
			<media:title type="html">g1102g2</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1102h.png" medium="image">
			<media:title type="html">g1102h</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1102-r.png" medium="image">
			<media:title type="html">g1102 R</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1102i.png" medium="image">
			<media:title type="html">g1102i</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2009/11/g1102j.png" medium="image">
			<media:title type="html">g1102j</media:title>
		</media:content>
	</item>
	</channel>
</rss>