The fundamental trigonometric ratios formulas are defined as $\sin(\theta) = \frac{O}{H}$, $\cos(\theta) = \frac{A}{H}$, and $\tan(\theta) = \frac{O}{A}$. In electrical and electronics engineering, these geometric relationships map directly to the AC impedance triangle ($Z, R, X$) and the power triangle ($S, P, Q$). They are the mathematical engine used to resolve phase angles ($\theta$), calculate real versus reactive power, and determine total impedance magnitudes in alternating current circuits.
The Core Trigonometric Ratios and Symbol Definitions
Before applying these ratios to circuit analysis, we must define the variables strictly. The formulas assume a right-angled triangle, which in EE translates to orthogonal vector components (e.g., Real/Active power vs. Imaginary/Reactive power). They assume steady-state sinusoidal AC conditions for power and impedance calculations.
| Symbol | Geometric Name | EE Impedance Equivalent | EE Power Equivalent | Standard Unit |
|---|---|---|---|---|
| $\theta$ | Reference Angle | Phase Angle (Voltage vs. Current) | Power Factor Angle | Degrees (°) or Radians (rad) |
| $O$ | Opposite Side | Reactance ($X$) | Reactive Power ($Q$) | Ohms (Ω) / VAR |
| $A$ | Adjacent Side | Resistance ($R$) | Real/Active Power ($P$) | Ohms (Ω) / Watts (W) |
| $H$ | Hypotenuse | Impedance Magnitude ($Z$) | Apparent Power ($S$) | Ohms (Ω) / Volt-Amps (VA) |
The core formulas, expressed with these symbols, are:
- $\sin(\theta) = \frac{O}{H}$
- $\cos(\theta) = \frac{A}{H}$
- $\tan(\theta) = \frac{O}{A}$
For a deeper look at how these orthogonal vectors behave in AC systems, refer to the All About Circuits guide on True, Reactive, and Apparent Power, which visualizes the power triangle extensively.
Rearranged Forms for Circuit Variables
On the bench or in design software, you rarely solve for the ratio itself; you solve for a missing circuit variable. Below is the rearranged forms list solving for each variable algebraically.
Solving for the Hypotenuse ($H$, $Z$, or $S$)
- Using Sine: $H = \frac{O}{\sin(\theta)}$ → $Z = \frac{X}{\sin(\theta)}$ | $S = \frac{Q}{\sin(\theta)}$
- Using Cosine: $H = \frac{A}{\cos(\theta)}$ → $Z = \frac{R}{\cos(\theta)}$ | $S = \frac{P}{\cos(\theta)}$
Solving for the Opposite Side ($O$, $X$, or $Q$)
- Using Sine: $O = H \cdot \sin(\theta)$ → $X = Z \cdot \sin(\theta)$ | $Q = S \cdot \sin(\theta)$
- Using Tangent: $O = A \cdot \tan(\theta)$ → $X = R \cdot \tan(\theta)$ | $Q = P \cdot \tan(\theta)$
Solving for the Adjacent Side ($A$, $R$, or $P$)
- Using Cosine: $A = H \cdot \cos(\theta)$ → $R = Z \cdot \cos(\theta)$ | $P = S \cdot \cos(\theta)$
- Using Tangent: $A = \frac{O}{\tan(\theta)}$ → $R = \frac{X}{\tan(\theta)}$ | $P = \frac{Q}{\tan(\theta)}$
Solving for the Phase Angle ($\theta$)
- $\theta = \arcsin\left(\frac{O}{H}\right)$
- $\theta = \arccos\left(\frac{A}{H}\right)$
- $\theta = \arctan\left(\frac{O}{A}\right)$
Worked Examples: From Geometry to AC Impedance
Abstract formulas are useless without unit tracking and intermediate steps. Here are two solved problems demonstrating how these ratios apply to real-world EE scenarios.
Problem 1: Finding Phase Angle and Impedance in an RL Circuit
Given: A series motor winding has a measured DC resistance $R = 40\,\Omega$ and an inductive reactance $X_L = 30\,\Omega$ at 60 Hz.
Find: The total impedance magnitude $Z$ and the phase angle $\theta$.
Step-by-Step Solution:
- Identify knowns: $A = R = 40\,\Omega$, $O = X_L = 30\,\Omega$.
- Calculate $\theta$ using the tangent ratio:
$\tan(\theta) = \frac{O}{A} = \frac{30\,\Omega}{40\,\Omega} = 0.75$
$\theta = \arctan(0.75) = 36.87^\circ$ - Calculate $Z$ using the cosine ratio (Hypotenuse form):
$Z = \frac{R}{\cos(\theta)} = \frac{40\,\Omega}{\cos(36.87^\circ)} = \frac{40\,\Omega}{0.8} = 50\,\Omega$ - Verify using the Pythagorean theorem:
$Z = \sqrt{R^2 + X_L^2} = \sqrt{40^2 + 30^2} = \sqrt{1600 + 900} = \sqrt{2500} = 50\,\Omega$. The math holds.
Problem 2: Resolving Real and Reactive Power in an Industrial Load
Given: An industrial compressor draws an apparent power $S = 500\,\text{kVA}$ with a lagging power factor ($\cos(\theta)$) of $0.85$.
Find: The real power $P$ (in kW) and the reactive power $Q$ (in kVAR).
Step-by-Step Solution:
- Identify knowns: $H = S = 500\,\text{kVA}$, $\cos(\theta) = 0.85$.
- Calculate Real Power ($P$) using the cosine ratio:
$P = S \cdot \cos(\theta) = 500\,\text{kVA} \cdot 0.85 = 425\,\text{kW}$. - Find the angle $\theta$ to use in the sine ratio:
$\theta = \arccos(0.85) = 31.79^\circ$. - Calculate Reactive Power ($Q$) using the sine ratio:
$Q = S \cdot \sin(\theta) = 500\,\text{kVA} \cdot \sin(31.79^\circ) = 500\,\text{kVA} \cdot 0.5267 = 263.35\,\text{kVAR}$. - Verify using the tangent ratio:
$Q = P \cdot \tan(\theta) = 425\,\text{kW} \cdot \tan(31.79^\circ) = 425 \cdot 0.620 = 263.5\,\text{kVAR}$ (minor difference due to rounding $\theta$). For exact precision, use $Q = \sqrt{S^2 - P^2} = \sqrt{500^2 - 425^2} = 263.39\,\text{kVAR}$.
For more on how these power components interact on the grid, see the Georgia State University HyperPhysics AC Power module.
Common Unit Mistakes and Magnitude Checks
When applying the trigonometric ratios formula in code or on a calculator, specific unit mistakes will silently break your calculations. Here is what to watch for and what realistic answer magnitudes look like.
Which Unit Mistakes Break the Formula
- Radians vs. Degrees: Standard scientific calculators default to degrees, but programming environments (like C++
math.hon an ESP32 or Python'smathlibrary) strictly require radians. If your code outputs $\cos(60) = -0.95$ instead of $0.5$, you passed degrees into a radian function. Always convert using $\text{rad} = \text{deg} \cdot (\frac{\pi}{180})$. - Prefix Mismatch: Mixing base units with prefixed units. If $P = 5000\,\text{W}$ and $S = 5\,\text{kVA}$, calculating $\cos(\theta) = \frac{5000}{5} = 1000$ will crash your calculator's arccos function. Always normalize to base units (Watts, VA, VAR) before dividing.
- Using
atan()instead ofatan2(): In embedded systems, using $\theta = \arctan(\frac{X}{R})$ loses quadrant information. If $R$ is negative (representing a specific active circuit topology), standard arctangent maps it to the wrong quadrant. Always useatan2(O, A)in code to preserve the full -180° to +180° phase space.
Realistic Answer Magnitudes
- The Ratio Itself: The output of $\sin(\theta)$ or $\cos(\theta)$ must strictly fall between $-1.0$ and $1.0$. If your power factor calculation yields $1.15$, you have swapped the numerator and denominator (e.g., dividing $S$ by $P$ instead of $P$ by $S$).
- The Angle ($\theta$): In passive AC circuits (composed only of resistors, capacitors, and inductors), the phase angle $\theta$ can never exceed $\pm 90^\circ$. A realistic power factor angle for industrial motors is typically between $30^\circ$ and $60^\circ$.
- The Pythagorean Check: The identity $\sin^2(\theta) + \cos^2(\theta) = 1$ must hold true. In circuit terms, $P^2 + Q^2 = S^2$. If your calculated values do not satisfy this within a 1% rounding margin, you have dropped a reactive component or miscalculated a vector sum.
For foundational geometry reviews before tackling AC theory, the Khan Academy Trigonometry course provides excellent interactive proofs of these identities.
Frequently Asked Questions
How do I use the trigonometric ratios formula to calculate power factor?
Power factor (PF) is simply the cosine of the phase angle between voltage and current. Using the power triangle, the formula is $\text{PF} = \cos(\theta) = \frac{P}{S}$, where $P$ is real power in Watts and $S$ is apparent power in Volt-Amps. If you only know the circuit components, you can use the impedance triangle: $\text{PF} = \cos(\theta) = \frac{R}{Z}$, where $R$ is resistance and $Z$ is total impedance magnitude.
Why does my ESP32 or Arduino return the wrong angle when using trig functions?
This is almost always a radians vs. degrees error. The cos(), sin(), and tan() functions in the C++ math.h library (used by Arduino and ESP-IDF) expect inputs in radians, and their inverse functions (acos(), asin(), atan()) return outputs in radians. If you pass $60$ expecting $60^\circ$, the microcontroller calculates the cosine of $60$ radians. Multiply your degree input by PI / 180.0 before passing it to the function, and multiply the output by 180.0 / PI to read it in degrees.
What happens to the trigonometric ratios formula in a purely resistive DC circuit?
In a purely resistive DC circuit, there is no reactance ($X = 0$) and no phase shift. The opposite side of the triangle is zero ($O = 0$). Therefore, $\tan(\theta) = \frac{0}{R} = 0$, making the phase angle $\theta = 0^\circ$. Consequently, $\cos(0^\circ) = 1$, meaning the power factor is exactly $1.0$, and all apparent power is converted to real power ($P = S$). The triangle collapses into a single horizontal line.
Can I use the tangent ratio to find the phase angle if I only know real and reactive power?
Yes. If your wattmeter reads Real Power ($P$) and your meter reads Reactive Power ($Q$), but you do not know the Apparent Power ($S$), you can bypass the hypotenuse entirely. Use the tangent ratio: $\tan(\theta) = \frac{Q}{P}$. Calculate the angle as $\theta = \arctan(\frac{Q}{P})$. This is highly useful in power factor correction calculations where you need to find the existing angle before sizing a parallel capacitor bank to cancel out $Q$.






