# Does frequency f = $\frac1T$ if there is non-periodic signal

Through what I learned from school, frequency $f=\frac1T$ while $T$ is the period. However, things get harder in college where there are non-periodic signal. That means they have no period or their period is extended to infinity but they still have frequency. How can they have frequencies even there is no period to apply the formula $f=\frac1T$? Is there any definition of frequency in those cases.

Nonperiodic signals can be described by their frequency spectrum. If you think of a sine, this signal has only one frequency. If you think of a signal that is the sum of three sine waves with different frequencies the signal has 3 frequencies.

Nonperiodic signals are viewed as the sum of an infinite sum of periodic signals. Check out the Fourier analysis.

So, with nonperiodic frequencies you speak of dominant frequencies or dominant part of the spectrum.

In most cases you can't pick one $f$ to define a random signal. You can however break parts of the signal into frequency components for a fixed sample time of the signal. This is called a Fourier Transform and for sampled data see Discrete Fourier Transform. You can also talk about frequency characteristics of the signal like bandwidth, center frequencies, spectral content, modulation rates, etc.

Here's a quick example of looking at the frequency spectrum of a random signal.

The formula $f = \frac{1}{T}$ gives the fundamental frequency of a periodic signal with period $T$.

But periodic signals can be composed of (can be the sum of) an infinity of sinusoids of related frequencies, e.g., a square wave, so in general, we can't speak of the frequency of a periodic signal.

For an aperiodic signal, there is no fundamental frequency to speak of but we can consider an aperiodic signal to be composed of a continuous distribution of sinusoids, e.g., a rectangular pulse So, even though there isn't a fundamental frequency (or period) associated with an aperiodic signal, there is an associated distribution of frequencies.