# What's the importance of a formula for the real and imaginary parts of a complex number?

I've learned that

$$\bbox[8px,border:1px solid black]{\operatorname{Re}(z)= \frac{z+\overline{z}}{2} \qquad \qquad \operatorname{Im}(z)=\frac{z-\overline{z}}{2i}}$$

And that in the number $z=a+bi$, $a$ is the real part and $b$ is the imaginary part. The formulas I mentioned above are used to get $a$ and $b$ alone. But by looking at $z$, I could get the real part just by taking $a$ and ignoring the rest. The same is valid for $b$ and in both cases, without using the formulas. So why are these formulas important? I just learned the basics of complex numbers and still don't know why one needs those formulas.

-
"But by looking at $z$, I could get the real part just by taking $a$ and ignoring the rest. The same is valid for $b$ and in both cases, without using the formulas." What if you're not given a complex number in the form $a+ib$? What if you're given, say, $\sqrt{17}e^{i\pi/13}$? –  Git Gud Jun 27 '14 at 16:40
But by looking at z, I could get the real part just by taking a and ignoring the rest: this statement is true only if you're given $z$ in algebraic form. What if you're given $z=\mathrm{e}^{2i}$? (Edit: beaten by @GitGud). –  gniourf_gniourf Jun 27 '14 at 16:41
Well for one, you have an algebraic (as opposed to geometric or intuitive) proof that $|Re(z)|=|\frac{z+\bar{z}}{2}|<\frac{1}{2}(|z|+|\bar{z}|) = \frac{2}{2}|z|=|z|$ –  Squirtle Jun 27 '14 at 16:45
I see. I still didn't read about complex numbers expressed in that way. I just discovered a few seconds ago that they are called complex numbers in the exponential form. –  Jesus Christ Jun 27 '14 at 16:47
@GitGud In that case we use $\mathrm{e}^{\mathrm{i}\theta} = \cos\theta + \mathrm{i}\sin\theta$ and conclude that $a=\sqrt{17}\cos\frac{\pi}{13}$ and $b=\sqrt{17}\sin\frac{\pi}{13}$. –  Fly by Night Jun 27 '14 at 17:00

This is a nice question. We often learn formulae without asking why they are useful.

I've re-typed this post half a dozen times. Every time, I thought I had a nice use, but then found out that I didn't need the formulae after all. Having said that, I think that I have found one.

Using the exponential form $z=\mathrm{e}^{\mathrm{i}\theta} = \cos\theta + \mathrm{i}\sin\theta$, we see that

$$\begin{eqnarray*} \cos\theta &=& \frac{1}{2}\!\left(\mathrm{e}^{\mathrm{i}\theta} + \mathrm{e}^{-\mathrm{i}\theta}\right) \\ \\ \sin\theta &=& \frac{1}{2\mathrm{i}}\!\left(\mathrm{e}^{\mathrm{i}\theta} - \mathrm{e}^{-\mathrm{i}\theta}\right) \end{eqnarray*}$$ We can use these formulae to evaluate sine and cosine over the complex plane: $$\begin{eqnarray*} \cos(\mathrm{i}) &=& \frac{1}{2}\!\left(\mathrm{e}^{\mathrm{i}\mathrm{i}} + \mathrm{e}^{-\mathrm{i}\mathrm{i}}\right) \\ \\ &=& \frac{1}{2}\!\left(\mathrm{e}^{-1} + \mathrm{e}^{1}\right) \\ \\ &=& \frac{1+\mathrm{e}^2}{2\mathrm{e}}\approx 1.543 \end{eqnarray*}$$ I have ignored the multi-valued problem, i.e. $\mathrm{e}^{\mathrm{i}\theta} = \mathrm{e}^{\mathrm{i}(\theta+2\pi k)}$ for all $k \in \mathbb{Z}$.

-
Using $\cos\theta = 1/2(e^{i\theta} + e^{-i\theta})$ is also handy for evaluating certain integrals of the form $\int{e^{a\theta}\cos{(b\theta)}d\theta}$. –  Hao Ye Jun 27 '14 at 21:55
These presentations of the trigonometric functions also explain (in some sense) the strong parallels between trig functions and hyperbolic functions. –  Steven Taschuk Jun 28 '14 at 3:59
@StevenTaschuk Absolutely. I see them as a single function. If $z \in \mathbb{R}$ then we get the good, old fashioned, cosine function. If $z \in \mathrm{i}\mathbb{R}$ we get the hyperbolic cosine function. I remember first learning this. I got such a buzz. –  Fly by Night Jun 29 '14 at 13:19

For example, you know that $e^z=e^{x+iy}=e^x(\cos y + i \sin y)$ and $\overline{e^z}=e^{\overline{z}}=e^x(\cos y -i \sin y)$, so you have two pretty equations $\sin y=\frac{e^{iy}-e^{-iy}}{2i}$ and $\cos y=\frac{e^{iy}+e^{-iy}}{2}$.

-
Could you justify your claim that $\overline{\mathrm{e}^z}=\mathrm{e}^{\overline{z}}$? In general $\overline{\mathrm{f}(z)} \neq \mathrm{f}(\overline{z})$. –  Fly by Night Jun 27 '14 at 17:41
@Ian The comments section of an answer is to allow people to ask for extra detail or to suggest improvements from the person answering the question. My comment was directed at agha and was a request for him to justify his steps. It was not a general appeal for an answer. Had that been the case then I would have posted it as a question. –  Fly by Night Jun 27 '14 at 17:49
@Fly by night Yes, you'er right, it's property of exponential function, we have $e^{x+iy}=e^x(\cos y + i \sin y)$ by definition, so, $\overline{e^z}=e^x(\cos y - i \sin y)=e^x(\cos -y - i \sin -y)=e^{x-iy}=e^{\overline{z}}$ –  agha Jun 27 '14 at 18:01
Euler's formula for complex exponentials is not a definition, it is a formula. We do have $\overline{f(z)}=f(\overline{z})$ in any region symmetric about the real axis where $f$ is defined by a real-coefficient power series, which is all of $\Bbb C$ for $\exp$. –  blue Jun 27 '14 at 18:05
@blue Let's be careful here. What do you mean by "real-coefficient power series"? The power series of $\mathrm{e}^{\mathrm{i}\theta}$ has real coefficients for all even powered terms and imaginary coefficients for all odd powered terms. $$1+\mathrm{i}\theta-\frac{1}{2}\theta^2-\frac{\mathrm{i}}{3!}\theta^3+\frac{1}{‌​4!}\theta^4-\frac{\mathrm{i}}{5!}\theta^5+\cdots$$ –  Fly by Night Jun 27 '14 at 18:35

You have $z + \bar{z} =4$

and you are asked to find real part of the complex number you get it by this formula. This is most basic use of this formula, later you advance in the course you will see its importance .

One suggestion whenever learning a new topic and its foundation do not think what is its importance unless you are genius it just that let question come think how formula is applied and then rereading the topic you can yourself get to the point. Though it is good that you asked here as it opens the grounds for you to see it's far reaching application.

-

Allow me to explain a couple of uses for the formulas for $\sin$ and $\cos$ in terms of $e^{iz}$.

We can combine them with the geometric sum formula to compute various trigonometric sums and products without hard-to-remember trig formulas. E.g. $\sin(x)+\sin(2x)+\cdots+\sin(nx)$.

We can interchange between Fourier expansions in terms of real sines and cosines or complex exponentials, or compute integrals involving sines and cosines (e.g. the orthogonality relations).

Additionally, while those formulas for the real and imaginary parts of a complex number may not be entirely ubiquitous, the idea behind them is very important in higher math: decomposing something into its "eigenparts." This appears in linear algebra, where a diagonalizable operator can be decomposed as a direct sum of scalar operators on eigensubspaces. One can symmetrize or antisymmetrize tensors (or perform even more exotic skew-symmetrizations). One can decompose a function into an integral mixture of dual functions (characters in the generalized setting of locally compact abelian groups and abstract harmonic analysis). One can decompose into roots and weights in the setting of Lie algebras and representation theory. And so on.

-

One example of a domain in which these can be useful is differential equations.
Given, say, the equation $\frac{d^2y}{dx} + y = 0$ there are techniques that allow you to determine that the solution is $y = a\cdot e^{ti} + b\cdot e^{-ti}$ where $a$ and $b$ are arbitrary complex numbers. Knowing that $e^{ti} = \overline{e^{-ti}}$, and that Re(z) and Im(z) can be written as linear combinations of $z$ and $\bar{z}$, we can reformulate the solution as $y = c \cdot Re(e^{ti}) + d \cdot Im(e^{ti})$ or $y = c \cdot cos(t) + d \cdot sin(t)$ (with $c$ and $d$ again arbitrary constants).

Basically, knowing those identities helped us find a solution to the equation using only real numbers.

-