10.29.05

Two talks and LaTeX Beamer

Posted in computers, LaTeX at 1:09 pm by Haris

In the last couple of weeks I have been busy preparing for and giving two talks. One was a talk to the math department at Chicago State University, on stuff related to my research. The second was a general audience science colloquium here at Illinois Wesleyan University. They both have been great experiences, and have boosted my confidence about giving talks in front of faculty, something I’ve always been afraid of. For both presentations I used the wonderful LaTeX class called Beamer. The beamer class allows you to create powerpoint style presentations, with slides and overlays, straight from LaTeX. It is pretty easy for anyone with basic LaTeX experience to use. You can find the pdf files I used for my two talks here. I found out about it through my use of TextMate, when someone added snippets for it to the LaTeX class. In other words, I got very lucky :-) .

Later

09.21.05

Rearranging the Alternating Harmonic Series

Posted in Mathematics at 1:28 pm by Haris

One of my favorite theorems in calculus is Riemann’s theorem on conditionally convergent series. To remind you, the theorem says that a conditionally convergent series (i.e. a series that converges only because of the presence of signs, and the cancellation that follows) can be rearranged so that it converges to our favorite real number! What is so wonderful about it is that the statement is unbelievably surprising: The same set of numbers can be made to add up to any number we want, simply by placing them in a different order! On the other hand the proof, which you can find on almost any decent Calculus book, is really not that hard. The brilliance is in figuring out that such a statement could possibly be true.

Read the rest of this entry »

06.29.05

LatexRender and ampersands problems

Posted in WordPress, Mathematics at 8:29 pm by Haris

I’ve been using LatexRender for a while, and I must say it works wonderfully. I had hit a slight snag, which I figured out with the help of Sameer (well ok, that means he did all the work). It had to do with the fact that, by default, wordpress changes all ampersands to their escape codes, namely &038;. This is quite irritating, since if you are to have any matrices in the LaTeX code, it is bound to involve lots of ampersands to separate the columns, so you end up with lots of &038;’s floating around, quite irritating. The solution turns out to be fairly simple, and already implemented in LatexRender, albeit commented out, and it simply amounts to replacing all those &038;’s with &’s. What you have to do is locate your latex.php file, which in my case was in a folder called latexrender, and uncomment the lines around line 60, that have text like:

//      $latex_formula = str_replace("&","&",$latex_formula);
//      $latex_formula = str_replace("&","&",$latex_formula);

and also change #38 to #038, resulting in:

$latex_formula = str_replace("&","&",$latex_formula);
$latex_formula = str_replace("&","&",$latex_formula);

It should now work fine, once you remove the cached images located usually in the latexrender/pictures directory.

Later

06.28.05

Determinants and the cross product

Posted in Mathematics at 10:27 pm by Haris

I haven’t been talking about math yet in this blog, so now it’s time to start. Here’s an interesting little tidbit I realized during teaching this week. I was telling my students about the cross product of vectors, and defined it as a determinant:

a\times b=\begin{vmatrix}\mathbf{i}&\mathbf{j}&\mathbf{k}\\ 
a_1&a_2&a_3\\ 
b_1&b_2&b_3
\end{vmatrix}

where as usual \mathbf{i},\mathbf{j},\mathbf{k} are the standard unit vectors in 3-space. Now, the cool thing about this definition is that it shows immediately why a\times b is perpendicular to both a and b. For that, one simply has to check that the dot product of it with each of them is 0. But the dot product with, say, a amounts to computing the determinant:

\begin{vmatrix}a_1&a_2&a_3\\ 
a_1&a_2&a_3\\ 
b_1&b_2&b_3
\end{vmatrix}

which of course is zero since two rows of the determinant are the same. Now, one my students asked me: Well, what about other dimensions? I was about to give them the usual answer about there being a mysterious reason why this would work only in dimension 3, but then I realized that in fact this works in all dimensions. If you have n-1 vectors in dimension n, then you can immediately produce a vector perpendicular to them as an n by n determinant:

\begin{vmatrix}\mathbf{e_1}&\mathbf{e_2}&\mathbf{e_3}&\cdots&\mathbf{e_n}\\ 
a_{1,1}&a_{1,2}&a_{1,3}&\cdots&a_{1,n}\\
a_{2,1}&a_{2,2}&a_{2,3}&\cdots&a_{2,n}\\
\vdots&\vdots&\vdots&\vdots&\vdots\\
a_{n-1,1}&a_{n-1,2}&a_{n-1,3}&\cdots&a_{n-1,n}
\end{vmatrix}

The exact same reasoning shows that this vector is perpendicular to all the n-1 vectors comprising the rows of this determinant. An amusing special case is when n=2, in which case we get that the vector in the plane perpendicular to the vector \langle a,b\rangle is none other than \begin{vmatrix}i&j\\ a&b\end{vmatrix}=\langle b,-a\rangle! So clearly the magic of the cross product is not simply in it being perpendicular to the original vectors.

It’s stuff like that that makes me love teaching math!

Later

· Next entries »