The primary trig formulas for triangles are the right-angle ratios (Sine, Cosine, Tangent) and the generalized Law of Sines and Law of Cosines. In electrical and electronics work, these are not just abstract textbook math. They are the foundational tools for calculating AC power factor correction, analyzing three-phase voltage vectors, and determining physical cable pulling tensions on angled conduit runs. Below is the complete reference for applying these formulas on the bench and in the field.
The Core Trig Formulas for Triangles & Symbol Definitions
Before calculating, you must map your physical or electrical parameters to the standard geometric variables. The table below defines every symbol used in the core equations.
| Symbol | Definition | Common Electrical/Field Equivalent |
|---|---|---|
| a, b, c | Lengths of the three sides of the triangle | Cable run distances (m), Voltage magnitudes (V), Power values (kW/kVAR/kVA) |
| A, B, C | Interior angles opposite to sides a, b, and c | Phase shifts (°), physical bend angles (°) |
| θ (theta) | Reference angle (usually the phase angle in AC circuits) | Power factor angle, impedance phase angle |
| Opp, Adj, Hyp | Opposite, Adjacent, and Hypotenuse sides relative to θ | Reactive Power (Opp), Real Power (Adj), Apparent Power (Hyp) |
1. Right-Angle Triangle Formulas (SOH CAH TOA)
Applies only when one angle is exactly 90°. This is the standard model for AC power phasor diagrams and simple impedance calculations.
- Sine: sin(θ) = Opp / Hyp
- Cosine: cos(θ) = Adj / Hyp
- Tangent: tan(θ) = Opp / Adj
- Pythagorean Theorem: Hyp² = Opp² + Adj²
2. The Law of Sines
Applies to any planar triangle (oblique or right). Use this when you know two angles and one side, or two sides and an angle opposite one of them.
- Formula: a / sin(A) = b / sin(B) = c / sin(C)
3. The Law of Cosines
Applies to any planar triangle. This is the heavy lifter for field routing when you know two physical distances and the angle between them (Side-Angle-Side), or all three distances (Side-Side-Side). As noted in standard mathematical references like Math is Fun's trigonometry guides, it generalizes the Pythagorean theorem for non-right triangles.
- Formula: c² = a² + b² - 2ab · cos(C)
Rearranged Forms for Rapid Field Calculation
When you are standing in front of a motor control center or pulling wire, you rarely need the formula in its standard textbook form. You need it solved for the unknown variable. Keep this cheat sheet handy.
Right Triangle Rearrangements
- Solve for Hypotenuse: Hyp = Opp / sin(θ) or Hyp = Adj / cos(θ)
- Solve for Opposite: Opp = Hyp · sin(θ) or Opp = Adj · tan(θ)
- Solve for Adjacent: Adj = Hyp · cos(θ) or Adj = Opp / tan(θ)
- Solve for Angle θ: θ = arcsin(Opp/Hyp) or arccos(Adj/Hyp) or arctan(Opp/Adj)
Law of Cosines Rearrangements
- Solve for side c: c = √(a² + b² - 2ab · cos(C))
- Solve for side a: a = √(b² + c² - 2bc · cos(A))
- Solve for Angle C: C = arccos((a² + b² - c²) / 2ab)
Law of Sines Rearrangements
- Solve for side a: a = b · sin(A) / sin(B)
- Solve for Angle A: A = arcsin(a · sin(B) / b)
Worked Examples: From Phasors to Cable Pulls
Let's apply these formulas to two common scenarios: calculating AC power triangle parameters and determining physical cable routing distances.
Problem 1: The AC Power Triangle (Right-Angle Trig)
Scenario: An industrial induction motor draws 15 kVA of apparent power (S) at a lagging power factor (PF) of 0.80. You need to find the real power (P) in kW, the reactive power (Q) in kVAR, and the exact phase angle (θ) to size a power factor correction capacitor bank.
Step 1: Find the phase angle (θ)
The power factor is the cosine of the phase angle. Therefore, cos(θ) = 0.80.
θ = arccos(0.80)
θ = 36.87°
Step 2: Calculate Real Power (P - the Adjacent side)
P = S · cos(θ)
P = 15 kVA · 0.80
P = 12 kW
Step 3: Calculate Reactive Power (Q - the Opposite side)
Q = S · sin(θ)
Q = 15 kVA · sin(36.87°)
Q = 15 kVA · 0.60
Q = 9 kVAR
Verification (Pythagorean Theorem):
S = √(P² + Q²) = √(12² + 9²) = √(144 + 81) = √225 = 15 kVA. The math holds perfectly. For deeper reading on how utilities penalize poor power factor, check out Fluke's technical guide on power factor.
Problem 2: Physical Cable Routing (Law of Cosines & Sines)
Scenario: You are pulling fiber optic cable between three utility poles (A, B, and C). The distance from Pole A to Pole B (side c) is 45 meters. The distance from Pole B to Pole C (side a) is 60 meters. The physical angle at Pole B (Angle B, between the two cable runs) is measured at 115°. You need the direct distance from A to C (side b) to order the correct span wire, and the angle at Pole A to calculate pulling tension.
Step 1: Find side b (Distance A to C) using the Law of Cosines
b² = a² + c² - 2ac · cos(B)
b² = 60² + 45² - 2(60)(45) · cos(115°)
Note: cos(115°) is negative, approximately -0.4226.
b² = 3600 + 2025 - 5400(-0.4226)
b² = 5625 + 2282.04 = 7907.04
b = √7907.04
b = 88.92 meters
Step 2: Find Angle A using the Law of Sines
sin(A) / a = sin(B) / b
sin(A) = a · sin(B) / b
sin(A) = 60 · sin(115°) / 88.92
sin(A) = 60 · 0.9063 / 88.92 = 54.378 / 88.92 = 0.6115
A = arcsin(0.6115)
A = 37.7°
Step 3: Find Angle C (Sanity Check)
C = 180° - 115° - 37.7° = 27.3°
All angles sum to 180°. You now know exactly how much span wire to cut and the exact geometry for your pulling sheaves.
Assumptions, Unit Traps, and Magnitude Sanity Checks
Trigonometry is unforgiving if you ignore its underlying assumptions or input the wrong units. Here is how to avoid the most common bench and field errors.
When the Formulas Apply (and When They Don't)
These trig formulas for triangles assume Euclidean (flat plane) geometry. They are perfectly valid for wiring a building, routing cables across a site, or drawing AC phasors. They fail when calculating long-distance RF propagation or satellite links over the Earth's curvature. For distances exceeding a few dozen kilometers, you must switch to spherical trigonometry, as the surface of the earth curves and the interior angles of large triangles sum to greater than 180°.
The #1 Unit Mistake: Degrees vs. Radians
If your calculator or microcontroller math library is set to Radians instead of Degrees, your results will be catastrophic. For example, in Problem 1, calculating arccos(0.80) in radians yields 0.6435. If you use that as your phase angle, your capacitor bank sizing will be completely wrong. Always verify your calculator is in DEG mode before starting electrical phasor math. In embedded C/C++ (like Arduino or ESP32), the math.h library uses radians by default; you must manually convert using radians = degrees * (PI / 180).
Realistic Answer Magnitudes (Sanity Checks)
- Power Factor / Cosine: The cosine of any angle in a passive AC circuit must be between 0 and 1 (or 0° to 90°). If your calculated PF is 1.2, you made a math error.
- Triangle Inequality Theorem: The sum of any two sides must be greater than the third side (a + b > c). In Problem 2, 60 + 45 = 105, which is greater than 88.92. If your calculated third side is larger than the sum of the other two, your angle input was wrong.
- Angle Sum: The interior angles of any planar triangle must sum to exactly 180°. Use this to verify your Law of Sines calculations.
Frequently Asked Questions
How do trig formulas for triangles apply to three-phase AC power?
In a balanced three-phase system, the voltage phasors (L1, L2, L3) are separated by exactly 120°. If you draw lines connecting the tips of these phasors, they form an equilateral triangle. When a phase unbalance or fault occurs, this triangle becomes scalene. Engineers use the Law of Cosines to calculate the exact line-to-line voltages from the line-to-neutral voltages when the 120° symmetry is broken, ensuring protective relays are set to the correct trip thresholds.
Which trig formula for triangles should I use when I only know two sides and an angle?
It depends on the position of the known angle. If the known angle is between the two known sides (Side-Angle-Side), you must use the Law of Cosines to find the third side. If the known angle is opposite one of the known sides (Side-Side-Angle), you use the Law of Sines. Be aware that the Side-Side-Angle case can sometimes yield two valid triangles (the 'ambiguous case'), though this rarely occurs in physical electrical routing where geometry is fixed.
Why does my calculator give the wrong angle when using inverse trig formulas for triangles?
This is usually caused by the 'ambiguous case' of the inverse sine function (arcsin). The arcsin function on standard calculators only returns angles between -90° and +90°. If the actual physical angle of your triangle is obtuse (greater than 90°, like the 115° angle in our cable routing example), using the Law of Sines to find it will incorrectly return the acute supplement (180° - 115° = 65°). To avoid this, always use the Law of Cosines to find the largest angle first, as the arccos function correctly distinguishes between acute and obtuse angles.






