Phorgy Phynance

A Note on Discrete Helmholtz Decomposition

with one comment

The following is a note I sent to my PhD advisor, Professor Weng Cho Chew, on September 13, 2011 after a discussion over dinner as he was headed back to UIUC from a 4-year stint as the Dean of Engineering at the University of Hong Kong.

Decomposing Finite Dimensional Inner Product Spaces

Given finite-dimensional inner product spaces $U$, $V$  and a linear map $A:U\to V$, the adjoint map $A^\dagger: V\to U$ is the unique linear map satisfying the property

$\langle Au,v\rangle = \langle u,A^\dagger v\rangle$

for all $u\in U$ and $v\in V$.

In this section, we show that $V$ can be decomposed into two orthogonal subspaces

$V = \text{im} A\oplus \text{ker} A^\dagger$

This is a fairly simple exercise as any finite-dimensional inner product space can be decomposed into a subspace and its orthogonal complement, i.e.

$V = \text{im} A \oplus (\text{im} A)^\perp$.

The only thing to show is that $(\text{im} A)^\perp = \text{ker} A^\dagger$.

To do this, note whenever $v\in (\text{im} A)^\perp$, then

$\langle A u, v\rangle = \langle u,A^\dagger v\rangle = 0$

for all $u\in U$. Thus, $v$ is also in $\text{ker} A^\dagger$, i.e. $(\text{im} A)^\perp \subset \text{ker} A^\dagger$. Similarly, whenever $v\in\text{ker} A^\dagger$, then

$\langle u,A^\dagger v\rangle = \langle A u, v\rangle = 0$

for all $u\in U$. Thus, $v$ is also in  $(\text{im} A)^\perp$, i.e. $\text{ker} A^\dagger \subset (\text{im} A)^\perp$. Since both $(\text{im} A)^\perp \subset \text{ker} A^\dagger$ and $\text{ker} A^\dagger \subset (\text{im} A)^\perp$, it follows that $(\text{im} A)^\perp = \text{ker} A^\dagger$.

Hodge-Helmholtz Decomposition

Given finite-dimensional inner product spaces $U$, $V$ ,$W$  and linear maps $A:U\to V$, $B:V\to W$ such that $B\circ A = 0$, we wish to show that the inner product space $V$ may be decomposed into three orthogonal subspaces

$V = \text{im} A\oplus\text{im} B^\dagger\oplus\text{ker} \Delta$,

where $\Delta = A\circ A^\dagger + B^\dagger\circ B$.

To show this, note that if $v\in\text{ker}\Delta$, then

$\langle \Delta v,v\rangle = \langle A^\dagger v,A^\dagger v\rangle + \langle B v, B v\rangle = 0,$

but this implies $v\in \text{ker} A^\dagger$ and $v\in\text{ker} B$. Conversely, if $v\in \text{ker} A^\dagger$ and $v\in\text{ker} B$, then $v$  is trivially in $\text{ker}\Delta$. In other words,

$\text{ker} \Delta = \text{ker} A^\dagger \cap \text{ker} B.$

Finally, since $B\circ A = 0$, we also have $A^\dagger\circ B^\dagger = 0$. Consequently, when $v\in\text{im} B^\dagger$, then $v\in\text{ker} A^\dagger$ so

$\text{im} B^\dagger \subset \text{ker} A^\dagger.$

Applying the decomposition from the previous section twice, we conclude that

$V = \text{im} A\oplus \text{ker} A^\dagger$

and since $\text{im} B^\dagger\subset \text{ker} A^\dagger$, it follows that

$\text{ker} A^\dagger = \text{im} B^\dagger\oplus \text{ker}A^\dagger\cap\text{ker} B$

which may be expressed simply as

$\text{ker} A^\dagger = \text{im} B^\dagger \oplus \text{ker} \Delta.$

Putting this together we see the desired Hodge-Helmholtz decomposition

$V = \text{im} A\oplus\text{im} B^\dagger\oplus\text{ker}\Delta.$

Computational Electromagnetics

The preceding discussion is quite general and holds for any finite-dimensional inner product spaces $U$, $V$, $W$ and any linear maps $A:U\to V$, $B:V\to W$ satisfying $B\circ A = 0$. In this section, we specialize to computational electromagnetics.

Consider a discretization of a surface $S$ consisting of $N_0$ vertices, $N_1$ directed edges, and $N_2$ oriented triangular faces. If we associate a degree of freedom to each vertex, the span of these degrees of freedom form an $N_0$-dimensional vector space $V_0$. Associating a degree of freedom to each directed edge forms an $N_1$-dimensional vector space $V_1$ and associating a degree of freedom to each oriented face forms an $N_2$-dimensional vector space $V_2$. For concreteness, vectors in $V_0$ will be expanded via

\begin{aligned}\phi = \sum_{i=1}^{N_0} \phi_i \mathbf{v}_i \in V_0,\end{aligned}

where $\phi_i$ denotes the degree of freedom on the ith vertex, vectors in $V_1$ will be expanded via

\begin{aligned}\alpha = \sum_{i=1}^{N_1} \alpha_i \mathbf{e}_i\in V_1,\end{aligned}

where $\alpha_i$ denotes the degree of freedom on the ith directed edge, and vectors in $V_2$ will be expanded via

\begin{aligned}\beta = \sum_{i=1}^{N_2} \beta_i \mathbf{f}_i\in V_2,\end{aligned}

where $\beta_i$ denotes the degree of freedom on the ith oriented face.

To turn $V_0$, $V_1$, and $V_2$ into inner product spaces, we need to define three respective inner products. This can be done by defining three sets of basis functions $B_0$, $B_1$, and $B_2$. $B_0$ and $B_2$ take values defined at vertices and faces, respectively, and maps these to functions defined over each face. Similarly, $B_1$ takes values defined along each edge and maps these to vector fields defined over each face.

The basis functions linearly turn vectors in $V_0$, $V_1$, and $V_2$ into functions and vector fields defined over the surface  via

\begin{aligned}\phi = \sum_{i=1}^{N_0} \phi_i \mathbf{v}_i\quad\implies\quad B_0(\phi) = \sum_{i=1}^{N_0} \phi_i B_0(\mathbf{v}_i),\end{aligned}

\begin{aligned}\alpha = \sum_{i=1}^{N_1} \alpha_i \mathbf{e_i} \quad\implies\quad B_1(\alpha) = \sum_{i=1}^{N_1} \alpha_i B_1(\mathbf{e}_i),\end{aligned}

and

\begin{aligned}\beta = \sum_{i=1}^{N_2} \beta_i \mathbf{f}_i \quad\implies\quad B_2(\beta) = \sum_{i=1}^{N_2} \beta_i B_2(\mathbf{f}_i).\end{aligned}

The inner products may then be defined in terms of basis functions via

\begin{aligned}(M_0)_{i,j} = \langle\mathbf{v}_i,\mathbf{v}_j\rangle_0 = \int_S B_0(\mathbf{v}_i) B_0(\mathbf{v}_j) dA,\end{aligned}

\begin{aligned}(M_1)_{i,j} = \langle\mathbf{e}_i,\mathbf{e}_j\rangle_1 = \int_S B_1(\mathbf{e}_i)\cdot B_1(\mathbf{e}_j) dA,\end{aligned}

and

\begin{aligned}(M_2)_{i,j} = \langle \mathbf{f}_i,\mathbf{f}_j\rangle_2 = \int_S B_2(\mathbf{f}_i) B_2(\mathbf{f}_j) dA.\end{aligned}

Letting $[\phi]$, $[\alpha]$, and $[\beta]$ denote column matrix representations of vectors in $V_0$, $V_1$, and ,$V_2$ the inner products may be expressed in terms of matrix-vector products via

$\langle \phi,\phi'\rangle_0 = [\phi]^t [M_0] [\phi'],$

$\langle \alpha,\alpha'\rangle_1 = [\alpha]^t [M_1] [\alpha'],$

and

$\langle \beta,\beta'\rangle_2 = [\beta]^t [M_2] [\beta'].$

The matrix-vector representation is helpful for explicitly expressing the adjoint of a linear map $A:V_0\to V_1$ via

$\langle A\phi,\alpha\rangle_1 = [\phi]^t[M_0]\left([M_0]^{-1} [A]^t [M_1] \right) [\alpha] = [\phi]^t [M_0] [A^\dagger] [\alpha] = \langle \phi,A^\dagger \alpha\rangle_0$

so that

$[A^\dagger] = [M_0]^{-1} [A]^t [M_1].$

Similarly, the adjoint of a linear map $B:V_1\to V_2$ may be represented in matrix form via

$[B^\dagger] = [M_1]^{-1} [B]^t [M_2].$

In computational electromagnetics, a fundamental linear map is the exterior derivative, which will be denoted $d_i:V_i\to V_{i+1}$ for $i = 0,1$. Since $V_0$, $V_1$, and $V_2$ are finite dimensional, $d_i$ has a sparse matrix representation $[d_i]$.

For the sake of interpretation, the matrix $[d_0]$ may be thought of as the gradient along the respective directed edge, $[d_1]$ may be thought of as the curl of the edge vector field around each oriented face, $[d_1^\dagger]$ may be thought of as the transverse gradient[1] across each directed edge, and $[d_0^\dagger]$ may be thought of as the divergence of the edge vector field.

Critically note,

$[d_1][d_0] = 0.$

As a result, we have the inner product space of edge vector fields $V_1$ decomposes into

$V_1 = \text{im} d_0\oplus \text{im} d_1^\dagger\oplus \text{ker} \Delta,$

where $\Delta = d_0\circ d_0^\dagger + d_1^\dagger\circ d_1$. In other words, any edge vector $v\in V_1$ may be expressed as

$v = d_0\phi + d_1^\dagger\beta + h$

for some $\phi\in V_0$, $\beta\in V_2$, and $h\in \text{ker} \Delta$. The above may be thought of as a discrete version of Hodge-Helmholtz decomposition for computational electromagnetics.

References

This note is an informal (and quickly drafted) document intended to help explain Hodge-Helmholtz decomposition in computational electromagnetics. No claim of any original content is intended and a proper literature search was not performed. For pointers to some related material with more complete references, see the following:

[1] If the degree of freedom associated to an oriented face is interpreted as the magnitude of vector normal to the face,  may be thought of as the curl of this normal vector field along the directed edge.

Written by Eric

March 17, 2012 at 6:36 pm

Posted in Uncategorized

S&P 500 PE Ratio: 1950-2008

I just threw this chart together out of curiosity. The color represents the S&P 500 PE ratio

In principle, you may expect the scatter plot to stay within a “normal cone”. At the end of Q2 ’09, the PE ratio was 122 (i.e. WAY OVER TO THE LEFT).

What is the path of least resistant to get back to “normal”?

• Down and to the right?
• Flat and to the right?
• Up and to the right?

I think the most likely path is gradually up and to the right (which is what inflation would do). What do you think?

Technical note: I capped the colors between a PE ratio range of 10-50 to emphasize the gradation.

Disclosure: I’m long BGU, EDC, ERX, and TMV.

Written by Eric

November 11, 2009 at 2:52 pm

Posted in Uncategorized

Richter Scales rock again!!

[Update: My friend said they had over 300K views in the first 3 days since they posted it!! It has now been viewed over 590K times. Amazing.]

Here is the latest from the Richter Scales!! Woohoo!!

blog even if you’re wrong

Umm 😀

Written by Eric

December 5, 2007 at 7:39 pm

Posted in Uncategorized

MSN: The dollar’s perfect storm worsens

with one comment

As usual, it is waaayy past my bedtime and I’m STILL groggy from this cold, so what do I do? Post another article of course!

On my way to bed, I just thought I’d point out a good article on MSN Money:

The dollar’s perfect storm worsens

What is the ECB going to do? Raise rates? Not such an easy call. I’m learning that it is important distinguish what monetary policymakers SHOULD be doing and what they actually WILL do. I think the ECB SHOULD raise rates, just like I thought the Fed should have raised rates. Will they? I doubt it. The credit crunch is too severe and I think fears of a financial market meltdown trump inflation fears. Plus, factors that are weakening the USD are strengthening the EUR, so inflation is the lessor of evils in Eurozone in my opinion. I think ECB stays where they are at 4%. The Fed SHOULD hold rates, but I’ve lost all faith in the fed and they are just puppets for Wall Street.

My call:
ECB holds at 4%
Fed drops to 4%

Aside from this slight disagreement, I agree with his analysis of the fall out, i.e. USD falls, EUR gains, OIL rises, stocks rally (stocks always rally) temporarily only to fall hard, gold rises. Stocks that I think will do well (although I’m no investor) longer term will be those associated with “onshoring“.

Good night!

Written by Eric

December 5, 2007 at 1:16 am

Posted in Uncategorized

Public apology to my favorite market blogger Barry Ritholtz

I suck. I suck. I suck 😦

I read Barry Ritholtz’ blog The Big Picture religiously. It is by far, my favorite blog. Recently, he went on a rant about receiving lame emails containing tips/links.

Ways to achieve a painful, early death

In particular, take note of items 7 and 8

7.) Please do not send me info on something I have already posted on. There is a Google search box at the top right: type in a phrase, and voila! Prior posts on that subject!

8.) Don’t send me links to items I have already posted. Don’t send me links to stuff that are months old. And lastly, don’t send me headline without a link. If you are too damned lazy to find a link, then I assume whatever story you are sending is lazy and dumb also.

When my friend sent me the link to the “Fine Line – Subprime Decline” video, I remembered that Barry had recently said how much he enjoyed a capella. Thinking I had a scoop, I excitedly sent him the link to the video.

Ack! Remembering Barry’s recent rant, I went back to search his blog for his “a capella” reference. To my shock and horror, the reference where he said he enjoyed a capella was regarding a link to the very same “Fine Fine Line” song I had just emailed him about. ACK!

The only thing I can say in my defense is that when I read his post about his love for a capella, I was in my office where YouTube is blocked, so I never saw the video until my friend (who performed and recorded the song) sent it to me. I didn’t put two and two together.

I feel like a total idiot for violating Barry’s rules and give him my word I will use the Google search box on his page before sending him an email again. I’m sure he receives hundreds of lame email a day and the last thing I want to do is to contribute to the noise. Let this be a reminder to others who, although possibly well intentioned, end up violating his death rules.

Sorry Barry!!

Written by Eric

September 24, 2007 at 12:22 am

Posted in Uncategorized

A Fine Fine Line

with one comment

This is from a friend and former colleague of mine who is a member of the esteemed Richter Scales 😀

I love it! 🙂

[Edit: Here’s a direct link to the video.]

Written by Eric

September 18, 2007 at 8:29 pm

Posted in Uncategorized