# Wave Walker DSP

## Buy the Book!

DSP for Beginners: Simple Explanations for Complex Numbers! The second edition includes a new chapter on complex sinusoids.

How Euler’s Formula Relates Triangles, the Unit Circle and Complex Sinusoids
September 16, 2021

#### Introduction

Sines and cosines are the foundation for representing signals and the affects of filters and therefore understanding their mathematics is one of the foundational tools for signal processing. Euler’s formula is a mathematically compact and useful representation used for representing complex sinusoids.

#### Sine and Cosine

Sine and cosine refer to the opposite and adjacent lengths of a triangle with angle as shown in Figure 1.

Sine, referenced as , is a perfectly periodic function in x where

(1)

for any x. The lengths of the triangle in Figure 1 will continually repeat as cycles from 0 to , then to , and so on.

Sine and cosine are just phase shifts of one another, such that

(2)

(3)

Figure 2 gives an example of and . Notice that sine and cosine are linked together as travels around the unit circle, the only difference being that cosine lags sine by .

#### Sine Wave

Where the terms sine and cosine refer to a single angle, a sine wave or sinusoid refers to and which vary over multiple values of x. To be useful as a mathematical tool a sine wave will have three parameters which describe it completely: amplitude A, frequency and phase ,

(4)

where t is time. Figure 3 gives examples of how a sine wave is effected by different values of A, and .

The amplitude A changes the vertical scale of the sinusoid and is related to the energy of the sine wave.

The phase relates to the position the sinusoid starts. For example, refers to the angle of the triangle as if it was a clock hand pointing at 3 o’clock. The phase also can appear as a time delay as larger values seem to time-shift the sinusoid.

The frequency refers to the speed and direction at which the triangle’s angle is rotating from 0 to . A positive frequency means the angle will cycle through the unit circle in a counter-clockwise direction where as a negative frequency will have the angle cycle through the unit circle in a clockwise direction. A larger frequency means the angle will cycle through the unit circle faster than a small frequency in the same measure of time.

#### Euler's Formula

Leonhard Euler (pronounced oiler) created the formula which relates sine and cosine through a complex exponential according to

(5)

where . The complex sinusoid can be described more generically as of the form in (4) by

(6)

with amplitude A, frequency and phase .

Euler’s formula is a mathematically compact tool for representing sinusoids. A complex sinusoid simultaneously represents both the real and imaginary portion. The real portion can be obtained by using the real operator and the imaginary portion can be selected by using the imaginary operator such that

(7)

(8)

Two other mathematical properties are useful which relate and individually to complex exponentials are

(9)

(10)

Equation (9) can be derived from (5) by adding ,

(11)

Dividing both sides of (11) by 2 gives the final relationship,

(12)

Similarly (10) can be derived from (5) by subtracting ,

(13)

Dividing both sides of (13) by 2j gives the final relationship,

(14)

#### Conclusion

Sines and cosines are a foundational tool in DSP. Understanding the phase relationships between sine and cosine, as well as Euler’s formula (5) and its representations (9) and (10) are foundational to understanding before building more sophisticated DSP algorithms.

Don’t forget to check out these blogs on complex sinusoids:

### One Response

God, the Lord, is my strength; He makes my feet like the deer's; He makes me tread on my high places. Habakkuk 3:19
For everything there is a season, and a time for every matter under heaven. A time to cast away stones, and a time to gather stones together. A time to embrace, and a time to refrain from embracing. Ecclesiastes 3:1,5
The earth was without form and void, and darkness was over the face of the deep. And the Spirit of God was hovering over the face of the waters. Genesis 1:2
Behold, I am toward God as you are; I too was pinched off from a piece of clay. Job 33:6
Enter His gates with thanksgiving, and His courts with praise! Give thanks to Him; bless His name! Psalm 100:4
Lift up your hands to the holy place and bless the Lord! Psalm 134:2
Blessed is the man who trusts in the Lord, whose trust is the Lord. He is like a tree planted by water, that sends out its roots by the stream, and does not fear when heat comes, for its leaves remain green, and is not anxious in the year of drought, for it does not cease to bear fruit. Jeremiah 17:7-8
He said to him, “You shall love the Lord your God with all your heart and with all your soul and with all your mind. This is the great and first commandment. And a second is like it: You shall love your neighbor as yourself. On these two commandments depend all the Law and the Prophets.” Matthew 22:37-39
Then He said to me, “Prophesy over these bones, and say to them, O dry bones, hear the word of the Lord. Thus says the Lord God to these bones: Behold, I will cause breath to enter you, and you shall live." Ezekiel 37:4-5
Riches do not profit in the day of wrath, but righteousness delivers from death. Proverbs 11:4
The angel of the Lord appeared to him in a flame of fire out of the midst of a bush. He looked, and behold, the bush was burning, yet it was not consumed. And Moses said, “I will turn aside to see this great sight, why the bush is not burned.” When the Lord saw that he turned aside to see, God called to him out of the bush, “Moses, Moses!” And he said, “Here I am.” Exodus 3:2-3
Daniel answered and said: “Blessed be the name of God forever and ever, to whom belong wisdom and might. He changes times and seasons; He removes kings and sets up kings; He gives wisdom to the wise and knowledge to those who have understanding." Daniel 2:20-21
Now the Lord is the Spirit, and where the Spirit of the Lord is, there is freedom. 2 Corinthians 3:17

This website participates in the Amazon Associates program. As an Amazon Associate I earn from qualifying purchases.

© 2021-2024 Wave Walker DSP