# How can I compute the representation matrices of a point group under given basis functions?

Take the $C_{3v}$ point group for example:

Rot[θ_] := RotationMatrix[θ]
E0 = IdentityMatrix[2];
C1 = Rot[2π/3];
C2 = C1.C1;
σ1 = ReflectionMatrix[Rot[2π/3].{1, 0}];
σ2 = C1.σ1.Inverse[C1];
σ3 = C2.σ1.Inverse[C2];
C3v = {E0, C1, C2, σ1, σ2, σ3};


So $C_{3v}$ has the following 6 elements: $\left\{ \begin{pmatrix} 1 & 0 \\ 0 & 1 \\ \end{pmatrix}, \begin{pmatrix} -\frac{1}{2} & -\frac{\sqrt{3}}{2} \\ \frac{\sqrt{3}}{2} & -\frac{1}{2} \\ \end{pmatrix}, \begin{pmatrix} -\frac{1}{2} & \frac{\sqrt{3}}{2} \\ -\frac{\sqrt{3}}{2} & -\frac{1}{2} \\ \end{pmatrix}, \begin{pmatrix} \frac{1}{2} & \frac{\sqrt{3}}{2} \\ \frac{\sqrt{3}}{2} & -\frac{1}{2} \\ \end{pmatrix}, \begin{pmatrix} \frac{1}{2} & -\frac{\sqrt{3}}{2} \\ -\frac{\sqrt{3}}{2} & -\frac{1}{2} \\ \end{pmatrix}, \begin{pmatrix} -1 & 0 \\ 0 & 1 \\ \end{pmatrix} \right\}$

For given basis functions $\{f_n(\mathbf{r})\mid n=1\cdots N\}$, there is a representation $\{D(g)\mid g\in C_{3v}\}$, in which the $N\times N$ matrix $D(g)$ is defined as $$f_i(g^{-1}\mathbf{r})=\sum_{j=1}^N f_j(\mathbf{r})D_{ji}(g)$$ where $\mathbf{r}=${x,y} .

If the basis functions are just monomials, e.g. $$f_1(\mathbf{r})=x^2,~~f_2(\mathbf{r})=y^2,~~f_3(\mathbf{r})=xy$$ I can compute the representation matrices using the Coefficient function

f1[{x_, y_}] := x^2
f2[{x_, y_}] := y^2
f3[{x_, y_}] := x y
basis = {f1, f2, f3};
Rep[g_] := Block[{i, j, ig, x, y, r},
ig = Inverse[g]; r = {x, y};
Table[Coefficient[basis[[j]][ig.r], basis[[i]][r]], {i, 3}, {j, 3}]
]
repC3v = Rep /@ C3v;
MatrixForm /@ repC3v


This gives the following results: $$\left\{\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{pmatrix},\begin{pmatrix} \frac{1}{4} & \frac{3}{4} & \frac{\sqrt{3}}{4} \\ \frac{3}{4} & \frac{1}{4} & -\frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{2} & \frac{\sqrt{3}}{2} & -\frac{1}{2} \\ \end{pmatrix},\begin{pmatrix} \frac{1}{4} & \frac{3}{4} & -\frac{\sqrt{3}}{4} \\ \frac{3}{4} & \frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{2} & -\frac{\sqrt{3}}{2} & -\frac{1}{2} \\ \end{pmatrix},\begin{pmatrix} \frac{1}{4} & \frac{3}{4} & \frac{\sqrt{3}}{4} \\ \frac{3}{4} & \frac{1}{4} & -\frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{2} & -\frac{\sqrt{3}}{2} & \frac{1}{2} \\ \end{pmatrix},\begin{pmatrix} \frac{1}{4} & \frac{3}{4} & -\frac{\sqrt{3}}{4} \\ \frac{3}{4} & \frac{1}{4} & \frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{2} & \frac{\sqrt{3}}{2} & \frac{1}{2} \\ \end{pmatrix},\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & -1 \\ \end{pmatrix}\right\}$$

However, if the basis functions are general functions, not monomials, how can I get the coefficient $a_i$ of function $f_i(\mathbf{r})$ in the transformed function $f_k(g^{-1}\mathbf{r})=\sum_i a_i f_i(\mathbf{r})$?

For example, if

F1[{x_, y_}] := (x + I y)^2
F2[{x_, y_}] := (x - I y)^2
F3[{x_, y_}] := (x + y)^2


How can I get the representation matrices under this basis?

NOTE: I mean a general method, not just a transformation from basis f1~f3 to F1~F3.

• Couching this in the context of group representation theory may inhibit some excellent MMA users from being interested in or understanding this question. You are likely to get more answers (and perhaps some creatively good ones) by simplifying your question down to the basic issue: given a function $g$ known to be a (scalar) linear combination of a finite set of functions $f_i$, how to find the coefficients? Equivalently, ask how to construct the dual basis of any finite set of functions. Commented Sep 16, 2012 at 15:53
• I distinctly recall there being a systematic procedure for this given in Cotton's Chemical Applications of Group Theory; if I get to my copy, I'll see if the approach is adaptable to Mathematica... Commented Sep 17, 2012 at 1:02
• @J.M. How do you get pmatrix instead of array from TeXForm[]? Commented Sep 17, 2012 at 8:20
• I don't believe you can @bel; that's why I did a systematic search-and-replace with a text editor... Commented Sep 17, 2012 at 9:07
• @J.M. you are my local hero Commented Sep 17, 2012 at 11:42

iC3v = Inverse /@ C3v;
sa = SolveAlways[Flatten@
Table[basis[[i]][iC3v[[k]].{x, y}] == Sum[basis[[j]][{x, y}] d[k, j, i], {j, 3}],
{i, 3}, {k, 6}],
{x, y}];
MatrixForm /@ Table[d[k, i, j], {k, 6}, {i, 3}, {j, 3}] /. sa


And you get your expected result:

$\left( \begin{array}{ccc} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array} \right),\left( \begin{array}{ccc} \frac{1}{4} & \frac{3}{4} & \frac{\sqrt{3}}{4} \\ \frac{3}{4} & \frac{1}{4} & -\frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{2} & \frac{\sqrt{3}}{2} & -\frac{1}{2} \end{array} \right),\left( \begin{array}{ccc} \frac{1}{4} & \frac{3}{4} & -\frac{\sqrt{3}}{4} \\ \frac{3}{4} & \frac{1}{4} & \frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{2} & -\frac{\sqrt{3}}{2} & -\frac{1}{2} \end{array} \right),\left( \begin{array}{ccc} \frac{1}{4} & \frac{3}{4} & \frac{\sqrt{3}}{4} \\ \frac{3}{4} & \frac{1}{4} & -\frac{\sqrt{3}}{4} \\ \frac{\sqrt{3}}{2} & -\frac{\sqrt{3}}{2} & \frac{1}{2} \end{array} \right),\left( \begin{array}{ccc} \frac{1}{4} & \frac{3}{4} & -\frac{\sqrt{3}}{4} \\ \frac{3}{4} & \frac{1}{4} & \frac{\sqrt{3}}{4} \\ -\frac{\sqrt{3}}{2} & \frac{\sqrt{3}}{2} & \frac{1}{2} \end{array} \right),\left( \begin{array}{ccc} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & -1 \end{array} \right)$

Edit

F1[{x_, y_}] := (x + I y)^2
F2[{x_, y_}] := (x - I y)^2
F3[{x_, y_}] := (x + y)^2
basis = {F1, F2, F3};


gives:

$\left( \begin{array}{ccc} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array} \right),\left( \begin{array}{ccc} -\frac{1}{2}+\frac{i \sqrt{3}}{2} & 0 & \frac{\sqrt{3}}{4}+\frac{3 i}{4} \\ 0 & -\frac{1}{2}-\frac{i \sqrt{3}}{2} & \frac{\sqrt{3}}{4}-\frac{3 i}{4} \\ 0 & 0 & 1 \end{array} \right),\left( \begin{array}{ccc} -\frac{1}{2}-\frac{i \sqrt{3}}{2} & 0 & -\frac{\sqrt{3}}{4}+\frac{3 i}{4} \\ 0 & -\frac{1}{2}+\frac{i \sqrt{3}}{2} & -\frac{\sqrt{3}}{4}-\frac{3 i}{4} \\ 0 & 0 & 1 \end{array} \right),\left( \begin{array}{ccc} 0 & -\frac{1}{2}-\frac{i \sqrt{3}}{2} & \frac{\sqrt{3}}{4}+\frac{i}{4} \\ -\frac{1}{2}+\frac{i \sqrt{3}}{2} & 0 & \frac{\sqrt{3}}{4}-\frac{i}{4} \\ 0 & 0 & 1 \end{array} \right),\left( \begin{array}{ccc} 0 & -\frac{1}{2}+\frac{i \sqrt{3}}{2} & -\frac{\sqrt{3}}{4}+\frac{i}{4} \\ -\frac{1}{2}-\frac{i \sqrt{3}}{2} & 0 & -\frac{\sqrt{3}}{4}-\frac{i}{4} \\ 0 & 0 & 1 \end{array} \right),\left( \begin{array}{ccc} 0 & 1 & i \\ 1 & 0 & -i \\ 0 & 0 & 1 \end{array} \right)$

Edit

Although it could probably be improved with some Representation Theory knowledge, here you have a generalization:

calcRep[group_List, bas_List] :=
Module[{r, inv, x, kk, ii, jj},
{kk, ii, jj} = Dimensions@group ;
blen = Length@bas;
inv = Inverse /@ group;
r = Array[x@# &, ii];
Return[
Block[{d},
Table[d[k, i, j], {k, 6}, {i, 3}, {j, 3}] /.
SolveAlways[Flatten@Table[bas[[i]][inv[[k]].r] == Sum[bas[[j]]@r d[k,j,i], {j, blen}],
{i, blen}, {k, kk}],
r]]];
];
calcRep[C3v, basis]


Edit

As per whuber's comment, given a function $h$ and a set of functions $f_i$, where you know that

$$h(\mathbf{r})=\sum_i a_i f_i(\mathbf{r})$$

you wish to know what the $a_i$ are?

A dumb, but possibly effective way is just to throw some points at it and solve. For example, with

F1[{x_, y_}] := (x + I y)^2
F2[{x_, y_}] := (x - I y)^2
F3[{x_, y_}] := (x + y)^2


let

h = Expand[4 F1[{x, y}] - 3 F2[{x, y}] + (7 - 3 I) F3[{x, y}]]


(8 - 3 I) x^2 + (14 + 8 I) x y + (6 - 3 I) y^2

then

eq = a1 F1[{x, y}] + a2 F2[{x, y}] + a3 F3[{x, y}] == h;
Solve[{eq /. {x -> 1, y -> 1}, eq /. {x -> 0, y -> 1}, eq /. {x -> 1, y -> 0}}]


gives

{a1 -> 4, a2 -> -3, a3 -> 7 - 3 I}}