Triangular & Sawtooth Waves
The complete guide to the two great ramp waveforms — the triangular wave with its equal linear rise and fall, and the sawtooth wave with its slow ramp and fast flyback. From peak, RMS and crest factor to Fourier harmonics, how they are generated, and the all-important triangle PWM/SPWM carrier that powers inverters.
Complete Learning Path — Triangular & Sawtooth
From what each ramp waveform is, to their parameters, Fourier harmonics, how they are generated and where they are used
What is a Triangular Wave?
A triangular wave is a periodic, non-sinusoidal waveform that rises and falls in straight lines with equal slopes, tracing a row of triangles. Its rise time equals its fall time, so it is perfectly symmetric.
Unlike a sine wave, the triangular wave changes at a constant rate (constant slope) and turns sharply at each peak. Yet because it contains only fast-shrinking odd harmonics, it is the smoothest of the common non-sinusoidal waves.
Constant slope = constant rate of change
Between peaks the voltage changes at a fixed rate, the ramp rate dv/dt = 4Vm/T. That linear ramp is exactly why triangular waves are prized as PWM carriers and for testing amplifier slew rate and linearity.
What is a Sawtooth Wave?
A sawtooth wave is a ramp waveform: it climbs linearly over almost the whole period, then drops back almost instantly — a step called the flyback (or retrace). This makes it strongly asymmetric, and it is named for its resemblance to the teeth of a saw.
ramp rate = Vpp / T
The sawtooth rises at a steady rate over its period, then resets
Rising vs falling sawtooth
A sawtooth can ramp up then drop, or ramp down then jump up (an inverse or reverse sawtooth). Both are the same waveform in mirror image; the rising ramp is the classic form used in oscilloscope timebases.
Triangular vs Sawtooth
Both are ramp-based, non-sinusoidal and share the same RMS value — but their symmetry and harmonic content set them apart.
| Property | Triangular wave | Sawtooth wave |
|---|---|---|
| Symmetry | Symmetric (equal rise & fall) | Asymmetric (slow ramp, fast flyback) |
| Harmonics | Odd only, ∝ 1/n² | All (even & odd), ∝ 1/n |
| Smoothness | Smoother (closest to sine) | Richer / brighter |
| RMS value | Vm/√3 | Vm/√3 |
| Crest factor | √3 ≈ 1.732 | √3 ≈ 1.732 |
| Classic use | PWM carrier, function gen. | Oscilloscope timebase, synths |
Waveform Parameters
Like any AC waveform, ramp waves are described by their peak, RMS and average values, plus their form and crest factors.
| Parameter | Symbol / formula | Triangular & sawtooth |
|---|---|---|
| Peak value | Vm | maximum height from zero |
| Peak-to-peak | Vpp = 2Vm | trough to crest |
| Period / frequency | T, f = 1/T | one full ramp cycle |
| Average (half cycle) | Vavg = Vm/2 | 0.5 Vm |
| RMS value | Vrms = Vm/√3 | ≈ 0.577 Vm |
| Form factor | kf = Vrms/Vavg | 2/√3 ≈ 1.155 |
| Crest (peak) factor | kc = Vm/Vrms | √3 ≈ 1.732 |
Vrms = Vm / √3 ≈ 0.577 Vm
RMS value of a triangular OR sawtooth wave — the same for both
Worked example
A triangular wave has a peak of Vm = 10 V. Then:
Vpp = 20 V, Vrms = 10/√3 ≈ 5.77 V, Vavg = 5 V, crest factor = 10/5.77 ≈ 1.73.
Harmonics & Fourier Series
Every periodic wave is a sum of sinusoids. The harmonic content is what makes a triangle look smooth and a sawtooth look sharp.
Triangular series
(8Vm/π²)Σ (±1/n²) sin(nωt)
Odd n only. The 1/n² roll-off means very small high harmonics.
Sawtooth series
(2Vm/π)Σ (±1/n) sin(nωt)
All n. The slow 1/n roll-off gives a bright, harmonic-rich tone.
Why it matters
The harmonic content decides audio timbre, filter design and frequency-domain behaviour. Rich harmonics also mean more distortion to filter out — see harmonics & THD in the same Waveforms & Signals family.
How Triangular & Sawtooth Waves Are Generated
Both come from the same idea: charge something at a steady rate to make a straight ramp.
Triangle ← integrate a square
An op-amp integrator fed a square wave outputs a triangular wave — integrating a constant gives a ramp, and the alternating square flips the slope each half cycle.
Triangle ← equal charge/discharge
Charge a capacitor with a constant current, then discharge it with an equal constant current, and the voltage ramps up and down symmetrically.
Sawtooth ← charge then dump
Charge a capacitor with a constant current for a linear ramp, then rapidly discharge it — a relaxation oscillator (e.g. UJT or 555-based) does exactly this.
Function generators
Lab function generators and waveform ICs produce sine, square, triangular and sawtooth outputs from one core ramp circuit.
Applications — and the Triangle PWM Carrier
The star application on a power-electronics site: the triangular wave is the carrier in sine-triangle PWM, the technique behind almost every modern inverter.
Inverter SPWM
The triangle carrier vs sine reference sets the switching of inverters, VFDs and class-D amplifiers.
Oscilloscope timebase
The sawtooth sweeps the beam across the screen at a steady rate, then flies back to start again.
Music synthesis
Sawtooth and triangle are core synth oscillator shapes — bright/buzzy vs mellow/hollow.
ADC & test
Ramp/dual-slope ADCs use a linear ramp; triangles test amplifier linearity and slew rate.
Key Terms at a Glance
The essential ramp-waveform vocabulary students and engineers search for.
Triangular wave
Symmetric, equal rise & fall; odd harmonics (1/n²).
Sawtooth wave
Ramp up + fast flyback; all harmonics (1/n).
Ramp
A linear rising (or falling) segment.
Flyback
The fast reset step of a sawtooth.
RMS = Vm/√3
Effective value of both waves.
SPWM carrier
Triangle compared with a sine to make PWM.
Frequently Asked Questions
Quick, expert answers to the questions people ask most about triangular and sawtooth waves.
What is a triangular wave in simple words?
A triangular wave rises in a straight line, then falls in a straight line at the same rate, over and over — a row of triangles. It is symmetric and contains only odd harmonics that shrink fast (1/n²), so it is the smoothest common non-sine wave.
What is a sawtooth wave?
A sawtooth wave ramps up in a straight line for almost the whole cycle, then drops back almost instantly (the flyback). It is asymmetric, looks like saw teeth, and contains all harmonics falling off as 1/n.
What is the difference between a triangular and a sawtooth wave?
The triangle is symmetric (rise time = fall time) with odd harmonics (1/n²); the sawtooth is asymmetric (slow ramp, fast flyback) with all harmonics (1/n). Both have the same RMS, Vm/√3, and crest factor √3.
What is the RMS value of a triangular or sawtooth wave?
Both have Vrms = Vm/√3 ≈ 0.577 Vm. Their average value over a half cycle is Vm/2. See RMS Value for the derivation.
What is the crest factor of these waves?
The crest (peak) factor is Vm/Vrms = √3 ≈ 1.732 for both — higher than a sine wave's 1.414. See Form & Crest Factor.
What harmonics does a triangular wave have?
Only odd harmonics (1st, 3rd, 5th…), with amplitudes falling as 1/n². That rapid roll-off is why a triangle is far closer to a pure sine than a square or sawtooth.
How is a triangular wave used in PWM (SPWM)?
In sinusoidal PWM a high-frequency triangular carrier is compared with a sine reference. Whenever the sine is above the triangle the output is HIGH, so the pulse widths follow the sine. This sine-triangle method is how inverters and VFDs synthesise an AC output.
How are triangular and sawtooth waves generated?
A triangle comes from integrating a square wave, or charging and discharging a capacitor with equal currents. A sawtooth comes from charging a capacitor with a constant current for a ramp, then rapidly discharging it — a relaxation oscillator.
Is a sawtooth wave the same as a ramp?
A ramp is one linear rising segment; a sawtooth is that ramp repeated with a reset each period. So the rising part of a sawtooth is a ramp, and a repeating ramp is a sawtooth.
Conclusion & Key Takeaways
Triangular and sawtooth waves are the two great ramp waveforms — same RMS, different symmetry, and each with its own signature application.
Triangle = symmetric
Equal rise & fall.
Sawtooth = ramp + flyback
Asymmetric.
RMS = Vm/√3
Same for both.
Crest factor √3
≈ 1.732.
1/n² vs 1/n
Triangle smoother than sawtooth.
Triangle = PWM carrier
Heart of SPWM inverters.