#03 ふれてみよう高校数学 幾何と図形

正弦定理・余弦定理

直角三角形を超えて

たとえば、三角形の土地を持っているとします。3辺の長さはわかっているけれど、各角の大きさはわからない——こんなときに役立つのが今回学ぶ定理です。

前回まで学んだ三角比は直角三角形が前提でした。しかし現実の問題では、直角とは限らない一般の三角形を扱う必要があります。そこで登場するのが正弦定理余弦定理です。

三角形 ABC において、辺 a,b,ca, b, c はそれぞれ角 A,B,CA, B, C の対辺とします(小文字 = 対辺、大文字 = 角)。

正弦定理

asinA=bsinB=csinC=2R\boxed{\frac{a}{\sin A} = \frac{b}{\sin B} = \frac{c}{\sin C} = 2R}

RR は三角形の外接円の半径です。

正弦定理の意味

直感的に言えば:「辺の長さ」と「その角の sin」の比は、どの辺でも同じです。さらに、その共通の値は外接円の直径になります。

  • 辺の長さと対角の sin の比はどの辺でも等しい
  • その共通の値はちょうど外接円の直径 2R2R
  • 「大きい角の対辺は長い」という日常的な直感と整合する

使い場面

「辺と角の情報が混ざっている」問題では正弦定理が活躍します。

わかっていること求めたいもの
二辺とその対角もう一方の角(例:a,A,ba, A, bBB
一辺と二つの角残りの辺(例:a,A,Ba, A, Bb=asinB/sinAb = a\sin B/\sin A
任意の一辺と対角外接円の半径 R=a/(2sinA)R = a/(2\sin A)

インタラクティブ図解①:正弦定理と外接円

三角形の各辺/sinA の値がすべて等しく、外接円の直径 2R になることを確認してみましょう。マウスで三角形の形を変えても、この比は一定です。

頂点をマウスで追いかけると三角形が変形する。a/sinA は常に 2R に等しい

var cx = 300, cy = 170, R = 120;
var angleA = Math.PI * 0.5;
var angleB = Math.PI * (0.5 + 2/3);
var angleC = Math.PI * (0.5 + 4/3);

function loop() {
ctx.clearRect(0, 0, W, H);

// マウスで angleB を動かす
angleB = Math.PI * 0.5 + ((mx / W) * Math.PI * 1.6 - Math.PI * 0.2);
angleC = angleB + Math.PI * 2 / 3;

var ax = cx + R * Math.cos(angleA), ay = cy - R * Math.sin(angleA);
var bx = cx + R * Math.cos(angleB), by = cy - R * Math.sin(angleB);
var ccx = cx + R * Math.cos(angleC), ccy = cy - R * Math.sin(angleC);

// 外接円
ctx.beginPath();
ctx.arc(cx, cy, R, 0, Math.PI * 2);
ctx.strokeStyle = '#30363d';
ctx.lineWidth = 1.5;
ctx.stroke();

// 三角形
ctx.beginPath();
ctx.moveTo(ax, ay);
ctx.lineTo(bx, by);
ctx.lineTo(ccx, ccy);
ctx.closePath();
ctx.strokeStyle = '#58a6ff';
ctx.lineWidth = 2.5;
ctx.stroke();
ctx.fillStyle = '#58a6ff10';
ctx.fill();

// 辺 a (BC の対辺、A の対辺)
var a = Math.sqrt(Math.pow(bx - ccx, 2) + Math.pow(by - ccy, 2));
var b = Math.sqrt(Math.pow(ax - ccx, 2) + Math.pow(ay - ccy, 2));
var c = Math.sqrt(Math.pow(ax - bx, 2) + Math.pow(ay - by, 2));

// 角 A の計算(余弦定理)
var cosA = (b * b + c * c - a * a) / (2 * b * c);
cosA = Math.max(-1, Math.min(1, cosA));
var sinA = Math.sqrt(1 - cosA * cosA);
var angleAval = Math.asin(sinA) * 180 / Math.PI;

var cosB = (a * a + c * c - b * b) / (2 * a * c);
cosB = Math.max(-1, Math.min(1, cosB));
var sinB = Math.sqrt(1 - cosB * cosB);

var cosC2 = (a * a + b * b - c * c) / (2 * a * b);
cosC2 = Math.max(-1, Math.min(1, cosC2));
var sinC2 = Math.sqrt(1 - cosC2 * cosC2);

var ratio1 = sinA > 0.01 ? (a / sinA).toFixed(2) : '—';
var ratio2 = sinB > 0.01 ? (b / sinB).toFixed(2) : '—';
var ratio3 = sinC2 > 0.01 ? (c / sinC2).toFixed(2) : '—';
var twoR = (2 * R).toFixed(2);

// 頂点ラベル
ctx.font = 'bold 15px serif';
ctx.fillStyle = '#f0883e';
ctx.fillText('A', ax - 10, ay - 10);
ctx.fillStyle = '#56d364';
ctx.fillText('B', bx - 16, by + 4);
ctx.fillStyle = '#bc8cff';
ctx.fillText('C', ccx + 6, ccy + 4);

// 頂点点
[[ax,ay,'#f0883e'],[bx,by,'#56d364'],[ccx,ccy,'#bc8cff']].forEach(function(p) {
  ctx.beginPath(); ctx.arc(p[0], p[1], 5, 0, Math.PI*2);
  ctx.fillStyle = p[2]; ctx.fill();
});

// 中心点
ctx.beginPath(); ctx.arc(cx, cy, 4, 0, Math.PI*2);
ctx.fillStyle = '#ffa657'; ctx.fill();

// パネル
ctx.fillStyle = '#0d1117cc';
ctx.fillRect(10, 10, 200, 120);
ctx.strokeStyle = '#30363d'; ctx.lineWidth = 1;
ctx.strokeRect(10, 10, 200, 120);

ctx.font = 'bold 12px monospace';
ctx.fillStyle = '#e6edf3';
ctx.fillText('a/sinA = ' + ratio1, 20, 32);
ctx.fillText('b/sinB = ' + ratio2, 20, 52);
ctx.fillText('c/sinC = ' + ratio3, 20, 72);
ctx.fillStyle = '#ffa657';
ctx.fillText('2R    = ' + twoR, 20, 96);
ctx.fillStyle = '#79c0ff';
ctx.font = '11px sans-serif';
ctx.fillText('すべて等しい!', 20, 116);

requestAnimationFrame(loop);
}
loop();

余弦定理

c2=a2+b22abcosC\boxed{c^2 = a^2 + b^2 - 2ab\cos C}

同様に、

a2=b2+c22bccosA,b2=a2+c22accosBa^2 = b^2 + c^2 - 2bc\cos A, \quad b^2 = a^2 + c^2 - 2ac\cos B

ピタゴラスの定理との関係

「ピタゴラスの定理は直角三角形専用」でしたが、余弦定理はあらゆる三角形で使えます。C=90°C = 90° のとき cosC=0\cos C = 0 なので:

c2=a2+b2c^2 = a^2 + b^2

余弦定理はピタゴラスの定理の一般化です。2abcosC-2ab\cos C の項は「直角からのズレ」を補正するものです。

  • C<90°C < 90°(鋭角):cosC>0\cos C > 0 なので c2<a2+b2c^2 < a^2 + b^2cc が小さくなる方向)——角が小さければ対辺も短くなる
  • C>90°C > 90°(鈍角):cosC<0\cos C < 0 なので c2>a2+b2c^2 > a^2 + b^2cc が大きくなる方向)——角が大きければ対辺も長くなる

使い場面

「辺の情報が多い」問題では余弦定理が活躍します。

わかっていること求めたいもの
二辺と挟む角第三辺(例:a,b,Ca, b, Ccc
三辺すべて各角(例:a,b,ca, b, ccosC=(a2+b2c2)/(2ab)\cos C = (a^2+b^2-c^2)/(2ab)

インタラクティブ図解②:余弦定理の視覚化

角 C を変えると辺 c の長さがどう変わるか確認しましょう。C=90°C = 90° のとき c=a2+b2c = \sqrt{a^2 + b^2}(ピタゴラスの定理と一致)になっていることも確認できます。

マウスを左右に動かして角 C を変える。c² の値が a²+b²-2ab·cosC に従う

function loop() {
ctx.clearRect(0, 0, W, H);

var a = 120, b = 90;
// 角 C: 10° to 170°
var C = 10 + (mx / W) * 160;
var Crad = C * Math.PI / 180;

// 頂点 C を原点に
var cx = 160, cy = 220;
var ax = cx + b * Math.cos(0), ay = cy;
var bx = cx + a * Math.cos(Crad), by = cy - a * Math.sin(Crad);

// 辺 c
var c = Math.sqrt(a*a + b*b - 2*a*b*Math.cos(Crad));

// 三角形
ctx.beginPath();
ctx.moveTo(cx, cy);
ctx.lineTo(ax, ay);
ctx.lineTo(bx, by);
ctx.closePath();
ctx.fillStyle = '#58a6ff10';
ctx.fill();

// 辺 a (C→B)
ctx.beginPath(); ctx.moveTo(cx, cy); ctx.lineTo(bx, by);
ctx.strokeStyle = '#f0883e'; ctx.lineWidth = 3; ctx.stroke();
// 辺 b (C→A)
ctx.beginPath(); ctx.moveTo(cx, cy); ctx.lineTo(ax, ay);
ctx.strokeStyle = '#56d364'; ctx.lineWidth = 3; ctx.stroke();
// 辺 c (A→B)
ctx.beginPath(); ctx.moveTo(ax, ay); ctx.lineTo(bx, by);
ctx.strokeStyle = '#bc8cff'; ctx.lineWidth = 3; ctx.stroke();

// 角 C の弧
ctx.beginPath();
ctx.arc(cx, cy, 28, -Crad, 0);
ctx.strokeStyle = '#ffa657'; ctx.lineWidth = 2; ctx.stroke();

// ラベル
ctx.font = 'bold 14px serif';
ctx.fillStyle = '#ffa657';
ctx.fillText('C=' + C.toFixed(0) + '°', cx + 32, cy - 8);

ctx.fillStyle = '#f0883e';
ctx.fillText('a=' + a, cx + (bx-cx)/2 - 28, cy + (by-cy)/2 - 4);
ctx.fillStyle = '#56d364';
ctx.fillText('b=' + b, cx + (ax-cx)/2 - 10, cy + 16);
ctx.fillStyle = '#bc8cff';
ctx.fillText('c=' + c.toFixed(1), (ax+bx)/2 + 8, (ay+by)/2 - 6);

ctx.font = 'bold 14px serif';
ctx.fillStyle = '#f0883e';
ctx.fillText('A', bx + 6, by - 6);
ctx.fillStyle = '#56d364';
ctx.fillText('B', ax + 6, ay - 8);
ctx.fillStyle = '#bc8cff';
ctx.fillText('C', cx - 18, cy + 4);

// 計算パネル
ctx.fillStyle = '#0d1117cc';
ctx.fillRect(W - 240, 10, 228, 120);
ctx.strokeStyle = '#30363d'; ctx.lineWidth = 1;
ctx.strokeRect(W - 240, 10, 228, 120);

ctx.font = '12px monospace';
ctx.fillStyle = '#e6edf3';
ctx.fillText('a² + b² = ' + (a*a + b*b), W-230, 30);
ctx.fillStyle = '#ffa657';
ctx.fillText('2ab·cosC = ' + (2*a*b*Math.cos(Crad)).toFixed(1), W-230, 50);
ctx.fillStyle = '#bc8cff';
ctx.fillText('c² = ' + (c*c).toFixed(1), W-230, 70);
ctx.fillStyle = '#79c0ff';
ctx.fillText('c  = ' + c.toFixed(2), W-230, 90);

var pythag = Math.sqrt(a*a + b*b);
ctx.fillStyle = '#8b949e';
ctx.font = '11px monospace';
ctx.fillText('(直角なら c=' + pythag.toFixed(1) + ')', W-230, 112);

requestAnimationFrame(loop);
}
loop();

例題

例題 1(正弦定理)

三角形 ABC で a=6a = 6A=45°A = 45°B=60°B = 60° のとき、辺 bb と外接円の半径 RR を求めよ。

解法:

まず C=180°45°60°=75°C = 180° - 45° - 60° = 75°(三角形の内角の和は180°)

正弦定理より:

bsin60°=asin45°=612=62\frac{b}{\sin 60°} = \frac{a}{\sin 45°} = \frac{6}{\frac{1}{\sqrt{2}}} = 6\sqrt{2} b=62sin60°=6232=36b = 6\sqrt{2} \cdot \sin 60° = 6\sqrt{2} \cdot \frac{\sqrt{3}}{2} = 3\sqrt{6}

外接円の半径:

R=a2sinA=6212=32R = \frac{a}{2\sin A} = \frac{6}{2 \cdot \frac{1}{\sqrt{2}}} = 3\sqrt{2}

例題 2(余弦定理)

a=7a = 7b=5b = 5C=60°C = 60° のとき、辺 cc を求めよ。

解法:

「2辺と挟む角がわかっている」→ 余弦定理で第3辺を求めます。

c2=72+52275cos60°=49+257012=7435=39c^2 = 7^2 + 5^2 - 2 \cdot 7 \cdot 5 \cdot \cos 60° = 49 + 25 - 70 \cdot \frac{1}{2} = 74 - 35 = 39 c=396.24c = \sqrt{39} \approx 6.24

正弦定理 vs 余弦定理の使い分け

迷ったときは「辺と角のペアがあるか?」を確認しましょう。

状況使う定理
辺と対角がペアで与えられている正弦定理(辺/sinA の比を使う)
二辺と挟む角余弦定理(辺を求める)
三辺が与えられている余弦定理(角を求める)
外接円の半径を求める正弦定理

まとめ

  • 正弦定理a/sinA=b/sinB=c/sinC=2Ra/\sin A = b/\sin B = c/\sin C = 2R(外接円の直径と等しい)
  • 余弦定理c2=a2+b22abcosCc^2 = a^2 + b^2 - 2ab\cos C(ピタゴラスの定理を一般の三角形に拡張)
  • C=90°C = 90° のとき余弦定理がピタゴラスの定理になる——両者は同じ「家族」です
  • 「辺と角のペアがある → 正弦定理」「辺ばかり or 辺と挟む角 → 余弦定理」と使い分ける

次回は平面における「直線の方程式」を学び、座標幾何の世界に入ります。