When the sine function is plotted on a Cartesian axis it “looks like” a wave.

Move the circle radius to draw the sine wave.

A form of this wave is found in many physical phenomena, but it often needs to be compressed, stretched or shifted to properly model the phenomena.

It is therefore useful to know how to change the equation to achieve these transformations.

Vertical Shift

To shift the plot in \(y\), we add our desired offset \(B\) to the sine function.

\[\bbox[20px, border: 2px solid red]{y = \sin\left(\theta\right) + B}\]

Vertical Scale

To stretch or compress a sine function in \(y\), the function can be scaled with an amplitude \(A\).

\[\bbox[20px, border: 2px solid red]{y=A\sin\left(\theta\right)}\]

Drag the trace up and down to change the amplitude.

Horizontal Shift

We have seen previously that a function \(f(x)\) can be shifted in \(x\) by subtracting the shift from \(x\). So, a shift of \(+d\) results in:

\[y=f\left(x-d\right)\]

And a shift of \(-d\) results in:

\[y=f\left(x-(-d)\right) = f\left(x + d\right)\]

Therefore we can shift a sine function by an angle \(\phi\):

\[\bbox[20px, border: 2px solid red]{y=\sin\left(\theta - \phi\right)}\]

A horizontal shift in a sine function is often called a phase shift.

Horizontal Scale

The sine function repeats every time the input value \(\theta\) changes by \(2\pi\) radians.

What happens if we multiply the input value by \(2\pi\)?

\[y=\sin(2\pi\theta)\]

Now, every time the value \(\theta\) changes by 1 radian, the input to the sine function changes by \(2\pi\).

Instead of 1, if we want the function to repeat every change of \(r\) radians we can:

\[y=\sin\left(2\pi{\theta \over r}\right)\]

Now every time \(\theta\) changes by \(r\), the input to the sine function changes by \(2\pi\).

Let's rewrite this as:

\[\bbox[20px, border: 2px solid red]{y=\sin\left({2\pi \over r}\theta\right)} \ \ \ \ \ \ \ \ \ (1)\]

Drag the trace left and right to change how often it repeats.

The name and nomenclature for \(r\) changes depending on where the sine wave is being used.

Horiztonal Scale - Time

If the sine wave is modeling a phenomena in time, then the \(r\) term in equation (1) represents the period of time over which the function repeats. As such, it is usually referred to as period or \(T\).

\[y=\sin\left({2\pi \over T}t\right)\]

If the sine function repeats every \(T\) seconds, then the frequency it repeats is:

\[f={1 \over T}\]

Therefore we have:

\[y=\sin\left(2\pi f t\right)\]

\(2\pi f\) is the number of times \(2\pi\) radians is cycled through per second, and therefore is often called the angular frequency \(\omega\).

\[\bbox[20px, border: 2px solid red]{y=\sin\left(\omega t\right)}\]

Horiztonal Scale - Space

On the other hand if the sine wave is modeling a phenomena in space, then \(r\) in equation (1) represents the distance over which the function repeats. As such, it is usually referred to as wavelength or \(\lambda\).

\[y=\sin\left({2\pi \over \lambda}x\right)\]

The \({2\pi \over \lambda}\) term describes how many radians per unit distance the sine wave progresses through, and is often called the wave number \(k\):

\[\bbox[20px, border: 2px solid red]{y=\sin\left(kx\right)}\]

Both \(k\) and \(\omega\) serve the same function for space and time respectively. Both give the number of times the sine function repeats per unit length or unit time.

General Form

The general equation to shift and scale a sine function is:

\[\bbox[20px, border: 2px solid red]{y=A\sin\left({2\pi \over r} -\phi\right) + B}\]

Touch the amplitude, wavelength, phase or y offset terms of the equation and then move the trace in the direction of the arrows.