# Law of Cosines Visualization

Interactive visualization of the Law of Cosines with draggable triangle and step-by-step proof

> Canonical page: https://elysiatools.com/en/visualizations/law-of-cosines

- **Category:** Math

## Overview

Interactive visualization of the Law of Cosines with draggable triangle vertices. Features four comprehensive sections: (1) Explore - Drag vertices A, B, C to change triangle shape in real-time. Displays side lengths (a, b, c) and angles (A, B, C) with live measurements. Shows the Law of Cosines formula c² = a² + b² - 2ab·cos(C) with substituted values. Automatically identifies triangle type (acute/right/obtuse) and provides step-by-step verification showing both sides of the equation are equal. (2) Proof - Animated 5-step derivation from Pythagorean Theorem. Step 1: Drop altitude h from B to AC, creating two right triangles. Step 2: Apply Pythagorean theorem to both triangles (h² = a² - x² and h² = c² - (b-x)²). Step 3: Equate expressions and expand (a² - x² = c² - b² + 2bx - x²). Step 4: Solve for x ((a² - c² + b²) / 2b). Step 5: Use cosine definition (x = a·cos(A)) to derive final formula c² = a² + b² - 2ab·cos(C). Each step includes visual diagram updates and mathematical explanations. (3) Examples - Pre-configured triangle demonstrations: Acute (all angles < 90°), Right (one angle = 90°, reduces to Pythagorean theorem), Obtuse (one angle > 90°, cos(C) is negative), SAS case (given two sides and included angle), SSS case (given three sides, find angles). Each example includes detailed explanations of how the Law of Cosines applies. (4) Practice - Two modes: Find Missing Side (given SAS) or Find Missing Angle (given SSS). Random problem generator with valid triangle constraints. Interactive canvas visualization of each problem. Input validation with answer checking. Step-by-step solution reveal feature. Practice history tracking showing recent attempts with correctness indicators. Real-time formula substitution and calculation display. Educational content covers relationship to Pythagorean theorem, behavior in different triangle types, and practical applications. Multi-language support (zh, en, es, fr, de, ru, pt) with comprehensive translations. Responsive design with color-coded measurements, smooth animations, and mobile-friendly touch controls.

## Related content

- [Zero-Order Reaction - Interactive Visualization](https://elysiatools.com/en/visualizations/zero-order-reaction): Interactive visualization of zero-order reaction kinetics and concentration changes over time
- [First-Order Reaction - Interactive Visualization](https://elysiatools.com/en/visualizations/first-order-reaction): Interactive visualization of first-order reaction kinetics and exponential concentration decay
- [Second-Order Reaction - Interactive Visualization](https://elysiatools.com/en/visualizations/second-order-reaction): Interactive visualization of second-order reaction kinetics and bimolecular collision dynamics
- [Arrhenius Equation](https://elysiatools.com/en/visualizations/arrhenius-equation): Interactive visualization of temperature effect on reaction rate - Explore activation energy, pre-exponential factor, and rate constant relationship
- [Reversible Reaction](https://elysiatools.com/en/visualizations/reversible-reaction): Interactive visualization of A ⇌ B reversible reaction kinetics - Explore forward and reverse reaction rates, equilibrium constant, and concentration changes over time
- [Consecutive Reaction](https://elysiatools.com/en/visualizations/consecutive-reaction): Interactive visualization of A → B → C consecutive reaction kinetics - Explore intermediate concentration peaks, rate-determining steps, and complete evolution of all species
- [Chain Reaction](https://elysiatools.com/en/visualizations/chain-reaction): Interactive visualization of free radical chain reaction polymerization - Explore initiation, propagation, termination steps, chain growth animation, and molecular weight distribution
- [Le Chatelier's Principle](https://elysiatools.com/en/visualizations/le-chateliers-principle): Interactive visualization of Le Chatelier's Principle - Explore how changes in concentration, pressure, and temperature affect chemical equilibrium with animated molecular dynamics
