1 Introduction

Let S denote a semigroup, G a topological group and \(x \rightarrow x^*\) a continuous involution of G, i.e., \((xy)^* = y^*x^*\) and \(x^{**} = x\) for all \(x,y \in G\).

We shall determine the solutions \(g,f, h \in C(G)\) of the Levi–Civita functional equation

$$\begin{aligned} g(xy) = g(x)g(y) + f(x)h(y), \ x,y \in G. \end{aligned}$$
(1.1)

The Eq. (1.1) occurs in connection with 2-dimensional representations (see Lemma 3.2), apart from being a generalization of the cosine addition law which is the special case \(h = -f\).

Example 1.1 shows that there are examples of solutions (gfh) of (1.1) such that g is not central, which in particular implies that g is not abelian.

Example 1.1

Let \(G = SL(2, \mathbb {R}) = \{ x = \begin{pmatrix} x_{11} &{} \quad x_{12} \\ x_{21} &{} \quad x_{22} \end{pmatrix} \mid \det x = 1 \}\). On this group G we define the three continuous functions

$$\begin{aligned} g(x):= x_{11}, \ f(x):= x_{12}, \ h(x):= x_{21} \ \text { for } x = \begin{pmatrix} x_{11} &{} \quad x_{12} \\ x_{21} &{} \quad x_{22} \end{pmatrix} \in G. \end{aligned}$$

The triple (gfh) is a solution of (1.1), as is easy to verify, but none of its components g, f, h is central.

Our results about (1.1) enable us find the solutions \(g,f \in C(G)\) the cosine subtraction law

$$\begin{aligned} g(xy^{*}) = g(x)g(y) + f(x)f(y), \ x,y \in G. \end{aligned}$$
(1.2)

In the abstract of his paper [2] Ebanks writes “The main objective is to solve \(g(xy^*) = g(x)g(y) + f(x)f(y)\) for unknown functions \(g,f: S \rightarrow \mathbb {C}\), where \(x \mapsto x^*\) is an anti-homomorphic involution. Until now this equation has not been solved on non-commutative semigroups, nor even on non-Abelian groups with \(x^* = x^{-1}\). We solve this equation on semigroups under the assumption that g is central, and on groups generated by their squares under the assumption that \(x^* = x^{-1}\)”.

Our Example 6.8 reveals that the cosine subtraction law with the involution \(x^* = x^{-1}\) can have solutions such that g is not central.

The main results of the present paper are: (1) We determine the solutions of the generalization (1.1) of the cosine addition law (Proposition 4.1 and Theorem 5.1), and (2) we apply this to solve the cosine subtraction law (1.2) (Proposition 6.4 and Theorem 6.3). An important feature of our paper is that it treats non-abelian situations like the one in Example 1.1. We do not assume any kind of commutativity, not even that some functions shall be central or abelian. Our results generalize much of the earlier work on the cosine addition and subtraction laws on groups.

The present paper about the extension (1.1) of the cosine addition law parallels [6] that discusses the extension \(f(xy) = f(x)h(y) + g(x)f(y)\) of the sine addition law on groups.

2 Notations and terminology

Throughout the paper S denotes a semigroup, and G denotes a group with identity element e. We incorporate the Hausdorff property in the definition of a topological group.

If X is a topological space we let C(X) be the algebra of continuous, complex valued functions on X. If a group has not been assigned a topology we shall tacitly endow it with the discrete topology; in this case C(G) is the algebra of all complex valued functions on G.

If \(X_1\) and \(X_2\) are sets and \(f_i:X_i \rightarrow \mathbb {C}\), \(i = 1,2\), then we define \(f_1 \otimes f_2: X_1 \times X_2 \rightarrow \mathbb {C}\) by \((f_1 \otimes f_2)(x_1,x_2):= f_1(x_1)f_2(x_2)\) for \((x_1,x_2) \in X_1 \times X_2\). Note that \(f_1 \otimes f_2 = 0\) \(\iff \) \(f_1\) or \(f_2\) vanishes.

$$\begin{aligned} \mathbb {C}^*:= \mathbb {C} \setminus \{ 0\}. \end{aligned}$$

A character \(\chi \) of G is a homomorphic \(\chi :G\rightarrow \mathbb {C}^{*}\).

Let \(\varphi :S\rightarrow \mathbb {C}\) be a function. We say that \(\varphi \) is additive if \(\varphi (xy)=\varphi (x)+\varphi (y)\) for all \(x,y\in S\), multiplicative if \(\varphi (xy)=\varphi (x)\varphi (y)\) for all \(x,y\in S\). \(\varphi \) is said to be central if \(\varphi (xy)=\varphi (yx)\) for all \(x,y\in S\), abelian if \(\varphi (x_{1}x_{2}\cdot \cdot \cdot x_{n})=\varphi (x_{\pi (1)}x_{\pi (2)}\cdot \cdot \cdot x_{\pi (n)})\) for all \(x_{1},x_{2},\ldots {},x_{n}\in S\), all permutations \(\pi \) of n elements and all \(n=2,3,\ldots {}\).

If \(x \mapsto x^*, x\in S\), is an involution of S, i.e., \((xy)^* = y^*x^*\) and \(x^{**} = x\) for all \(x,y \in S\), we define for any function \(F: S\rightarrow \mathbb {C}\) the function \(F^{*}: S\rightarrow \mathbb {C}\) by \(F^{*}(x):= F(x^{*})\) for \(x\in S\). We say that F is even if \(F^{*}=F\), and F is said to be odd if \(F^{*}=-F\). An example of an involution is the group inversion \(x \mapsto x^{-1}\), when S is a group. If \(x^* = x^{-1}\) we write \(\check{F}\) instead of \(F^*\).

Definition 2.1

Let \(V\ne \{0\}\) be a complex vector space and let \(\mathcal {L}(V)\) be the algebra of all linear maps from V to V.

  1. (a)

    A semigroup representation of S on V is a map \(\pi : S\rightarrow \mathcal {L}(V)\) such that \(\pi (xy)=\pi (x)\pi (y)\) for all \(x,y\in S\).

  2. (b)

    Let \(\pi \) be a semigroup representation of S on V. A subset \(W\subseteq V\) is said to be \(\pi \)-invariant if \(\pi (x)W\subseteq W\) for all \(x\in S\).

  3. (c)

    A semigroup representation \(\pi \) of S on V is irreducible if \(\{0\}\) and V are the only \(\pi \)-invariant subspaces of V.

  4. (d)

    A representation of G on V is a semigroup representation \(\pi \) of G on V such that \(\pi (e)=I\).

  5. (e)

    Let S be a topological semigroup and \(\pi \) be a semigroup representation of S on finite dimensional vector space V. We say that \(\pi \) is continuous if the map \(\pi : S\rightarrow \mathcal {L}(V)\) is continuous.

3 A connection to representations

This section discusses the functional equation

$$\begin{aligned} g(xy) = g(x)g(y) + f(x)h(y), \ x,y \in S, \end{aligned}$$
(3.1)

where S is a semigroup and \(g,f,h:S \rightarrow \mathbb {C}\) are the unknown functions. (3.1) is a natural extension of (1.1) from groups to semigroups. The section relates (3.1) to semigroup representations of S on \(\mathbb {C}^2\). At the end of the section we let S be a group.

(c) of Lemma 3.1 is admittedly special and out of place at this point, but it will be used later in the proof of Theorem 6.4.

Lemma 3.1

Let \(g,f,h: S \rightarrow \mathbb {C}\) where \(f \otimes h \ne 0\), satisfy (3.1). Then

  1. (a)

    There exists exactly one function \(k:S \rightarrow \mathbb {C}\) such that the matrix valued function \(\rho := \begin{pmatrix} g &{} \quad f \\ h &{} \quad k \end{pmatrix}: S \rightarrow M(2,\mathbb {C})\) is a semigroup representation of S on \(\mathbb {C}^2\).

  2. (b)

    If S is a topological semigroup and \(g, f, h \in C(S)\), then \(k \in C(S)\) and so \(\rho \) is continuous.

  3. (c)

    If \(x \mapsto x^*\) is an involution of S and \(h = f^*\), then \(g+k\) is even.

Proof

(a) Combining that \(g(x(yz)) = g((xy)z)\) with (3.1) we find that

$$\begin{aligned} f(x)[h(yz) - h(y)g(z)] = [f(xy) - g(x)f(y)]h(z) \text { for all }x,y,z \in S. \end{aligned}$$
(3.2)

By assumption \(f \ne 0\), so there exists \(x_0 \in S\) such that \(f(x_0) \ne 0\). Putting \(x = x_0\) in (3.2) we obtain that

$$\begin{aligned} h(yz) = h(y)g(z) + k(y)h(z), \ y,z \in S, \end{aligned}$$
(3.3)

where \(k(y):= [f(x_0y) - g(x_0)f(y)]/f(x_0), \ y \in S\). When we put (3.3) into (3.2) we get, using the assumption \(h \ne 0\), that

$$\begin{aligned} f(xy) = g(x)f(y) + f(x)k(y), \ x,y \in S. \end{aligned}$$
(3.4)

(3.1), (3.4) and (3.3) are formulas for right translates of g, f and h. A similar formula holds for k. Indeed,

$$\begin{aligned} k(xy) = k(x)k(y) + h(x)f(y), \ x,y \in S. \end{aligned}$$
(3.5)

The idea for the derivation of (3.5) is to reduce the number of independent variables that the functions depend on, from 3 to 2 to 1. The details are: The definition of k, (3.4) and (3.1) gives us that

$$\begin{aligned}&f(x_0)k(xy) = f(x_0(xy)) - g(x_0)f(xy) = f((x_0x)y) - g(x_0)f(xy) \\&\quad = g(x_0x)f(y) + f(x_0x)k(y) - g(x_0)[g(x)f(y) + f(x)k(y)] \\&\quad = [g(x_0)g(x) + f(x_0)h(x)]f(y) + [g(x_0)f(x) + f(x_0)k(x)]k(y) \\&\quad \quad - g(x_0)g(x)f(y) - g(x_0)f(x)k(y) \\&\quad = f(x_0)h(x)f(y) + f(x_0)k(x)k(y) = f(x_0)[k(x)k(y) + h(x)f(y)], \end{aligned}$$

from which (3.5) follows, because \(f(x_0) \ne 0\).

The four formulas (3.1), (3.3), (3.4) and (3.5) mean that the matrix valued function \(\begin{pmatrix} g &{} \quad f \\ h &{} \quad k \end{pmatrix}: S \rightarrow M(2,\mathbb {C})\) is a semigroup representation.

The uniqueness of k remains. However, the semigroup representation property gives us that (3.4) holds, and (3.4) implies that k is uniquely determined by g, f and h, since \(f \ne 0\).

(b) can be seen from the formula \(k(y):= [f(x_0y) - g(x_0)f(y)]/f(x_0)\) derived above.

(c) Using the homomorphism property \(\rho (xy) = \rho (x)\rho (y)\) at the entries no. (1, 2) and (2, 1) we get that (3.4) and \(f^*(xy) = f^*(x)g(y) + k(x)f^*(y)\) hold. Comparing the last identity in its equivalent form \(f(xy) =g^*(x)f(y) + f(x)k^*(y)\) to (3.4) we find that

$$\begin{aligned}{}[g(x) - g^*(x)]f(y) = -f(x)[k(y) - k^*(y)]. \end{aligned}$$
(3.6)

Since \(f \ne 0\) there is a constant \(c \in \mathbb {C}\) such that \(g - g^* = cf\). Substituting this into (3.6) we find that \(k - k^* = -cf\), so \(g - g^* = k^*-k\), and hence \(g+k = g^* + k^* = (g + k)^*\).

For later reference we note a kind of converse to Lemma 3.1(a).

Lemma 3.2

Let \(\begin{pmatrix} g &{} \quad f\\ h &{} \quad k \end{pmatrix}\) be a semigroup representation of S on \(\mathbb {C}^2\). Then the triple \(g,f,h: S \rightarrow \mathbb {C}\) satisfies (3.1).

Proof

Elementary matrix multiplication.

Our main interest in Lemma 3.1 is in the solutions (gfh) of (3.1) when S is a topological group G and not just a semigroup. In the group case Proposition 3.4 presents three criteria, each of which ensures \(\rho \) is a representation and not just a semigroup representation.

The non-degeneracy conditions of Definition 3.3 are special cases of standard conditions in the theory of general Levi–Civita functional equations.

Definition 3.3

Let \(g, f,h:S \rightarrow \mathbb {C}\) be a solution of (3.1).

We say that the solution (gfh) is non-degenerate, if g and f are linearly independent and simultaneously g and h are linearly independent. Otherwise we say that (gfh) is degenerate.

Each of the non-degeneracy conditions of Definition 3.3 implies that \(g \ne 0\) and \(f \otimes h \ne 0\).

Proposition 3.4 contains three characterisations of non-degeneracy of solutions in the setting of groups.

Proposition 3.4

Let the triple \(g,f,h: G \rightarrow \mathbb {C}\) where \(f \otimes h \ne 0\), satisfy (1.1), and let \(\rho \) be the corresponding semigroup representation of G on \(\mathbb {C}^2\) from Lemma 3.1. The following statements are equivalent.

  1. (a)

    The solution (gfh) of (1.1) is non-degenerate.

  2. (b)

    \(\rho \) is a representation of G on \(\mathbb {C}^2\).

  3. (c)

    \(g(e) = 1\).

  4. (d)

    g is not proportional to a character of G.

Proof

Note that \(g \ne 0\), because \(g = 0\) implies the contradiction \(f \otimes h = 0\).

(a) \(\Rightarrow \) (b). Taking \(x = e\) in (1.1) we find that \((g(e)-1)g + f(e)h = 0\), which by the non-degeneracy gives us that \(g(e) = 1\) and \(f(e) = 0\). Taking \(y = e\) in (1.1) we get similarly that \(h(e) = 0\). Furthermore

$$\begin{aligned} k(e) = \frac{1}{f(x_0)}(f(x_0) - g(x_0)f(e)) = \frac{1}{f(x_0)}(f(x_0) - g(x_0)\cdot 0) = 1, \end{aligned}$$

so the definition of \(\rho \) gives that \(\rho (e) = I\).

(b) \(\Rightarrow \) (c) is a triviality by the definition of \(\rho \).

(c) \(\Rightarrow \) (d). Assume \(g(e) = 1\). Suppose for contradiction that \(g = g(e)\chi \) for some character \(\chi \) of G. Now \(g = \chi \), since \(g(e) = 1\) by assumption, so \(g(xy) = g(x)g(y)\), which according to (1.1) means that \(f \otimes h = 0\). This is the desired contradiction.

(d) \(\Rightarrow \) (a). Assuming (d) we shall prove that \(\{ g,f\}\) and \(\{ g,h\}\) are linearly independent. We will derive a contradiction supposing \(\{ g,f\}\) linearly dependent. The case of \(\{ g,h\}\) being linearly dependent can be treated in a similar way, so we omit it. Now \(f = \alpha g\) for some \(\alpha \in \mathbb {C}^*\), since \(g \ne 0\) and \(f\otimes h \ne 0\), so (1.1) becomes \(g(xy) = g(x)g(y) + \alpha g(x)h(y)\). Putting \(x = e\) here gives \((1-g(e))g = \alpha g(e)h\). We see that \(g(e) \ne 0\), because \(g(e) = 0\) implies the contradiction \(g = 0\), so we find that

$$\begin{aligned} h = \frac{1-g(e)}{\alpha g(e)}g = \beta g, \text { where } \beta := \frac{1-g(e)}{\alpha g(e)}, \end{aligned}$$

which transforms (1.1) further to

$$\begin{aligned} g(xy) = g(x)g(y) + \alpha \beta g(x)g(y) = (1 + \alpha \beta )g(x)g(y), \ x,y \in G. \end{aligned}$$

For \(y = e\) we get, since \(g \ne 0\), that \((1 + \alpha \beta )g(e) = 1\). Thus

$$\begin{aligned} g(xy) = \frac{1}{g(e)}g(x)g(y), \ x,y \in G. \end{aligned}$$

This formula reveals \(\chi := g/g(e)\) is a character, which contradicts (d).\(\square \)

Specializing Lemma 3.1 from a semigroup S to a group G we get in Corollary 3.5 roughly speaking a bijection between representations of G on \(\mathbb {C}^2\) and solutions of the functional equation (1.1) on G. The details are as follows.

Corollary 3.5

Let G be a topological group.

The mapping \(\begin{pmatrix} g &{} \quad f\\ h &{} \quad k \end{pmatrix} \mapsto (g,f,h)\) is a bijection of the set of continuous representations \(x \mapsto \begin{pmatrix} g(x) &{} f(x)\\ h(x) &{} k(x) \end{pmatrix} \in M(2,\mathbb {C})\), \(x \in G\), of G on \(\mathbb {C}^2\) having \(f \otimes h \ne 0\) onto the set of continuous solutions (gfh) of (1.1) having \(g(e) = 1\) and \(f \otimes h \ne 0\).

Proof

Let \(\rho := \begin{pmatrix} g &{} \quad f\\ h &{} \quad k \end{pmatrix}: G \rightarrow GL(2,\mathbb {C})\) be a continuous representation of G on \(\mathbb {C}^2\) with \(f \otimes h \ne 0\). From Lemma 3.2 we see that (gfh) is a continuous solution of (1.1) with \(f \otimes h \ne 0\). Furthermore \(\rho (e) = I\) because \(\rho \) is a representation, and so \(g(e) = 1\). This proves that the image of the mapping is in the desired range. The mapping is injective, because k is unique (Lemma 3.1(a)).

It remains to prove that the mapping is surjective, so let (fgh) be a continuous solution of (1.1) with \(g(e) = 1\) and \(f \otimes h \ne 0\). Let \(\rho \) denote the corresponding semigroup representation of G on \(\mathbb {C}^2\) introduced in Lemma 3.1. Since \(g(e) = 1\) we read from Proposition 3.4 that \(\rho \) is a representation. The mapping sends \(\rho \) to (gfh), showing the surjectivity.\(\square \)

4 The degenerate solutions of (1.1)

Proposition 4.1

The degenerate solutions of (1.1) are the triples \(g,f,h: G \rightarrow \mathbb {C}\) listed below.

  1. (a)

    g is multiplicative function, \(f = 0\) and h is arbitrary.

  2. (b)

    g is multiplicative function, f is arbitrary and \(h = 0\).

  3. (c)

    There exist a character \(\chi \) of G and constants \(\alpha \in \mathbb {C} {\setminus } \{ 0,1\}\) and \(\beta \in \mathbb {C}^*\) such that \(g = \alpha \chi \), \(f = \alpha \beta \chi \) and \(h = (1- \alpha )\beta ^{-1}\chi \).

Proof

It is easy to verify that the formulas of the proposition define degenerate solutions of (1.1), so it is left to show that each degenerate solution (gfh) falls into one of the three possibilities.

Let (gfh) be a degenerate solution of (1.1). If \(f \otimes h = 0\) then g is multiplicative function, and \(f=0\) and h is arbitrary, so the solution falls into possibility (a), or \(h=0\) and f is arbitrary and hence the solution (gfh) falls into possibility (b). In what remains of the proof we suppose that \(f \otimes h \ne 0\). In this case \(g,f,h \ne 0\) and, according to Proposition 3.4(d), g is proportional to character \(\chi \) of G, i.e., there exists a constant \(\alpha \in \mathbb {C}^*\) such that \(g = \alpha \chi \). Since (gfh) is degenerate at least one of the pairs \(\{g,f\}\) and \(\{g,h\}\) is linearly dependent. We suppose that \(\{g,f\}\) is linearly dependent. The case of \(\{ g,h\}\) being linearly dependent can be treated in a similar way, so we omit it. Now \(f = \beta g\) for some \(\beta \in \mathbb {C}^*\), so \(f = \alpha \beta \chi \). Substituting \(g = \alpha \chi \) and \(f = \alpha \beta \chi \) into (1.1) we find after cancellations that \((1-\alpha )\chi = \beta h\), which is possibility (c).\(\square \)

5 The non-degenerate solutions of (1.1)

In this section we list the continuous, non-degenerate solutions of (1.1) and deduce some of their properties.

Theorem 5.1

Let G be a topological group. The continuous, non-degenerate solutions of (1.1) are the triples \(g,f,h\in C(G)\) listed below, where \(c_{0}\in \mathbb {C}\), \(c\in \mathbb {C}^{*}\), \(c_{1}\in \mathbb {C} \setminus \{0,1\}\), and \(\chi ,\mu \in C(G)\) are characters of G.

  1. (a)

    There exists a function \(k\in C(G)\) such that the matrix valued function \(\begin{pmatrix} g &{} \quad f\\ h &{} \quad k \end{pmatrix}\) is a continuous, irreducible representation of G on \(\mathbb {C}^{2}\).

  2. (b)

    \(g=(1+A) \chi \), \(f=c^{-1}(g-\chi )\), \(h=-c(g-\chi )\), where \(A\in C(G)\) is a non-zero additive function on G.

  3. (c)

    \(g=c_{1}\chi +(1-c_{1})\mu \), \(f=c^{-1}(g-\mu )\), \(h=-c(g-\chi )\), where \(\chi \ne \mu \).

  4. (d)

    \(g = \mathcal {A}+c_{0} \chi +(1-c_{0})\mu \), \(f=c^{-1}(g-\mu )\), \(h=-c(g-\chi )\), where \(\chi \ne \mu \), \(\mathcal {A}:=A([y_{0},\cdot ])\chi \). Here \(A\in C([G,G]){\setminus }\{0\}\) is an additive function satisfying the following transformation law

    $$\begin{aligned} A(xyx^{-1})=\frac{\mu (x)}{\chi (x)}A(y), \text { for all } x\in G \text { and } y\in [G,G], \end{aligned}$$

    and \(y_{0}\in G\) is chosen such that \(\chi (y_{0})\ne \mu (y_{0})\).

The classes (a)–(b) are mutually disjoint.

In (b) and (c) the functions g, f and h are abelian, but they are not central in (a) and (d), so they are in particular not abelian.

In (a) the set \(\{g,f,h,k\}\) is linearly independent.

In (d) both \(\{\mathcal {A},\chi ,\mu \}\) and \(\{g,f,h\}\) are linearly independent.

Proof

We will first show that any continuous, non-degenerate solution of (1.1) falls into one af the cases (a)–(d). So let (gfh) be a continuous, non-degenerate solution of (1.1). Then \(f \otimes h \ne 0\), and according to Proposition 3.4(c), we have \(g(e) = 1\). So, by applying Corollary 3.5, there exists a function \(k\in C(G)\) such that the matrix valued function \(\rho :=\begin{pmatrix} g &{} \quad f\\ h &{} \quad k \end{pmatrix}\) is continuous representation of G on \(\mathbb {C}^{2}\).

If \(\rho \) is irreducible, then the solution (gfh) falls into class (a). So, in what remains of the proof we may assume that \(\rho \) is not irreducible. Then, according to [6, Proposition 4.4], there exist a matrix \(P=\begin{pmatrix} \alpha &{} \quad \beta \\ \gamma &{} \quad \delta \end{pmatrix}\in GL(2,\mathbb {C})\) (so \(\Delta := \det P = \alpha \delta - \beta \gamma \ne 0\)), characters \(\chi ,\mu \in C(G)\) (they may coincide) and a function \(\varphi \in C(G)\) such that

$$\begin{aligned} \begin{pmatrix} g &{} \quad f\\ h &{} \quad k \end{pmatrix} = P \begin{pmatrix} \mu &{} \quad \varphi \\ 0 &{} \quad \chi \end{pmatrix} P^{-1} \end{aligned}$$
(5.1)

and

$$\begin{aligned} \varphi (xy)=\varphi (x)\chi (y)+\mu (x)\varphi (y) \text { for all } x,y\in G. \end{aligned}$$
(5.2)

From (5.1) we get \(g = \Delta ^{-1}(\alpha \delta \mu -\alpha \gamma \varphi -\beta \gamma \chi )\). Since g is not proportional to a character (see Proposition 3.4(d)) if follows that \(\alpha \ne 0\) and \(\gamma \ne 0\). This allows us to reformulate g to

$$\begin{aligned} g = c\Delta ^{-1}(\alpha ^{2}\varphi +\alpha \beta (\chi -\mu ))+\mu \end{aligned}$$
(5.3)

where \(c:= -\gamma \alpha ^{-1} \ne 0\). From (5.1) we find furthermore that

$$\begin{aligned} f = c^{-1}(g-\mu ) \text { and } h = -c(g-\chi ), \end{aligned}$$
(5.4)

According as \(\chi = \mu \) or \(\chi \ne \mu \) we have the following possibilities:

The possibility \(\chi = \mu \). Applying [4, Theorem 4.1(d)] we derive from (5.2) that \(\varphi = A \chi \) where \(A\in C(G)\) is additive, and then we get from (5.3) that \(g = (1-\alpha \gamma \Delta ^{-1} A)\chi \). Now, writing A instead of \(-\alpha \gamma \Delta ^{-1} A\), we obtain that \(g = (1+A)\chi \) with \(A\in C(G)\) additive. \(A \ne 0\) because g is not proportional to a character. In view of (5.4) the solution (gfh) falls into class (b).

The possibility \(\chi \ne \mu \) and \(\varphi \), \(\chi \) and \(\mu \) linearly dependent. Using [5, Proposition 5] we derive from (5.2) that there exists a constant \(a\in \mathbb {C}\) such that \(\varphi = a(\chi -\mu )\). Hence, (5.3) implies that

$$\begin{aligned} g=c \Delta ^{-1}( a \alpha ^{2}(\chi -\mu )+ \alpha \beta (\chi -\mu ))+\mu =c_{1}\chi +(1-c_{1})\mu , \end{aligned}$$

where \(c_{1}:=c \Delta ^{-1}(a \alpha ^{2}+\alpha \beta )\in \mathbb {C}\). Note that \(c_1 \in \mathbb {C} {\setminus } \{ 0,1\}\), because g is not proportional to a character. Combining this with (5.4), the solution (gfh) falls into class (c).

The possibility \(\chi \ne \mu \) and \(\varphi \), \(\chi \) and \(\mu \) linearly independent. Then, choosing \(y_{0}\in G\) such that \(\chi (y_{0}) \ne \mu (y_{0})\), we deduce from (5.2), by [5, Theorem 11(a)], that \(\varphi = A([y_{0},\cdot ])\chi +\lambda (\chi -\mu )\), where \(\lambda \in \mathbb {C}\) and \(A\in C([G,G]){\setminus }\{0\}\) is a additive function satisfying the transformation law

$$\begin{aligned} A(xyx^{-1})=\frac{\mu (x)}{\chi (x)}A(y), \text { for all } x\in G \text { and } y\in [G,G]. \end{aligned}$$

Note that \(A \ne 0\) because \(\varphi \), \(\chi \) and \(\mu \) are linearly independent. Now, substituting the expression for \(\varphi \) into (5.3) we get that

$$\begin{aligned} g = c \Delta ^{-1}\left( \alpha ^{2} A([y_{0},\cdot ])\chi +\lambda \alpha ^{2}(\chi -\mu )+\alpha \beta (\chi -\mu )\right) +\mu . \end{aligned}$$

So that, by putting \(c_{0}:=c \Delta ^{-1}(\lambda \alpha ^{2}+\alpha \beta )\in \mathbb {C}\), writing A instead of \(c \Delta ^{-1}\alpha ^{2} A\) and then defining \(\mathcal {A}:=A([y_{0},\cdot ])\chi \), we obtain that \(g=\mathcal {A}+c_{0} \chi +(1-c_{0})\mu \). Thus, taking (5.4) into account, the solution (gfh) falls into class (d).

Conversely, all the triples (gfh) described in (a)–(d) are continuous, non-degenerate solutions of the functional equation (1.1). We prove this as follows.

Let (gfh) be of the form described in (a). We note that \(f \otimes h \ne 0\): If \(f = 0\), then \(\rho = \begin{pmatrix} g &{} \quad 0 \\ h &{} \quad k \end{pmatrix}\) has \(\mathbb {C}\begin{pmatrix} 0 \\ 1 \end{pmatrix}\) as a non-trivial, invariant subspace, contradicting the irreducibility of \(\rho \). Similarly we deduce that \(h \ne 0\). Now we get from Corollary 3.5 that (gfh) is a continuous solution of (1.1). Finally (gfh) is non-degenerate, because \(\rho \) is a representation (Proposition 3.4).

In (b)–(d) we have \(g(x)g(y)+f(x)h(y) = g(x)\chi (y)+\mu (x)g(y)-\mu (x)\chi (y)\) for all \(x,y\in G \), when we in (b) interpret \(\mu \) as \(\chi \). This allows us to check by elementary computations that \(g(xy)=g(x)g(y)+f(x)h(y)\) for all \(x,y\in G\) in (b)-(d), i.e., that (gfh) is a solution of (1.1). We omit the details, except for noting that the check of (d) uses the formula \(\mathcal {A}(xy) = \mathcal {A}(x)\chi (y) + \mu (x)\mathcal {A}(y)\) from [6, Proposition 5.3(a)].

If (gfh) has one of the forms in (b)–(d) then a case by case inspection shows that \(g(e)=1\). Moreover \(f \otimes h \ne 0\). Indeed, suppose for a contradiction that \(f \otimes h = 0\), i.e., that \(f = 0\) or \(h = 0\). We suppose \(f = 0\), and omit the case \(h = 0\), because it can be treated in a similar way. We proceed as follows.

In (b) we get \(g = \chi \), which implies that \(A \chi =0\), contradicting \(A \ne 0\).

In (c) we get that \(g = \mu \), and then \(c_{1}\chi +(1-c_{1})\mu =\mu \), which contradicts that \(\chi \) and \(\mu \) are distinct characters.

In (d) we get that \(g=\mu \), so \(\mathcal {A}+c_{0} \chi +(1-c_{0})\mu =\mu \), from which we deduce that \(\mathcal {A}\) is central, and then, according to [6, Proposition 5.3(b)], that \(\mathcal {A}=0\), contradicting \(A \ne 0\) in (d).

Finally, by Proposition 3.4 the solution (gfh) is non-degenerate.

The statements about independence.

About (a). From the irreducibility of the representation \(\rho \) we deduce by [4, Corollary E.12] that the space of matrix coefficients of \(\rho \) is 4-dimensional. So the set \(\{g,f,h,k\}\) is linearly independent.

About (d). By [6, Proposition 5.3(c)], the set \(\{\mathcal {A},\chi ,\mu \}\) is linearly independent. In view of the formulas in (d) we read that

$$\begin{aligned} \begin{pmatrix} g \\ f\\ h \end{pmatrix} = \begin{pmatrix} 1 &{} \quad c_{0}&{} \quad 1-c_{0}\\ c^{-1} &{} \quad c^{-1}c_{0}&{} \quad -c^{-1}c_{0}\\ -c&{} \quad c(1-c_{0})&{} \quad -c(1-c_{0}) \end{pmatrix} \begin{pmatrix} \mathcal {A}\\ \chi &{}\\ \mu \end{pmatrix}.\end{aligned}$$

The matrix has determinant \(1 \ne 0\), so \(\{g,f,h\}\) is also linearly independent.

The statements about centrality.

About (a). If g is central we infer from (1.1) that \(\{ f,h\}\) is linearly dependent, which contradicts that the set \(\{g,f,h,k\}\) is linearly independent. If f is central we get from (3.4) that \(f(x)(g(y)-h(y))=f(y)(g(x)-h(x))\) for all \(x,y \in G\), so \(\{f,g-h\}\) is linearly dependent, contradicting that \(\{g,f,h,k\}\) is linearly independent. A similar argument works when h is assumed central; here (3.3) is used. We conclude that the functions g, f and h are not central, and so they are in particular not abelian.

About (d). Note that \(\chi \) and \(\mu \) are central, and \( c\ne 0\). Suppose for contradiction that one of the functions g, f and h is central. Then we get from the formulas in (d) that g is central, and hence so is \(\mathcal {A}\). According to [6, Proposition 5.3(b)] we have \(\mathcal {A}=0\), which contradicts that \(A \ne 0\) in (d).

About (b) and (c). From the formulas in (b) and (c) we get that g, f and h are abelian.

The disjointness of the classes (a)-(d).

The function g is central in (b) and (c), while it is not in (a) and (d), so (a) and (b), (a) and (c), (b) and (d), (c) and (d) are disjoint.

(b) and (c). If (b) and (c) have a solution (gfh) in common, then \(g = (1+A)\chi _{1} = c_{1}\chi +(1-c_{1})\mu \) for some characters \(\chi _{1},\chi ,\mu \in C(G)\) and an additive function \(A\in C(G){\setminus }\{0\}\). So \(A \chi _{1}=-\chi _{1}+c_{1}\chi +(1-c_{1})\mu \). According to [1, Lemma 4.4] we have that \(A \chi _{1}=0\). But \(\chi _{1}\) is a character of G, so we arrive at the contradiction \(A = 0\).

(a) and (d). Suppose for contradiction that (a) and (d) have a solution (gfh) in common. We define the equivalence modulo \(\text {span}\{ g,f,h\}\) in C(G) by writing, for all \(F_{1},F_{2}\in C(G)\), \(F_{1} \equiv F_{2}\) iff \(F_{1}-F_{2}\in \text {span}\{ g,f,h\}\). From the formulas of f and h in (d) we get that \(\chi \equiv 0\) and \(\mu \equiv 0\). Let \(x\in G\) be arbitrary but fixed. We get from (3.4) that \(f(x)k = f(x\cdot )-g(x)f\). Using the formula for f in (d) on the first term on the right we derive that \(f(x)k = c^{-1}g(x\cdot )-c^{-1}\mu (x)\mu -g(x)f\). Thus \(f(x)k \equiv g(x\cdot )\). Moreover, using the formula for g in (d) we infer that \(g(x\cdot ) \equiv \mathcal {A}(x\cdot )\). Since \(\mathcal {A}(x\cdot )=\mathcal {A}(x)\chi +\mu (x)\mathcal {A}\) (by [6, Proposition 5.3(a)]) and \(\mathcal { A} \equiv g\) we derive that \(f(x)k \equiv 0\). Hence, \(f(x)k\in \text {span}\{ g,f,h\}\). Now, by the non-degeneracy of (gfh) we have \( f\ne 0\). So choosing \(x\in G\) such that \(f(x) \ne 0\) we deduce that \(k\in \text {span}\{ g,f,h\}\), contradicting that \(\{g,f,h,k\}\) is linearly independent in (a). So (a) and (d) are disjoint.\(\square \)

Remark 5.2

The cosine addition law on a group G is is the special case of (1.1) in which \(h = -f\), i.e., it is

$$\begin{aligned} g(xy) = g(x)g(y) - f(x)f(y), \ x,y \in G. \end{aligned}$$
(5.5)

Noting that g is central (the right hand side of (5.5) is symmetric in x and y) we read from the statements in Theorem 5.1 after (d) that the classes (a) and (d) are void. Thus we regain the classic formulas for the non-degenerate solutions of (5.5) on groups.

6 Application to the cosine subtraction law

For involutions \(x \mapsto x^*\) of semigroups Ebanks [2, Theorem 3.2(b)] solved the functional equation \(g(xy^{*}) = g(x)g(y) + f(x)f(y)\) under the assumption that g is central.

In this section we apply our main results (Proposition 4.1 and Theorem 5.1) and get rid of the assumption that g is central. We determine the continuous solutions on topological groups G of the cosine subtraction law (1.2), i.e., of

$$\begin{aligned} g(xy^{*}) = g(x)g(y) + f(x)f(y), \ x,y \in G, \end{aligned}$$
(6.1)

where \(x \mapsto x^*\) is a continuous involution of G. Proposition 6.3 gives all solutions \(g,f\in C(G)\) of (6.1) such that g and f are linearly dependent, while the linearly independent solutions of (6.1) can be found in Theorem 6.4. The special case of the group inversion is treated in Corollary 6.7.

Lemma 6.1

Let G be a group endowed with an involution \(x \mapsto x^*\). Let \(g,f:G\rightarrow \mathbb {C}\) satisfy the cosine subtraction law (6.1). Then

  1. (a)

    g is even, i.e., \(g^{*}=g\).

  2. (b)

    g is central \(\Leftrightarrow \) \(f^{*}=f \text { or } f^{*}=-f\).

Proof

(a). The right hand side of (6.1) is symmetric in xy, so \(g(xy^{*}) = g(yx^{*})\) for all \(x,y\in G\), which gives (a) for \(y=e\).

(b). Let \(x,y\in G\) be arbitrary. Writing (6.1) for the pairs \((x,y^{*})\) and \((y,x^{*})\), using (a) and subtracting the two identities obtained we derive that

$$\begin{aligned} g(xy) - g(yx) = f(x)f^{*}(y) - f^{*}(x)f(y). \end{aligned}$$
(6.2)

\(\Rightarrow \) If g is central, then (6.2) implies that f and \(f^{*}\) are linearly dependent. If \(f = 0\) then \(f = f^{*} = -f^{*}\). If \(f \ne 0\) then there exists a constant \(\alpha \in \mathbb {C}\) such that \(f^{*} = \alpha f\). Hence \(f = \alpha ^{2} f\). As \(f \ne 0\) we get that \(\alpha \in \{1,-1\}\), so that \(f^{*}=f \text { or } f^{*}=-f\).

\(\Leftarrow \) The converse is due to (6.2).\(\square \)

Lemma 6.2 connects the solutions of the cosine subtraction law to our theory above for the cosine addition law.

Lemma 6.2

Let G be a topological group endowed with a continuous involution \(x \mapsto x^{*}\).

The set of solutions \((g,f) \in C(G)^2\) of the cosine addition law (6.1) such that \(\{g,f\}\) is linearly independent equals the set of pairs \((g,f) \in C(G)^2\) such that

  1. (i)

    \((g,f,f^*)\) is a non-degenerate solution of (1.1), i.e., satisfies

    $$\begin{aligned} g(xy) = g(x)g(y) + f(x)f^{*}(y), \ x,y \in G, \text { and} \end{aligned}$$
    (6.3)
  2. (ii)

    \(g^* = g\).

Proof

Suppose \((g,f) \in C(G)^2\) is a solution of (6.1) such that \(\{g,f\}\) is linearly independent. From Lemma 6.1(a) we read that \(g^* = g\). Replacing y by \(y^*\) in (6.1) we find that

$$\begin{aligned} g(xy) = g(x)g^*(y) + f(x)f^*(y) = g(x)g(y) + f(x)f^*(y), \ x,y \in G, \end{aligned}$$

so that \((g,f,f^*)\) is a solution of (6.3). Since \(g^* = g\) we have \(\{g,f^*\} = \{ g^*,f^*\}\), and the latter set is linearly independent, because so is \(\{ g,f\}\).

Let conversely \((g,f) \in C(G)^2\) satisfy (i) and (ii). Replacing y by \(y^*\) in (6.3) we get by the help of Lemma 6.1(a) that

$$\begin{aligned} g(xy^*) = g(x)g^*(y) + f(x)f(y) = g(x)g(y) + f(x)f(y), \ x,y \in G, \end{aligned}$$

which shows that (gf) is a solution of (6.1). Since \((g,f,f^*)\) by assumption is non-degenerate, we have that \(\{g,f\}\) is linearly independent.\(\square \)

Proposition 6.3 below solves (6.1) when \(\{g,f\}\) is linearly dependent.

Proposition 6.3

Let G be a topological group endowed with a continuous involution \(x \mapsto x^{*}\). The solutions \(g,f\in C(G)\) of the cosine subtraction law (6.1) such that \(\{g,f\}\) is linearly dependent are the following.

  1. (i)

    \(g = \chi \) where \(\chi \in C(G)\) a multiplicative function such that \(\chi ^* = \chi \), and \(f = 0\).

  2. (ii)

    There exist a character \(\chi \in C(G)\) such that \(\chi ^{*} = \chi \) and a constant \(\beta \in \mathbb {C}{\setminus }\{0,-i,i\}\) such

    $$\begin{aligned} g = \frac{1}{1+\beta ^{2}}\chi \text { and } f = \frac{\beta }{1+\beta ^{2}}\chi .\end{aligned}$$

Proof

Let \(g,f \in C(G)\) be a solution of (6.1) such that \(\{ g,f\}\) is linearly dependent.

Suppose first that \(f = 0\). Here \(g(xy^*) = g(x)g(y)\). Replacing y by \(y^*\) and using that g is even (Lemma 6.1(a)) we get that \(g(xy) = g(x)g(y)\), so that \(\chi := g \in C(G)\) is multiplicative. This is (i).

Suppose next that \(f \ne 0\). It follows from (6.1) that \(g \ne 0\) as well, so \(f = \beta g\) for some \(\beta \in \mathbb {C}^*\). This reduces (6.1) to \(g(xy^*) = (1+\beta ^2)g(x)g(y)\). We observe that \(\beta \ne \pm i\), because \(\beta = \pm i\) implies the contradiction \(g = 0\). Using again that g is even we get that \(g(xy) = (1+\beta ^2)g(x)g(y)\), which gives us that \(\chi := (1 + \beta ^2)g \in C(G)\) is a character. This is (ii).

The converse is immediate, so we omit the details.\(\square \)

In Theorem 6.4 we solve the cosine subtraction law (6.1) when \(\{g,f\}\) is linearly independent. The theorem is the main result of section 6.

Theorem 6.4

Let G be a topological group endowed with a continuous involution \(x \mapsto x^{*}\). The solutions \(g,f\in C(G)\) of the cosine subtraction law (6.1) such that \(\{g,f\}\) is linearly independent are the following.

  1. (1)

    There exists a function \(k\in C(G)\) such that the matrix valued function \(\rho :=\begin{pmatrix} g &{} f\\ f^{*} &{} k \end{pmatrix}\) is a continuous, irreducible representation of G on \(\mathbb {C}^{2}\) satisfying \(\rho (x^{*}) = (\rho (x))^{t}\) for all \(x\in G\), where \((\rho (x))^{t}\) denotes the transpose of the matrix \(\rho (x)\).

  2. (2)

    \(g = (1+A) \chi \), \(f = \pm i(g-\chi )\), where \(A\in C(G)\) is a non-zero, additive function on G such that \(A^{*} = A\), and \(\chi \in C(G)\) is a character of G such that \(\chi ^{*} = \chi \).

  3. (3)

    \(g = \frac{\mu +\mu ^{*}}{2}\), \(f = \pm i(g-\mu )\), where \(\mu \in C(G)\) is a character of G such that \(\mu ^{*} \ne \mu \).

  4. (4)

    \(g = \frac{\mu +c^{2}\chi }{1+c^{2}}\), \(f = c^{-1}(g-\mu )\), where \(\chi ,\mu \in C(G)\) are characters of G such that \(\chi \ne \mu \), \(\chi ^{*} = \chi \) and \(\mu ^{*} = \mu \), and \(c\in \mathbb {C}{\setminus } \{0,i,-i\}\) is a constant.

  5. (5)

    \(g=\mathcal {A}+c_0\mu ^* + (1-c_0)\mu \), \(f=\pm i(g-\mu )\), where \(c_0 \in \mathbb {C}\) is a constant and \(\mu \in C(G)\) is a character of G such that \(\mu ^{*} \ne \mu \). Furthermore \(\mathcal {A}:=A([y_{0},\cdot ])\mu ^*\) where \(A\in C([G,G]){\setminus }\{0\}\) is an additive function satisfying the transformation law

    $$\begin{aligned} A(xyx^{-1})=\frac{\mu (x)}{\mu ^*(x)}A(y) \text { for all } x\in G \text { and } y\in [G,G], \end{aligned}$$

    and \(y_{0}\in G\) is chosen such that \(\mu ^*(y_{0})\ne \mu (y_{0})\). Finally

    $$\begin{aligned} \mathcal {A} - \mathcal {A}^* = (2c_0 - 1)(\mu - \mu ^*). \end{aligned}$$
    (6.4)

The classes (1) - (5) are mutually disjoint.

In (2), (3) and (4) the functions g and f are abelian. They are not central in (1) and (5), so they are in particular not abelian in these classes.

g is even.

In (2) and (4) f is even, and it is odd in (3), but it is neither even nor odd in (1) and (5).

In (1) the functions g, f, \(f^{*}\) and k are linearly independent. In (5) both \(\{\mathcal {A},\mu ,\mu ^{*}\}\) and \(\{g,f,f^{*}\}\) are linearly independent.

Proof

We get the solutions \(g,f \in C(G)\) of (6.1) such that \(\{ g,f\}\) is linearly independent by the help of Lemma 6.2. According to the lemma we shall find the non-degenerate solutions of (1.1) of the form \((g,f,f^*)\) and impose the condition that \(g^* = g\). The non-degenerate solutions of (1.1) are written down in (a)-(d) of Theorem 5.1, so we shall go through these points one by one to get (1)–(5) of the present theorem.

(a) Here there exists \(k \in C(G)\) such that \(\rho :=\begin{pmatrix} g &{} \quad f\\ f^{*} &{} \quad k \end{pmatrix}\) is a continuous, irreducible representation of G on \(\mathbb {C}^{2}\). It follows from Lemma 3.1(c) that g is even if and only if \(\rho (x^*) = \rho (x)^t\) for all \(x \in G\). This gives (1).

(b) \((g,f,f^{*})\) is of the form from Theorem 5.1(b). Using that \(g^{*} = g\) we obtain that \(f^{*} = -c(g-\chi ) = c^{-1}(g-\chi ^{*})\), and so that

$$\begin{aligned} (1+c^{2})g = c^{2}\chi + \chi ^{*}, \end{aligned}$$
(6.5)

which implies that \((1+c^{2})g\in \text {span}\{\chi ,\chi ^{*}\}\). As \(g = (1+A)\chi \) we get that \((1+c^{2})A\chi \in \text {span}\{\chi ,\chi ^{*}\}\). From [1, Lemma 4.4] we deduce that \(1+c^{2} = 0\). Hence \(c\in \{-i,i\}\). Substituting this in (6.5) we obtain \(\chi ^{*} = \chi \). Since \(g = (1+A)\chi \) is even we see that \(A^{*} = A\). The converse is easy, and we obtain (b).

(c) \((g,f,f^{*})\) is of the form from Theorem 5.1(c). Using that \(g^{*} = g\) and the formulas of f and \(f^{*}\) we obtain like in (2) that

$$\begin{aligned} (1+c^{2})g = c^{2}\chi + \mu ^{*}. \end{aligned}$$
(6.6)

Now \(g^{*} = g\), so \(c^{2}\chi ^{*} + \mu = c^{2}\chi + \mu ^{*}\), which implies that

$$\begin{aligned} c^{2}\chi ^{*} - c^{2}\chi + \mu - \mu ^{*} = 0. \end{aligned}$$
(6.7)

As \(c \ne 0\) we get from (6.7) that \(\chi =\chi ^{*}\Leftrightarrow \mu = \mu ^{*}\). Due to the linear independence of distinct characters ([4, Theorem 3.18]) (here \(\chi \) and \(\mu \)) we obtain from (6.7), that there are two possibilities \(\chi = \mu ^{*}\) and \(\chi = \chi ^{*}\).

The first possibility is \(\chi = \mu ^{*}\). Here \(\chi ^{*} = \mu \), and (6.7) reduces to \((1+c^{2})(\chi - \mu )=0\). So \(c\in \{-i,i\}\). Since \(g^{*} = g\) we get that \(c_{1} \chi + (1-c_{1})\chi ^{*} = c_{1} \chi ^{*} + (1-c_{1})\chi \). Now \(\chi \) and \(\chi ^{*}\) are distinct characters of G, so from their linear independence we deduce that \(c_{1} = 1-c_{1}\), and so that \(c_{1} = \frac{1}{2}\). This gives us the formulas of (3). The converse is easily checked.

The second possibility is \(\chi = \chi ^{*}\). Here \(\mu = \mu ^{*}\), and (6.6) becomes \((1+c^{2})g = c^{2}\chi + \mu \). Now \(1+c^{2} \ne 0\) because \(\chi \) and \(\mu \) are distinct characters of G, so \(g = \frac{\mu +c^{2}\chi }{1+c^{2}}\) and \(c \ne \pm i\). This gives us the formulas of (4). The converse is easily verified.

(d) \((g,f,f^{*})\) is of the form from Theorem 5.1(d). Thus

$$\begin{aligned} g = \mathcal {A} + c_0\chi + (1-c_0)\mu , \end{aligned}$$

where \(\chi , \mu \in C(G)\) are continuous, different characters of G, and \(c_0 \in \mathbb {C}\) is a constant. \(\mathcal {A} \ne 0\) by the last line of Theorem 5.1. Note the \(y_0 \in S\) occurring in \(\mathcal {A}\) is chosen so that \(\chi (y_0) \ne \mu (y_0)\). Furthermore

$$\begin{aligned} f = \frac{1}{c}(g - \mu ) \text { and } f^* = -c(g - \chi ) \end{aligned}$$

for some constant \(c \in \mathbb {C}^*\). From \(g = g^*\) it follows that

$$\begin{aligned} \mathcal {A} + c_0\chi + (1-c_0)\mu = \mathcal {A}^* + c_0\chi ^* + (1-c_0)\mu ^*, \end{aligned}$$

so that

$$\begin{aligned} \mathcal {A} - \mathcal {A}^* = c_0(\chi ^* - \chi ) + (1-c_0)(\mu ^* - \mu ). \end{aligned}$$
(6.8)

Applying the involution \(*\) to the formula for \(f^*\) we get that \(f = -c(g^* - \chi ^*) = -c(g - \chi ^*)\). When we combine this with the formula for f we get that

$$\begin{aligned} \frac{1}{c}(g - \mu ) = -c(g - \chi ^*), \end{aligned}$$

which implies that

$$\begin{aligned} (c^2 + 1)g = c^2\chi ^* + \mu . \end{aligned}$$

When we here insert the formula for g we get the identity

$$\begin{aligned} (1+c^2)\mathcal {A} + (1+c^2)(c_0\chi + (1-c_0)\mu ) = c^2 \chi ^* + \mu . \end{aligned}$$

If \(1+c^2 \ne 0\) then \(\mathcal {A}\) is central and hence \(\mathcal {A} = 0\) by [6, Proposition 5.3(b)]. But this is a contradiction since \(\mathcal {A} \ne 0\), so \(1+c^2 =0\) or equivalently \(c = \mp i\). The identity reduces to \(0 = c^2\chi ^* + \mu \), or equivalently that \(\chi = \mu ^*\).

For the initial formulas of the present point (d) we now get that

$$\begin{aligned} g&= \mathcal {A} + c_0\mu ^* + (1-c_0)\mu , \\ \mathcal {A} - \mathcal {A}^*&= (2c_0 - 1)(\mu - \mu ^*), \\ f&= \pm i(g - \mu ). \end{aligned}$$

We have thus obtained the formulas and the conditions under (5).

Conversely, if (5) holds, then \(g,f \in C(G)\) is a solution of the cosine subtraction law (6.1) such that f and g are linearly independent. The main point in the verification of this is to show that \(g(xy^*) = g(x)g(y) + f(x)f(y)\). This uses the formula \(\mathcal {A}(xy) = \mathcal {A}(x)\mu ^*(y) + \mu (x)\mathcal {A}(y)\) for \(x,y \in G\), which is [6, Proposition 5.3(a)] with \(\chi = \mu ^*\).

We next sketch why the classes (1)–(5) are mutually disjoint: By a case by case inspection we see that if (gf) is as in Theorem 6.4(1), respectively (2), respectively (3) or (4), respectively (5), then (gfh) where \(h = f^*\), is in Theorem 5.1(a), respectively (b), respectively (c), respectively (d). Due to the disjointness in Theorem 5.1 we get disjointness in Theorem 6.4 as well, except that we need to verify that the classes (3) and (4) are disjoint. We leave this to the reader; the fact that distinct characters are linear independent is a crucial ingredient.

The functions g and f are abelian in (2), (3) and (4) as the formulas of them disclose. In (1), respectively (5), \((g,f,f^*)\) is in Theorem 5.1(a), respectively (d), with \(h = f^*\), so as mentioned in Theorem 5.1g and f are not central.

We have that g is even by Lemma 6.1(a). In (2) and (4) we get that f is even from the formula for it because \(g^{*} = g\). In (3) we get \(f = \pm i (g-\mu ) = \pm i\frac{\mu ^{*}-\mu }{2}\), which shows that f is odd.

As we saw above, g is not central in (1) and (5), so we deduce by Lemma 6.1(b), that f is neither even nor odd.\(\square \)

We illustrate Theorem 6.4 by two corollaries that show how it simplifies in some important cases, because both (1) and (5) of the theorem are void in the corollaries. We see in particular that all the continuous solutions are abelian. The first corollary holds for any continuous involutions, while the second corollary deals with the group inversion.

Corollary 6.5

Let G be a nilpotent, connected topological group with a continuous involution \(x \mapsto x^*\). The solutions \(g,f\in C(G)\) of the cosine subtraction law (6.1) are the following pairs.

  1. (i)

    \(g = (1+A) \chi \), \(f = A\chi \), where \(A\in C(G)\) is an additive function on G such that \(A^{*} = A\), and \(\chi \in C(G)\) is a multiplicative function on G such that \(\chi ^{*} = \chi \).

  2. (ii)

    \(g = \frac{\mu +\mu ^{*}}{2}\), \(f = \frac{\mu - \mu ^*}{2i}\), where \(\mu \in C(G)\) is a character of G such that \(\mu ^{*} \ne \mu \).

  3. (iii)

    \(g = \frac{\mu +c^{2}\chi }{1+c^{2}}\), \(f = \frac{c}{1+c^2}(\chi - \mu )\), where \(\chi ,\mu \in C(G)\) are different multiplicative functions on G such that \(\chi ^{*} = \chi \) and \(\mu ^{*} = \mu \), and where \(c\in \mathbb {C}{\setminus } \{0,i,-i\}\) is a constant.

Proof

The crux of the matter is that Theorem 6.4(1) is void by Lie’s theorem (see [3, Theorem 29.42]) for nilpotent, connected groups, and that Theorem 6.4(5) is void because \(A = 0\) for nilpotent groups by [6, Proposition 5.2]. We then get the corollary by combining Proposition 6.3 and Theorem 6.4, mainly by replacing a couple of times the word “character” in Theorem 6.4 by “multiplicative function”; the ± is absorbed in A and or in an interchange of \(\mu \) and \(\mu ^*\). The combining does not require anything about the topological group G and its continuous involution.\(\square \)

The derivation of Corollary 6.7 uses the following elementary result about characters on groups. We skip the proof of the lemma.

Lemma 6.6

Let \(\chi \) be a character of a group G. If G is a connected, topological group and \(\chi \in C(G)\), or if G is generated by its squares, then \(\check{\chi } = \chi \iff \chi = 1\) so \(\check{\chi } \ne \chi \iff \chi \ne 1\).

Corollary 6.7 is a generalization of the classic result about the cosine subtraction law on 2-divisible, topological, abelian groups ([4, Corollary 4.17]).

Corollary 6.7

Let G be a a connected topological group or a group generated by its squares. The solutions \(g,f \in C(G)\) of the cosine subtraction law

$$\begin{aligned} g(xy^{-1}) = g(x)g(y) + f(x)f(y), \ x,y \in G, \end{aligned}$$

are the following pairs.

  1. (a)

    \(g = 0\) and \(f = 0\).

  2. (b)

    \(g = \frac{1}{1+\beta ^2}\) and \(f = \frac{\beta }{1+\beta ^2}\), where \(\beta \in \mathbb {C} {\setminus } \{ i,-i\}\) is a constant.

  3. (c)

    \(g = (\mu + \check{\mu })/2\) and \(f = (\mu - \check{\mu })/(2i)\), where \(\mu \in C(G)\) is a character of G such that \(\mu \ne 1\).

Proof

We first prove that Theorem 6.4(1) is void under the assumptions of Corollary 6.7. In (1) we are given a continuous, irreducible representation \(\rho \) of G on \(\mathbb {C}^2\) of the form

$$\begin{aligned} \rho (x) = \begin{pmatrix} g(x) &{} f(x) \\ \check{f}(x) &{} k(x) \end{pmatrix} \in GL(2,\mathbb {C}), \end{aligned}$$

such that \(\rho (x^{-1}) = (\rho (x))^t\) for all \(x \in G\).

Now \(D:= \det \rho : G \rightarrow \mathbb {C}^*\) is a continuous homomorphism of G into \(\mathbb {C}^*\), since \(\rho \) is a continuous group representation. The formula \(\rho (x^{-1}) = (\rho (x))^t\) implies that \(D(x^{-1}) = D(x)\) for all \(x \in G\), so \(D = 1\) by Lemma 6.6.

In terms of matrix elements the formula \(\rho (x^{-1}) = (\rho (x))^t\) says that

$$\begin{aligned} \rho (x^{-1})&= \rho (x)^{-1} = \begin{pmatrix} g(x) &{} \quad f(x) \\ \check{f}(x) &{} \quad k(x) \end{pmatrix}^{-1} = \frac{1}{D(x)} \begin{pmatrix} k(x) &{} \quad -f(x) \\ - \check{f}(x) &{} \quad g(x) \end{pmatrix} \\&= \begin{pmatrix} k(x) &{} \quad -f(x) \\ - \check{f}(x) &{} \quad g(x) \end{pmatrix} = \rho (x)^t = \begin{pmatrix} g(x) &{} \quad \check{f}(x) \\ f(x) &{} \quad k(x) \end{pmatrix}, \end{aligned}$$

from which we read that \(g = k\). But this contradicts the statement from Theorem 6.4 that the functions g, f, \(f^{*}\) and k are linearly independent in point (1).

We next prove that Theorem 6.4(5) is void under the assumptions of Corollary 6.7 by arriving at a contradiction. We find from [6, Proposition 5.3(e)] that \(\mathcal {A}^* = -\mathcal {A}\), which reduces (6.4) to \(2\mathcal {A} = (2c_0 -1)(\mu - \mu ^*)\). This shows that \(\mathcal {A}\) and hence also \(g = \mathcal {A} + c_0\mu ^* + (1-c_0)\mu \) are central. But g is not central in (5) by a statement in Theorem 6.4 after point (5).

Like in the proof of Corollary 6.5 only the points (i), (ii) and (iii) of Corollary 6.5 remain.

Consider (i). We get from \(A^* = A\) that \(A = 0\), which reduces (i) to \(g = \chi \), \(f = 0\), where \(\chi \in C(G)\) is a multiplicative function such that \(\chi = \check{\chi }\). This means by Lemma 6.6 that \(\chi = 0\) or \(\chi = 1\). Thus the solutions of (i) are contained in (a) and (b).

Consider (ii). The solutions of (ii) are clearly contained in (c).

Consider (iii). There are different possibilities.

If \(\mu = 0\), then \(g = \frac{c^2}{1+c^2}\chi \) and \(f = \frac{c}{1+c^2}\chi \). Now \(\chi \ne 0\), because \(\chi \ne \mu = 0\), so since \(\check{\chi } = \chi \) we have \(\chi = 1\) by Lemma 6.6. Taking \(\beta := 1/c\) we see that the solutions are in (b). The possibility \(\chi = 0\) can be treated similarly. If \(\chi \ne 0\) and \(\mu \ne 0\) we find that \(\chi = \mu = 1\). But this is a contradiction, because \(\chi \ne \mu \).

Conversely, it is easy to check that the pairs of functions defined in (a), (b) and (c) are continuous solutions.\(\square \)

Ebanks found in [2, Theorem 3.2(b)] the solutions \(g,f:S \rightarrow \mathbb {C}\) with g central of the cosine subtraction law (6.1) for any semigroup S. We strike out that g is central; the price is that our result (Theorem 6.4) is derived for groups, not semigroups. Example 6.8 presents a solution \(\{ g,f\}\) of (6.1) such that g is not central, and so is off the scope of [2].

Example 6.8

We let \(G = S_3 = \{ e, (12), (13), (23), (123), (132)\}\) be the symmetric group on three objects. It is not generated by its squares. We equip the finite group \(S_3\) with the discrete topology and the involution \(x^* = x^{-1}\). The following unitary, irreducible representation \(\rho \) of \(S_3\) on \(\mathbb {C}^2\) can be found in the monograph Hewitt and Ross [3, (27.61)(a)].

$$\begin{aligned} \rho (e)&= \begin{pmatrix} 1 &{} \quad 0 \\ 0 &{} \quad 1 \end{pmatrix}, \ \rho (12) = \begin{pmatrix} -1 &{} \quad 0 \\ 0 &{} \quad 1 \end{pmatrix}, \ \rho (13) = \begin{pmatrix} \frac{1}{2} &{} \quad -\frac{\sqrt{3}}{2} \\ -\frac{\sqrt{3}}{2} &{} \quad -\frac{1}{2} \end{pmatrix}, \\ \rho (23)&= \begin{pmatrix} \frac{1}{2} &{} \quad \frac{\sqrt{3}}{2} \\ \frac{\sqrt{3}}{2} &{} \quad -\frac{1}{2} \end{pmatrix}, \ \rho (123) = \begin{pmatrix} -\frac{1}{2} &{} \quad -\frac{\sqrt{3}}{2} \\ \frac{\sqrt{3}}{2} &{} \quad -\frac{1}{2} \end{pmatrix},\ \rho (132) = \begin{pmatrix} -\frac{1}{2} &{} \quad \frac{\sqrt{3}}{2} \\ -\frac{\sqrt{3}}{2} &{} \quad -\frac{1}{2} \end{pmatrix}. \end{aligned}$$

If A is a matrix, we let \(A_{ij}\) denote its ij’th entry. We define \(g(x):= \rho (x)_{11}\), \(f(x):= \rho (x)_{12}\), \(h(x):= \rho (x)_{21}\) for \(x \in S_3\). Noting that \(\rho \) is not just a unitary representation of \(S_3\) but also a representation by real valued matrices, we get that

$$\begin{aligned} \rho (x^*) = \rho (x^{-1}) = \rho (x)^{-1} = (\overline{\rho (x)})^t = \rho (x)^t \ \text { for } x \in S_3, \end{aligned}$$
(6.9)

which is one of the conditions in Theorem 6.4(1). By (6.9) we get that

$$\begin{aligned} h(x) = \rho (x)_{21} = (\rho (x)^t)_{12} = (\rho (x^{-1}))_{12} = f(x^{-1}) = f^*(x) \ \text { for } x \in S_3, \end{aligned}$$

so \(h = f^*\), and so \(\rho \) has the correct form for Theorem 6.4(1). Thus (gf) is a solution of (6.1) such that \(\{ g,f\}\) linearly independent. According to Theorem 6.4(1) g is not central, but this fact can of course also be verified directly: \(g((23)(123)) = g(12) = -1\), while \(g((123)(23)) = g(13) = 1/2\).