Why This Matters
Two shapes are congruent when they are identical in size and shape -- you could place one on top of the other and they would match perfectly. Two shapes are similar when they have the same shape but possibly different sizes -- one is a scaled version of the other. The scale factor tells you exactly how much bigger or smaller one shape is compared to the other.
These concepts are foundational for reasoning about proportional relationships. If two triangles are similar, all corresponding sides are in the same ratio and all corresponding angles are equal. This principle is the basis of indirect measurement: you can calculate the height of a building by measuring the shadow it casts and comparing it to the shadow of a stick whose height you know. Surveyors, astronomers, and engineers have used similar triangles for thousands of years.
In computing, similarity and scaling appear everywhere: resizing images, responsive web design (elements that scale proportionally), level-of-detail rendering in 3D graphics, and map projections. Understanding when two shapes are "the same" (congruent) versus "proportionally the same" (similar) is essential for any application that involves comparing, matching, or resizing shapes.
Define Terms
Visual Model
The full process at a glance. Click Start tour to walk through each step.
Similar shapes have equal angles and proportional sides. Congruent shapes are similar with scale factor 1. Areas scale by k squared, volumes by k cubed.
Code Example
// Check if two triangles are similar (SSS test)
function areSimilar(a1, b1, c1, a2, b2, c2) {
// Sort sides of each triangle
const s1 = [a1, b1, c1].sort((a, b) => a - b);
const s2 = [a2, b2, c2].sort((a, b) => a - b);
// Check if all ratios are equal
const r1 = s1[0] / s2[0];
const r2 = s1[1] / s2[1];
const r3 = s1[2] / s2[2];
return Math.abs(r1 - r2) < 0.0001 && Math.abs(r2 - r3) < 0.0001;
}
console.log("(3,4,5) ~ (6,8,10):", areSimilar(3,4,5, 6,8,10)); // true
console.log("(3,4,5) ~ (9,12,15):", areSimilar(3,4,5, 9,12,15)); // true
console.log("(3,4,5) ~ (3,4,6):", areSimilar(3,4,5, 3,4,6)); // false
// Check if two triangles are congruent
function areCongruent(a1, b1, c1, a2, b2, c2) {
const s1 = [a1, b1, c1].sort((a, b) => a - b);
const s2 = [a2, b2, c2].sort((a, b) => a - b);
return s1[0] === s2[0] && s1[1] === s2[1] && s1[2] === s2[2];
}
console.log("Congruent (3,4,5) & (5,3,4):", areCongruent(3,4,5, 5,3,4)); // true
console.log("Congruent (3,4,5) & (6,8,10):", areCongruent(3,4,5, 6,8,10)); // false
// Compute scale factor
function scaleFactor(a1, b1, c1, a2, b2, c2) {
const s1 = [a1, b1, c1].sort((a, b) => a - b);
const s2 = [a2, b2, c2].sort((a, b) => a - b);
return s2[0] / s1[0];
}
const k = scaleFactor(3, 4, 5, 6, 8, 10);
console.log("Scale factor:", k); // 2
console.log("Area ratio:", k ** 2); // 4
console.log("Volume ratio (if 3D):", k ** 3); // 8Interactive Experiment
Try these exercises:
- Are triangles with sides (5, 12, 13) and (10, 24, 26) similar? What is the scale factor?
- If two similar triangles have a scale factor of 3, and the smaller triangle has area 10, what is the area of the larger triangle?
- Create two triangles that are similar but not congruent. Verify that all angle pairs are equal.
- Are all equilateral triangles similar to each other? Why or why not?
- If a map has a scale of 1:50000, and two cities are 3 cm apart on the map, how far apart are they in reality?
Quick Quiz
Coding Challenge
Write a function called `checkSimilarity` that takes six numbers representing the sides of two triangles (a1, b1, c1, a2, b2, c2) and returns an object with: `similar` (boolean, whether the triangles are similar), and `scaleFactor` (the ratio of the larger to the smaller triangle if similar, or 0 if not similar). Round the scale factor to 2 decimal places.
Real-World Usage
Similarity and congruence are used in many practical applications:
- Image scaling and responsive design: Resizing images proportionally preserves similarity. Aspect ratio is the scale factor between width and height.
- Map making and cartography: Maps are similar figures scaled down from reality. The map scale is the scale factor that converts map distances to real distances.
- 3D modeling and level of detail: Game engines use similar but simplified meshes at different distances (LOD). A far-away model is a scaled-down, lower-detail version.
- Engineering blueprints: Technical drawings are similar figures of real components. Dimensions are scaled by a known factor for printing on standard paper sizes.
- Machine learning and computer vision: Template matching finds similar shapes in images. Feature detection algorithms identify congruent patterns across frames.