The cosine trigonometry formula defines the mathematical relationship between an angle and the ratio of the adjacent side to the hypotenuse in a right triangle, expressed as cos(θ) = A / H. In electrical engineering and AC circuit analysis, we also rely heavily on the Law of Cosines (c² = a² + b² - 2ab·cos(C)) to resolve non-right triangles, such as adding out-of-phase AC voltage phasors or calculating the cross-voltage between unsynchronized alternators. Whether you are sizing a capacitor bank for power factor correction or checking synchronization limits on a generator panel, these formulas translate abstract phase shifts into actionable voltage, current, and power values.
Core Formulas, Symbol Definitions, and Real-World Data
Before solving circuit problems, we must establish the exact mathematical definitions and the symbols used in both the basic right-triangle ratio and the generalized Law of Cosines. In AC theory, the basic cosine ratio gives us the power factor, while the Law of Cosines handles vector addition and subtraction.
| Symbol | Name | Unit / Domain | Electrical Context |
|---|---|---|---|
| θ (theta) | Phase Angle | Degrees (°) or Radians (rad) | Phase shift between AC voltage and current waveforms |
| A | Adjacent Side | Ohms (Ω), Watts (W), Volts (V) | Resistance (R), True Power (P), or In-Phase Voltage |
| H | Hypotenuse | Ohms (Ω), VA, Volts (V) | Total Impedance (Z), Apparent Power (S), or RMS Voltage |
| a, b, c | Vector Magnitudes | Volts (V) or Amps (A) | Phasor magnitudes in non-orthogonal vector addition |
| C | Interior Angle | Degrees (°) or Radians (rad) | Angle opposite side c in a phasor triangle |
To ground these symbols in reality, the table below maps the basic cosine formula to actual impedance and power factor values you will encounter on the bench or in the field. Notice how the cosine of the phase angle directly yields the displacement power factor.
| Load Type | Resistance (R) [Adjacent] | Reactance (X) | Impedance (Z) [Hypotenuse] | Phase Angle (θ) | cos(θ) [Power Factor] |
|---|---|---|---|---|---|
| Pure Resistive Heater | 10.0 Ω | 0.0 Ω | 10.0 Ω | 0.0° | 1.000 |
| Induction Motor (Loaded) | 4.5 Ω | 3.2 Ω (Inductive) | 5.52 Ω | 35.4° | 0.815 |
| Magnetic Fluorescent Ballast | 12.0 Ω | 16.0 Ω (Inductive) | 20.0 Ω | 53.1° | 0.600 |
| Synchronous Condenser | 0.5 Ω | -45.0 Ω (Capacitive) | 45.0 Ω | -89.4° | 0.011 |
Rearranged Forms and Variable Isolation
On the jobsite, you rarely need to solve for the hypotenuse. More often, you are trying to find the required in-phase voltage, the true power dissipated, or the exact phase angle causing a breaker trip. Below are the algebraically rearranged forms of the cosine trigonometry formula, isolated for each variable.
Basic Right-Triangle Ratio (cos(θ) = A / H)
- Solving for Adjacent (A): A = H · cos(θ) — Used to find True Power (W) from Apparent Power (VA), or Resistance (Ω) from Impedance (Ω).
- Solving for Hypotenuse (H): H = A / cos(θ) — Used to size a transformer (VA) based on a known real power load (W) and estimated power factor.
- Solving for Angle (θ): θ = arccos(A / H) — Used to find the phase shift when you know the real and apparent power.
Law of Cosines (c² = a² + b² - 2ab·cos(C))
- Solving for Resultant Magnitude (c): c = √(a² + b² - 2ab·cos(C)) — Used to find the total voltage of two out-of-phase AC sources.
- Solving for Interior Angle (C): C = arccos((a² + b² - c²) / 2ab) — Used to determine the phase error between two synchronized generators when their individual voltages and the cross-voltage are known.
Application Boundaries and Unit Traps
The cosine trigonometry formula is a powerful tool, but it operates under strict assumptions. It applies exclusively to linear, steady-state AC circuits where waveforms are pure sinusoids. If your circuit contains variable frequency drives (VFDs), LED drivers, or switching power supplies, the current waveform will be distorted. In these non-linear cases, the basic cosine formula only yields the displacement power factor, ignoring harmonic distortion. For non-linear loads, you must use a power quality analyzer to measure true power factor.
The Degree vs. Radian Trap
The most common mistake that breaks this formula on the bench is a calculator unit mismatch. Electrical phasor diagrams and AC vector math almost universally use degrees (e.g., a 30° phase shift). However, scientific calculators and programming languages (like Python or C++ on an ESP32) default to radians.
If you calculate cos(30) in radian mode, your calculator will return 0.154 instead of the correct 0.866. Always verify your calculator is in DEG mode before executing power factor math. If you must use radians, convert first: Radians = Degrees × (π / 180).
Realistic Answer Magnitudes
Use magnitude checks to catch bad math instantly. For the basic ratio, the output of cos(θ) must always fall between -1.0 and +1.0. If your calculated power factor is 1.15, your measurements are wrong or your meter is reading harmonic noise. For the Law of Cosines, the resultant magnitude c must be a positive real number. If the value inside your square root is negative, you have mapped the interior angle incorrectly (remember, the interior angle of a vector triangle is often 180° - θ, not θ).
Worked Examples with Unit Tracking
Below are two distinct problems demonstrating how to apply the formula with strict unit tracking and intermediate algebraic steps.
Example 1: Sizing a Transformer for an Inductive Load
Scenario: You are powering a workshop induction motor. The motor requires 4,500 Watts (W) of True Power to operate under load. The motor nameplate indicates a phase angle (θ) of 35.0° between voltage and current. You need to size a step-down transformer, which is rated in Volt-Amps (VA), not Watts. What is the minimum Apparent Power (S) the transformer must supply?
- Identify knowns and unknowns:
True Power (Adjacent, A) = 4,500 W
Phase Angle (θ) = 35.0°
Apparent Power (Hypotenuse, H) = ? VA - Select the rearranged formula:
H = A / cos(θ) - Calculate the cosine value:
cos(35.0°) = 0.81915 (Ensure calculator is in DEG mode) - Substitute and solve with units:
H = 4,500 W / 0.81915
H = 5,493.4 VA
Conclusion: You must specify a transformer rated for at least 5,500 VA (or 5.5 kVA). If you had mistakenly sized it for 4,500 VA by ignoring the cosine of the phase angle, the transformer would overload and trip its thermal protection.
Example 2: Alternator Synchronization Cross-Voltage
Scenario: You are paralleling two 480V RMS AC alternators. Alternator 1 (V1) outputs 480V. Alternator 2 (V2) outputs 480V. However, your synchroscope shows a phase error: the voltage waveforms are 12.0° out of phase. Before closing the tie-breaker, you must calculate the voltage difference (V_diff) across the open breaker contacts to ensure it won't cause a destructive transient.
- Identify knowns and unknowns:
Vector a (V1) = 480 V
Vector b (V2) = 480 V
Angle between phasors = 12.0°
Resultant difference (c) = ? V - Map to the Law of Cosines:
To find the difference vector, we use the triangle formed by V1, V2, and V_diff. The interior angle (C) opposite the difference vector is exactly the phase error: 12.0°.
c² = a² + b² - 2ab·cos(C) - Substitute values and track units:
c² = (480 V)² + (480 V)² - 2(480 V)(480 V)·cos(12.0°)
c² = 230,400 V² + 230,400 V² - 460,800 V² · (0.97814) - Execute intermediate arithmetic:
c² = 460,800 V² - 450,726.9 V²
c² = 10,073.1 V² - Solve for c:
c = √(10,073.1 V²)
c = 100.36 V
Conclusion: There is 100.36 V RMS across the open breaker contacts. Closing the breaker with a 100V delta will result in a massive circulating current surge. You must adjust the governor speed to bring the phase error closer to 0° (where cos(0°) = 1, making c² = 0) before synchronizing.
Field Measurements and Harmonic Caveats
While the cosine trigonometry formula is mathematically absolute, the physical measurements you feed into it are subject to real-world noise. When measuring phase angle (θ) with a digital multimeter or oscilloscope, ensure you are measuring the fundamental frequency (60 Hz in North America, 50 Hz in Europe).
If you are troubleshooting a facility with high harmonic distortion—common in data centers or manufacturing plants with heavy VFD usage—the basic cos(θ) formula will lie to you. A meter might read a displacement phase angle of 10° (yielding a cosine of 0.98), but the true power factor might be 0.75 due to harmonic currents doing no real work. In these scenarios, abandon the manual cosine calculation and rely on a True RMS power quality analyzer that samples the waveform and calculates True Power Factor via direct integration of instantaneous voltage and current.






