I had an exam today. One question inspired me. Let \(\mathbf{E}_n\hspace{-3pt}: n\times n\) and \(\mathbf{e}_{ij}=1\). Then the inverse of \(\mathbf{A}_n = \mathbf{E}_n - \mathbf{I}_n\) is \(\mathbf{A}_n^{-1} = \frac1{n-1}\mathbf{E}_n-\mathbf{I}_n\) if \(2\leq n\). There are two interesting things about this: The inverse can be expressed using matrix operations, and the matrix operations can be used to verify that \(\mathbf{A}^{-1}\) is actually an inverse.
To verify the result, note first that \(\mathbf{E}_n^2=n\mathbf{E}_n\). This identity can be seen as the workhorse of the method. Check that \(\mathbf{A}\mathbf{A}^{-1}=\mathbf{I}\).
\[\begin{align}\mathbf{A}_n^\phantom{-1}\hspace{-4pt}\mathbf{A}_n^{-1} &= (\mathbf{E}_n - \mathbf{I}_n)\left(\frac1{n-1}\mathbf{E}_n-\mathbf{I}_n\right) \\&= \frac n{n-1}\mathbf{E}_n-\mathbf{E}_n-\frac1{n-1}\mathbf{E}_n+\mathbf{I}_n = \mathbf{I}_n\end{align}\]
I'll have to think about this some more sometime. Can other simple matrices be inverted and expressed using matrix operations? What are some useful workhorses? Why has no one told me about this before?
Math Equations
Monday, October 27, 2014
Tuesday, August 12, 2014
Saturday, August 2, 2014
An open question
Is there a nonnegative function \(f\) such that \(\displaystyle\int\limits_0^\infty \cfrac{f(x)}{\int\limits_x^\infty f(y)\; dy} dx\) exists?
Saturday, July 26, 2014
The area of a triangle a, b, c
This week, I encountered the following problem in my textbook: Show that the area of a triangle ABC is given by \(\sqrt{s(s-a)(s-b)(s-c)}\), where \(s = (a+b+c)/2\) is the semi-perimeter of the triangle. I want to share my solution because it shows how you can avoid time-consuming algebra by factoring instead of expanding.
\[\small\begin{array}{l}
A = \sqrt{A^2}\\
\quad A^2 = \left(\frac{bh}{2}\right)^2 = \frac{b^2h^2}{4}\\
\quad\quad h^2 = \begin{cases} c^2-(c\cos{A})^2 \\ a^2-(b-c\cos{A})^2 \end{cases}\\
\quad\quad c\cos{A} = \frac{c^2+b^2-a^2}{2b}\\
\quad\quad h^2 = c^2 - \left(\frac{c^2+b^2-a^2}{2b}\right)^2 = \Pi\left(c \pm \frac{c^2+b^2-a^2}{2b}\right) = \Pi\frac{2bc \pm (c^2+b^2-a^2)}{2b}\\
\quad \begin{aligned}A^2 &= \cfrac{(2bc + (c^2+b^2-a^2))(2bc - (c^2+b^2-a^2))}{16} \\&= \cfrac{((b+c)^2-a^2)(a^2 - (b-c)^2)}{16} \\&= \cfrac{(b+c+a)(b+c-a)(a-b+c)(a+b-c)}{2\cdot2\cdot2\cdot2} \\&= \cfrac{a+b+c}{2}\cdot\cfrac{a+b+c-2a}{2}\cdot\cfrac{a+b+c-2b}{2}\cdot\cfrac{a+b+c-2c}{2} \\&= s(s-a)(s-b)(s-c)\end{aligned}\\
A = \sqrt{s(s-a)(s-b)(s-c)}
\end{array}\]
\[\small\begin{array}{l}
A = \sqrt{A^2}\\
\quad A^2 = \left(\frac{bh}{2}\right)^2 = \frac{b^2h^2}{4}\\
\quad\quad h^2 = \begin{cases} c^2-(c\cos{A})^2 \\ a^2-(b-c\cos{A})^2 \end{cases}\\
\quad\quad c\cos{A} = \frac{c^2+b^2-a^2}{2b}\\
\quad\quad h^2 = c^2 - \left(\frac{c^2+b^2-a^2}{2b}\right)^2 = \Pi\left(c \pm \frac{c^2+b^2-a^2}{2b}\right) = \Pi\frac{2bc \pm (c^2+b^2-a^2)}{2b}\\
\quad \begin{aligned}A^2 &= \cfrac{(2bc + (c^2+b^2-a^2))(2bc - (c^2+b^2-a^2))}{16} \\&= \cfrac{((b+c)^2-a^2)(a^2 - (b-c)^2)}{16} \\&= \cfrac{(b+c+a)(b+c-a)(a-b+c)(a+b-c)}{2\cdot2\cdot2\cdot2} \\&= \cfrac{a+b+c}{2}\cdot\cfrac{a+b+c-2a}{2}\cdot\cfrac{a+b+c-2b}{2}\cdot\cfrac{a+b+c-2c}{2} \\&= s(s-a)(s-b)(s-c)\end{aligned}\\
A = \sqrt{s(s-a)(s-b)(s-c)}
\end{array}\]
Sunday, June 22, 2014
A rational sinusoidal function
It is easy to get confused by the irrational nature of the sin function. One might think that you need irrational numbers to create a sinusoidal graph, but that's false. Consider \(z_a = (a+i)^2/(a^2+1) \quad (a \in \mathrm{Rat})\). It lies on the unit circle in the complex plane and its coordinates are rational. Here is a rational sinusoidal function: \(f(x) = \operatorname{Im}(z_a^x) \quad (x \in \mathrm{Int})\). This is what it may look like:
However, it has some irrational properties. According to WolframAlpha, \(\lim_{x\to\infty}z_x^x = e^{2i}\). The function \(f\) is probably injective for some values of \(a\).
Monday, June 16, 2014
Ugliest sequence ever
Let \(a_0 = 0, a_2 = 1\) and \(a_n = a_{\left\lfloor{n/2}\right\rfloor} + a_{\left\lfloor{n/2}\right\rfloor+1}\).
Wednesday, June 4, 2014
Basic interpolation
Say we've got \(n\) points through which we need to fit a polynomial. We'll solve the problem iteratively. First we'll find a polynomial that passes through one point, then we'll add a term to that polynomial to make it pass through another point, and then a third point will come into play -- etc.
Let the given points be \(\begin{array}{c}n\\(x_i, y_i)\\i=1\end{array}\) and let \(p_k\) denote the \(k\)th polynomial that we find. \(p_n\) is our final answer. \(p_k = \begin{cases}y_1 & \text{ if } k = 1\\ p_{k-1} + (y_k - p_{k-1}\bigg|_{x=x_k}) \prod_{i=1}^{k-1} \frac{x - x_i}{x_k - x_i} & \text{ if } 1 < k \leq n\end{cases}\).
Let the given points be \(\begin{array}{c}n\\(x_i, y_i)\\i=1\end{array}\) and let \(p_k\) denote the \(k\)th polynomial that we find. \(p_n\) is our final answer. \(p_k = \begin{cases}y_1 & \text{ if } k = 1\\ p_{k-1} + (y_k - p_{k-1}\bigg|_{x=x_k}) \prod_{i=1}^{k-1} \frac{x - x_i}{x_k - x_i} & \text{ if } 1 < k \leq n\end{cases}\).
Subscribe to:
Posts (Atom)



