Refactor math curriculum and remove directed numbers chapter: Update package.json to streamline the build process by separating site build commands. Remove the 'directed-numbers-rates' chapter and its associated files, including content and widgets, from the curriculum. Update curriculum JSON to reflect changes in chapter dependencies and improve overall structure.

This commit is contained in:
Hananoshika Yomaru 2026-05-21 10:54:08 -07:00
parent f28ad660dd
commit 1a26d53730
22 changed files with 733 additions and 1016 deletions

View file

@ -1,339 +0,0 @@
+++
title = "Directed numbers, rates & ratios"
description = "Operate with negative numbers and solve ratio, rate, and proportion problems in context."
template = "chapter.html"
weight = 2
[extra]
subject = "math"
chapter_id = "directed-numbers-rates"
strand = "Number & Algebra"
+++
<div class="book-prose">
<p>
You can already add, subtract, multiply, and divide whole numbers using <strong>written
calculation</strong> (columns, carry, and borrow). On a number line, those values lie on or to the
<strong>right</strong> of zero.
Numbers can also lie to the <strong>left</strong> of zero — we call them <strong>negative</strong>.
Temperatures below freezing, bank overdrafts, and positions below sea level are everyday examples
of <strong>directed numbers</strong>.
</p>
<h2 id="number-line" class="book-prose__heading">The number line</h2>
<p>
On a horizontal number line, moving right means the value <em>increases</em>; moving left means it
<em>decreases</em>. The distance from zero is the <strong>absolute value</strong>
\(|a|\). For example, \(|-5| = 5\) and \(|3| = 3\).
</p>
<div class="book-callout book-callout--formula" role="note">
<p class="book-callout__label">Comparing</p>
<p class="book-formula">
\(a &gt; b\) means \(a\) lies to the right of \(b\). Any negative number is less than any
positive number.
</p>
</div>
<h2 id="adding-subtracting" class="book-prose__heading">Adding and subtracting</h2>
<p>
Think in terms of movement on the line:
</p>
<ul>
<li><strong>\(a + b\)</strong> — start at \(a\), move \(b\) units (right if \(b &gt; 0\), left if \(b &lt; 0\)).</li>
<li><strong>\(a - b\)</strong> — start at \(a\), move \(-b\) units (equivalently, add the opposite of \(b\)).</li>
</ul>
<p>
Subtracting a negative is adding a positive: \(5 - (-3) = 5 + 3 = 8\).
</p>
<h2 id="multiplying-signs" class="book-prose__heading">Multiplying and dividing</h2>
<div class="book-table-wrap">
<table class="book-table">
<thead>
<tr>
<th scope="col">Signs</th>
<th scope="col">Result</th>
</tr>
</thead>
<tbody>
<tr>
<td>positive × positive, negative × negative</td>
<td>positive</td>
</tr>
<tr>
<td>positive × negative (either order)</td>
<td>negative</td>
</tr>
</tbody>
</table>
</div>
<h2 id="ratios" class="book-prose__heading">Ratios</h2>
<p>
A <strong>ratio</strong> compares quantities of the same kind. The ratio \(2:3\) means “2 parts
to 3 parts” — five equal parts in total. To share \(40\) in the ratio \(2:3\), one part is
\(40 \div 5 = 8\), so the shares are \(16\) and \(24\).
</p>
<div class="book-callout book-callout--formula" role="note">
<p class="book-callout__label">Sharing in ratio \(m:n\)</p>
<p class="book-formula">
\[ \text{one part} = \frac{\text{total}}{m+n}, \quad
\text{first share} = \frac{m}{m+n}\times\text{total}, \quad
\text{second share} = \frac{n}{m+n}\times\text{total} \]
</p>
</div>
<h2 id="rates" class="book-prose__heading">Rates</h2>
<p>
A <strong>rate</strong> compares different units. <strong>Speed</strong> is distance per time:
\[ \text{speed} = \frac{\text{distance}}{\text{time}}. \]
A <strong>unit rate</strong> tells “how much per one” — for example \(60\) km in \(1.5\) h gives
\(60 \div 1.5 = 40\) km/h.
</p>
<h2 id="try-it-yourself" class="book-prose__heading">Try it yourself</h2>
<p>
Use the number-line explorer to pick two directed numbers and see their sum on the line. Then try
the ratio sharer in the applications section below.
</p>
</div>
<div class="math-widget-mount" data-widget="number-line" data-pagefind-ignore></div>
<div class="book-prose">
<h2 id="history" class="book-prose__heading">History</h2>
<p>
For much of history, mathematicians treated only positive quantities as numbers. Negative
solutions to equations were often rejected as meaningless. Practical needs — debts, losses,
and temperatures below zero — still pushed people to work with “numbers less than nothing.”
</p>
<figure class="book-figure">
<img
class="book-figure__img"
src="/chapters/math/directed-numbers-rates/directed-numbers-history.png"
alt="Illustrated timeline: ancient rejection of negative roots, Indian and Chinese rules for signed quantities, European skepticism, and the development of ratios from barter to modern rates"
width="960"
height="640"
loading="lazy"
decoding="async"
/>
<figcaption class="book-figure__caption">
A sketch of how directed numbers and ratios were understood — from Greek reluctance to use
negative roots, through Indian and Chinese models of fortune and debt, to modern rates such
as speed and exchange.
</figcaption>
</figure>
<p>
In India around the 7th century, <strong>Brahmagupta</strong> gave rules for operating with
positive and negative quantities (fortunes and debts). Chinese scholars used counting rods with
two colours to represent opposite signs. European acceptance grew slowly; even in the 18th century
some writers called negative roots “false.”
</p>
<p>
Ratios and proportions appear in Babylonian and Egyptian problems (sharing grain, scaling
recipes). The modern notation \(a:b\) and systematic treatment of <strong>unit rates</strong>
became standard as commerce and science needed comparable measures — speed, price per item, and
exchange rates between currencies.
</p>
<h2 id="derivation" class="book-prose__heading">Derivation</h2>
<h3 id="why-minus-times-minus" class="book-prose__heading">Why \((-)\times(-) = (+)\)?</h3>
<p>
One useful pattern: multiplication should keep the rules of arithmetic consistent. For any
real \(a\), you want \(a \times 0 = 0\). Then
\[ a \times 0 = a \times (1 + (-1)) = a\cdot 1 + a\cdot(-1) = a + a\cdot(-1). \]
So \(a\cdot(-1) = -a\). Now apply that twice:
\[ (-a)\cdot(-1) = -((-a)) = a, \]
which shows that multiplying two negatives gives a positive.
</p>
<h3 id="sharing-ratio" class="book-prose__heading">Sharing in the ratio \(m:n\)</h3>
<p>
Suppose a total \(T\) is split into two parts in the ratio \(m:n\). Think of \(m+n\) equal
<em>parts</em>. Each part has size
\[ \frac{T}{m+n}. \]
The first quantity gets \(m\) of those parts:
\[ \frac{m}{m+n}\,T, \]
and the second gets \(\frac{n}{m+n}\,T\). The parts add to \(T\), as required.
</p>
<h3 id="unit-rate" class="book-prose__heading">Unit rate</h3>
<p>
If \(d\) units of quantity are produced in \(t\) units of time, the average rate is
\(d/t\). “Per one hour” means divide by \(t\) when \(t \neq 0\):
\[ \text{rate per unit time} = \frac{d}{t}. \]
Re-arranging gives \(d = \text{rate} \times t\), the formula used for uniform motion.
</p>
<h2 id="checkpoints" class="book-prose__heading">Checkpoints</h2>
<p>
Pause and reason before continuing. Discuss with a partner or write your work in a notebook.
</p>
<div class="book-callout" role="note">
<p class="book-callout__label">Checkpoint</p>
<p>
Without a calculator: is \((-4) + (-7)\) positive or negative? Where do you land if you start
at \(-4\) and move 7 units left?
</p>
</div>
<div class="book-callout" role="note">
<p class="book-callout__label">Checkpoint</p>
<p>
Simplify \(6 - (-2)\). Explain using “subtracting a negative is adding a positive.”
</p>
</div>
<div class="book-callout" role="note">
<p class="book-callout__label">Checkpoint</p>
<p>
Share \(72\) in the ratio \(5:4\). How many “parts” are there in total?
</p>
</div>
<div class="book-callout" role="note">
<p class="book-callout__label">Checkpoint</p>
<p>
A car travels \(150\) km in \(2.5\) hours. What is the average speed? Which formula did you use?
</p>
</div>
<div class="book-callout" role="note">
<p class="book-callout__label">Checkpoint</p>
<p>
Currency A costs \(1.2\) units of Currency B per unit of A. You exchange \(50\) units of A.
How many units of B do you receive?
</p>
</div>
<h2 id="applications" class="book-prose__heading">Applications</h2>
<h3 id="temperature-altitude" class="book-prose__heading">Temperature and altitude</h3>
<p>
A weather station records \(3\,^{\circ}\mathrm{C}\) at noon and the temperature drops
\(8\,^{\circ}\mathrm{C}\) by midnight. The change is \(-8\), so the midnight temperature is
\[ 3 + (-8) = -5\,^{\circ}\mathrm{C}. \]
Altitude above sea level is positive; below sea level (e.g. Dead Sea shore) is negative
elevation relative to sea level.
</p>
<h3 id="sharing-mixture" class="book-prose__heading">Sharing and mixtures</h3>
<p>
Paint is mixed in the ratio blue : white \(= 2:5\). For \(21\) litres total, there are
\(7\) equal parts, each \(3\) litres, giving \(6\) L blue and \(15\) L white.
</p>
<div class="math-widget-mount" data-widget="ratio-demo" data-pagefind-ignore></div>
<h3 id="speed-exchange" class="book-prose__heading">Speed and exchange rates</h3>
<p>
Walking \(6\) km in \(1.5\) h gives speed \(\frac{6}{1.5} = 4\) km/h. An exchange rate of
\(1\) USD \(=\) \(7.8\) HKD means \(100\) USD converts to \(780\) HKD by multiplying by the
unit rate.
</p>
<h2 id="question-bank" class="book-prose__heading">Question bank</h2>
<p>
Work each question, then open the solution to check your reasoning. Difficulty increases
through the sets.
</p>
<h3 id="questions-easy" class="book-prose__heading">Easy</h3>
<details class="book-question">
<summary class="book-question__prompt">Which is larger, \(-3\) or \(-7\)?</summary>
<div class="book-question__solution">
<p><strong>Answer:</strong> \(-3\) is larger (lies to the right on the number line).</p>
<p><strong>Explanation:</strong> For negative numbers, the one closer to zero is greater.</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Evaluate \((-2) + 9\).</summary>
<div class="book-question__solution">
<p><strong>Answer:</strong> \(7\).</p>
<p><strong>Steps:</strong> Start at \(-2\), move 9 units right.</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">\((-4) \times 6 = \) ______</summary>
<div class="book-question__solution">
<p><strong>Answer:</strong> \(-24\).</p>
<p><strong>Explanation:</strong> Different signs → negative product.</p>
</div>
</details>
<h3 id="questions-intermediate" class="book-prose__heading">Intermediate</h3>
<details class="book-question">
<summary class="book-question__prompt">Evaluate \(5 - (-3) \times 2\).</summary>
<div class="book-question__solution">
<p><strong>Answer:</strong> \(11\).</p>
<p><strong>Steps:</strong> \((-3)\times 2 = -6\); then \(5 - (-6) = 5 + 6 = 11\).</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Divide \(84\) in the ratio \(2:5\).</summary>
<div class="book-question__solution">
<p><strong>Answer:</strong> \(24\) and \(60\).</p>
<p><strong>Steps:</strong> \(7\) parts; each part \(84 \div 7 = 12\); shares \(24\) and \(60\).</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">A cyclist goes \(45\) km in \(3\) h. What is the average speed?</summary>
<div class="book-question__solution">
<p><strong>Answer:</strong> \(15\) km/h.</p>
<p><strong>Calculation:</strong> \(45 \div 3 = 15\).</p>
</div>
</details>
<h3 id="questions-difficult" class="book-prose__heading">Difficult</h3>
<details class="book-question">
<summary class="book-question__prompt">The temperature was \(-2\,^{\circ}\mathrm{C}\) and fell by \(9\,^{\circ}\mathrm{C}\). Find the new temperature.</summary>
<div class="book-question__solution">
<p><strong>Answer:</strong> \(-11\,^{\circ}\mathrm{C}\).</p>
<p><strong>Steps:</strong> \(-2 + (-9) = -11\).</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Put in order from smallest to largest: \(-1\), \(0\), \(-\frac{1}{2}\), \(-2\).</summary>
<div class="book-question__solution">
<p><strong>Answer:</strong> \(-2 &lt; -1 &lt; -\frac{1}{2} &lt; 0\).</p>
<p><strong>Explanation:</strong> On the number line, further left means smaller.</p>
</div>
</details>
<h3 id="questions-hardcore" class="book-prose__heading">Hardcore</h3>
<details class="book-question">
<summary class="book-question__prompt">\(A:B = 3:4\) and \(B:C = 2:5\). Find \(A:B:C\) in simplest form.</summary>
<div class="book-question__solution">
<p><strong>Answer:</strong> \(A:B:C = 3:4:10\) after matching \(B\) (multiply first ratio by 2: \(6:8\), second by 4: \(8:20\) → \(6:8:20 = 3:4:10\)).</p>
<p><strong>Steps:</strong> Align \(B\) to LCM 8: \(A:B = 6:8\), \(B:C = 8:20\), so \(A:B:C = 6:8:20 = 3:4:10\).</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Which situation matches a <em>negative</em> directed number?</summary>
<div class="book-question__solution">
<p><strong>Answer:</strong> A bank balance of \(500\) in debt (owe \(500\)) — often modelled as \(-500\).</p>
<p><strong>Explanation:</strong> Debt below zero balance is a standard directed-number model.</p>
</div>
</details>
<h2 id="references" class="book-prose__heading">References</h2>
<ul>
<li>Brahmagupta, <em>Brāhmasphuṭasiddhānta</em> (628 CE) — early rules for signed quantities.</li>
<li>HKDSE Compulsory Part curriculum — Number and Algebra strand (directed numbers, ratios, rates).</li>
</ul>
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 902 KiB

View file

@ -1,91 +0,0 @@
<div class="book-prose">
<p>
You can already add, subtract, multiply, and divide whole numbers using <strong>written
calculation</strong> (columns, carry, and borrow). On a number line, those values lie on or to the
<strong>right</strong> of zero.
Numbers can also lie to the <strong>left</strong> of zero — we call them <strong>negative</strong>.
Temperatures below freezing, bank overdrafts, and positions below sea level are everyday examples
of <strong>directed numbers</strong>.
</p>
<h2 id="number-line" class="book-prose__heading">The number line</h2>
<p>
On a horizontal number line, moving right means the value <em>increases</em>; moving left means it
<em>decreases</em>. The distance from zero is the <strong>absolute value</strong>
\(|a|\). For example, \(|-5| = 5\) and \(|3| = 3\).
</p>
<div class="book-callout book-callout--formula" role="note">
<p class="book-callout__label">Comparing</p>
<p class="book-formula">
\(a &gt; b\) means \(a\) lies to the right of \(b\). Any negative number is less than any
positive number.
</p>
</div>
<h2 id="adding-subtracting" class="book-prose__heading">Adding and subtracting</h2>
<p>
Think in terms of movement on the line:
</p>
<ul>
<li><strong>\(a + b\)</strong> — start at \(a\), move \(b\) units (right if \(b &gt; 0\), left if \(b &lt; 0\)).</li>
<li><strong>\(a - b\)</strong> — start at \(a\), move \(-b\) units (equivalently, add the opposite of \(b\)).</li>
</ul>
<p>
Subtracting a negative is adding a positive: \(5 - (-3) = 5 + 3 = 8\).
</p>
<h2 id="multiplying-signs" class="book-prose__heading">Multiplying and dividing</h2>
<div class="book-table-wrap">
<table class="book-table">
<thead>
<tr>
<th scope="col">Signs</th>
<th scope="col">Result</th>
</tr>
</thead>
<tbody>
<tr>
<td>positive × positive, negative × negative</td>
<td>positive</td>
</tr>
<tr>
<td>positive × negative (either order)</td>
<td>negative</td>
</tr>
</tbody>
</table>
</div>
<h2 id="ratios" class="book-prose__heading">Ratios</h2>
<p>
A <strong>ratio</strong> compares quantities of the same kind. The ratio \(2:3\) means “2 parts
to 3 parts” — five equal parts in total. To share \(40\) in the ratio \(2:3\), one part is
\(40 \div 5 = 8\), so the shares are \(16\) and \(24\).
</p>
<div class="book-callout book-callout--formula" role="note">
<p class="book-callout__label">Sharing in ratio \(m:n\)</p>
<p class="book-formula">
\[ \text{one part} = \frac{\text{total}}{m+n}, \quad
\text{first share} = \frac{m}{m+n}\times\text{total}, \quad
\text{second share} = \frac{n}{m+n}\times\text{total} \]
</p>
</div>
<h2 id="rates" class="book-prose__heading">Rates</h2>
<p>
A <strong>rate</strong> compares different units. <strong>Speed</strong> is distance per time:
\[ \text{speed} = \frac{\text{distance}}{\text{time}}. \]
A <strong>unit rate</strong> tells “how much per one” — for example \(60\) km in \(1.5\) h gives
\(60 \div 1.5 = 40\) km/h.
</p>
<h2 id="try-it-yourself" class="book-prose__heading">Try it yourself</h2>
<p>
Use the number-line explorer to pick two directed numbers and see their sum on the line. Then try
the ratio sharer in the applications section below.
</p>
</div>
<div class="math-widget-mount" data-widget="number-line" data-pagefind-ignore></div>

View file

@ -1,236 +0,0 @@
<div class="book-prose">
<h2 id="history" class="book-prose__heading">History</h2>
<p>
For much of history, mathematicians treated only positive quantities as numbers. Negative
solutions to equations were often rejected as meaningless. Practical needs — debts, losses,
and temperatures below zero — still pushed people to work with “numbers less than nothing.”
</p>
<figure class="book-figure">
<img
class="book-figure__img"
src="/chapters/math/directed-numbers-rates/directed-numbers-history.png"
alt="Illustrated timeline: ancient rejection of negative roots, Indian and Chinese rules for signed quantities, European skepticism, and the development of ratios from barter to modern rates"
width="960"
height="640"
loading="lazy"
decoding="async"
/>
<figcaption class="book-figure__caption">
A sketch of how directed numbers and ratios were understood — from Greek reluctance to use
negative roots, through Indian and Chinese models of fortune and debt, to modern rates such
as speed and exchange.
</figcaption>
</figure>
<p>
In India around the 7th century, <strong>Brahmagupta</strong> gave rules for operating with
positive and negative quantities (fortunes and debts). Chinese scholars used counting rods with
two colours to represent opposite signs. European acceptance grew slowly; even in the 18th century
some writers called negative roots “false.”
</p>
<p>
Ratios and proportions appear in Babylonian and Egyptian problems (sharing grain, scaling
recipes). The modern notation \(a:b\) and systematic treatment of <strong>unit rates</strong>
became standard as commerce and science needed comparable measures — speed, price per item, and
exchange rates between currencies.
</p>
<h2 id="derivation" class="book-prose__heading">Derivation</h2>
<h3 id="why-minus-times-minus" class="book-prose__heading">Why \((-)\times(-) = (+)\)?</h3>
<p>
One useful pattern: multiplication should keep the rules of arithmetic consistent. For any
real \(a\), you want \(a \times 0 = 0\). Then
\[ a \times 0 = a \times (1 + (-1)) = a\cdot 1 + a\cdot(-1) = a + a\cdot(-1). \]
So \(a\cdot(-1) = -a\). Now apply that twice:
\[ (-a)\cdot(-1) = -((-a)) = a, \]
which shows that multiplying two negatives gives a positive.
</p>
<h3 id="sharing-ratio" class="book-prose__heading">Sharing in the ratio \(m:n\)</h3>
<p>
Suppose a total \(T\) is split into two parts in the ratio \(m:n\). Think of \(m+n\) equal
<em>parts</em>. Each part has size
\[ \frac{T}{m+n}. \]
The first quantity gets \(m\) of those parts:
\[ \frac{m}{m+n}\,T, \]
and the second gets \(\frac{n}{m+n}\,T\). The parts add to \(T\), as required.
</p>
<h3 id="unit-rate" class="book-prose__heading">Unit rate</h3>
<p>
If \(d\) units of quantity are produced in \(t\) units of time, the average rate is
\(d/t\). “Per one hour” means divide by \(t\) when \(t \neq 0\):
\[ \text{rate per unit time} = \frac{d}{t}. \]
Re-arranging gives \(d = \text{rate} \times t\), the formula used for uniform motion.
</p>
<h2 id="checkpoints" class="book-prose__heading">Checkpoints</h2>
<p>
Pause and reason before continuing. Discuss with a partner or write your work in a notebook.
</p>
<div class="book-callout" role="note">
<p class="book-callout__label">Checkpoint</p>
<p>
Without a calculator: is \((-4) + (-7)\) positive or negative? Where do you land if you start
at \(-4\) and move 7 units left?
</p>
</div>
<div class="book-callout" role="note">
<p class="book-callout__label">Checkpoint</p>
<p>
Simplify \(6 - (-2)\). Explain using “subtracting a negative is adding a positive.”
</p>
</div>
<div class="book-callout" role="note">
<p class="book-callout__label">Checkpoint</p>
<p>
Share \(72\) in the ratio \(5:4\). How many “parts” are there in total?
</p>
</div>
<div class="book-callout" role="note">
<p class="book-callout__label">Checkpoint</p>
<p>
A car travels \(150\) km in \(2.5\) hours. What is the average speed? Which formula did you use?
</p>
</div>
<div class="book-callout" role="note">
<p class="book-callout__label">Checkpoint</p>
<p>
Currency A costs \(1.2\) units of Currency B per unit of A. You exchange \(50\) units of A.
How many units of B do you receive?
</p>
</div>
<h2 id="applications" class="book-prose__heading">Applications</h2>
<h3 id="temperature-altitude" class="book-prose__heading">Temperature and altitude</h3>
<p>
A weather station records \(3\,^{\circ}\mathrm{C}\) at noon and the temperature drops
\(8\,^{\circ}\mathrm{C}\) by midnight. The change is \(-8\), so the midnight temperature is
\[ 3 + (-8) = -5\,^{\circ}\mathrm{C}. \]
Altitude above sea level is positive; below sea level (e.g. Dead Sea shore) is negative
elevation relative to sea level.
</p>
<h3 id="sharing-mixture" class="book-prose__heading">Sharing and mixtures</h3>
<p>
Paint is mixed in the ratio blue : white \(= 2:5\). For \(21\) litres total, there are
\(7\) equal parts, each \(3\) litres, giving \(6\) L blue and \(15\) L white.
</p>
<div class="math-widget-mount" data-widget="ratio-demo" data-pagefind-ignore></div>
<h3 id="speed-exchange" class="book-prose__heading">Speed and exchange rates</h3>
<p>
Walking \(6\) km in \(1.5\) h gives speed \(\frac{6}{1.5} = 4\) km/h. An exchange rate of
\(1\) USD \(=\) \(7.8\) HKD means \(100\) USD converts to \(780\) HKD by multiplying by the
unit rate.
</p>
<h2 id="question-bank" class="book-prose__heading">Question bank</h2>
<p>
Work each question, then open the solution to check your reasoning. Difficulty increases
through the sets.
</p>
<h3 id="questions-easy" class="book-prose__heading">Easy</h3>
<details class="book-question">
<summary class="book-question__prompt">Which is larger, \(-3\) or \(-7\)?</summary>
<div class="book-question__solution">
<p><strong>Answer:</strong> \(-3\) is larger (lies to the right on the number line).</p>
<p><strong>Explanation:</strong> For negative numbers, the one closer to zero is greater.</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Evaluate \((-2) + 9\).</summary>
<div class="book-question__solution">
<p><strong>Answer:</strong> \(7\).</p>
<p><strong>Steps:</strong> Start at \(-2\), move 9 units right.</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">\((-4) \times 6 = \) ______</summary>
<div class="book-question__solution">
<p><strong>Answer:</strong> \(-24\).</p>
<p><strong>Explanation:</strong> Different signs → negative product.</p>
</div>
</details>
<h3 id="questions-intermediate" class="book-prose__heading">Intermediate</h3>
<details class="book-question">
<summary class="book-question__prompt">Evaluate \(5 - (-3) \times 2\).</summary>
<div class="book-question__solution">
<p><strong>Answer:</strong> \(11\).</p>
<p><strong>Steps:</strong> \((-3)\times 2 = -6\); then \(5 - (-6) = 5 + 6 = 11\).</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Divide \(84\) in the ratio \(2:5\).</summary>
<div class="book-question__solution">
<p><strong>Answer:</strong> \(24\) and \(60\).</p>
<p><strong>Steps:</strong> \(7\) parts; each part \(84 \div 7 = 12\); shares \(24\) and \(60\).</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">A cyclist goes \(45\) km in \(3\) h. What is the average speed?</summary>
<div class="book-question__solution">
<p><strong>Answer:</strong> \(15\) km/h.</p>
<p><strong>Calculation:</strong> \(45 \div 3 = 15\).</p>
</div>
</details>
<h3 id="questions-difficult" class="book-prose__heading">Difficult</h3>
<details class="book-question">
<summary class="book-question__prompt">The temperature was \(-2\,^{\circ}\mathrm{C}\) and fell by \(9\,^{\circ}\mathrm{C}\). Find the new temperature.</summary>
<div class="book-question__solution">
<p><strong>Answer:</strong> \(-11\,^{\circ}\mathrm{C}\).</p>
<p><strong>Steps:</strong> \(-2 + (-9) = -11\).</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Put in order from smallest to largest: \(-1\), \(0\), \(-\frac{1}{2}\), \(-2\).</summary>
<div class="book-question__solution">
<p><strong>Answer:</strong> \(-2 &lt; -1 &lt; -\frac{1}{2} &lt; 0\).</p>
<p><strong>Explanation:</strong> On the number line, further left means smaller.</p>
</div>
</details>
<h3 id="questions-hardcore" class="book-prose__heading">Hardcore</h3>
<details class="book-question">
<summary class="book-question__prompt">\(A:B = 3:4\) and \(B:C = 2:5\). Find \(A:B:C\) in simplest form.</summary>
<div class="book-question__solution">
<p><strong>Answer:</strong> \(A:B:C = 3:4:10\) after matching \(B\) (multiply first ratio by 2: \(6:8\), second by 4: \(8:20\) → \(6:8:20 = 3:4:10\)).</p>
<p><strong>Steps:</strong> Align \(B\) to LCM 8: \(A:B = 6:8\), \(B:C = 8:20\), so \(A:B:C = 6:8:20 = 3:4:10\).</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Which situation matches a <em>negative</em> directed number?</summary>
<div class="book-question__solution">
<p><strong>Answer:</strong> A bank balance of \(500\) in debt (owe \(500\)) — often modelled as \(-500\).</p>
<p><strong>Explanation:</strong> Debt below zero balance is a standard directed-number model.</p>
</div>
</details>
<h2 id="references" class="book-prose__heading">References</h2>
<ul>
<li>Brahmagupta, <em>Brāhmasphuṭasiddhānta</em> (628 CE) — early rules for signed quantities.</li>
<li>HKDSE Compulsory Part curriculum — Number and Algebra strand (directed numbers, ratios, rates).</li>
</ul>
</div>

View file

@ -1,177 +0,0 @@
import { renderLatex, renderMathInContainer } from "@ofb/katex";
import { createEffect, createMemo, createSignal } from "solid-js";
const MIN = -10;
const MAX = 10;
const WIDTH = 400;
const PAD = 28;
const PLOT = WIDTH - 2 * PAD;
function formatNum(n: number) {
if (Number.isInteger(n)) return String(n);
return (Math.round(n * 100) / 100).toString();
}
function toX(value: number) {
const t = (value - MIN) / (MAX - MIN);
return PAD + t * PLOT;
}
function NumberLine() {
const [a, setA] = createSignal(3);
const [b, setB] = createSignal(-2);
let canvasRef: HTMLCanvasElement | undefined;
const sum = createMemo(() => a() + b());
const equationHtml = createMemo(() =>
renderLatex(`${formatNum(a())} + (${formatNum(b())}) = ${formatNum(sum())}`)
);
const redraw = () => {
const canvas = canvasRef;
if (!canvas) return;
const ctx = canvas.getContext("2d");
if (!ctx) return;
const h = 120;
const dpr = window.devicePixelRatio || 1;
canvas.width = WIDTH * dpr;
canvas.height = h * dpr;
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
const style = getComputedStyle(canvas);
const grid = style.getPropertyValue("--math-grid").trim() || "#e5e5e5";
const axis = style.getPropertyValue("--math-axis").trim() || "#a8a29e";
const curve = style.getPropertyValue("--math-curve").trim() || "#9a6b2e";
const root = style.getPropertyValue("--math-root").trim() || "#2563eb";
const vertex = style.getPropertyValue("--math-vertex").trim() || "#4a6b4a";
const bg = style.getPropertyValue("--math-canvas-bg").trim() || "#ffffff";
ctx.fillStyle = bg;
ctx.fillRect(0, 0, WIDTH, h);
const y = h / 2;
ctx.strokeStyle = grid;
ctx.lineWidth = 1;
for (let v = MIN; v <= MAX; v++) {
const x = toX(v);
ctx.beginPath();
ctx.moveTo(x, y - 4);
ctx.lineTo(x, y + 4);
ctx.stroke();
}
ctx.strokeStyle = axis;
ctx.lineWidth = 2;
ctx.beginPath();
ctx.moveTo(PAD, y);
ctx.lineTo(WIDTH - PAD, y);
ctx.stroke();
ctx.fillStyle = axis;
ctx.font = "10px IBM Plex Mono, monospace";
ctx.textAlign = "center";
for (let v = MIN; v <= MAX; v += 2) {
ctx.fillText(String(v), toX(v), y + 18);
}
const drawTick = (value: number, color: string, radius: number) => {
const x = toX(value);
ctx.fillStyle = color;
ctx.beginPath();
ctx.arc(x, y, radius, 0, Math.PI * 2);
ctx.fill();
};
const av = a();
const bv = b();
const sv = sum();
drawTick(av, root, 6);
drawTick(bv, vertex, 6);
drawTick(sv, curve, 7);
ctx.strokeStyle = curve;
ctx.lineWidth = 2;
ctx.setLineDash([6, 4]);
ctx.beginPath();
ctx.moveTo(toX(av), y);
ctx.lineTo(toX(sv), y);
ctx.stroke();
ctx.setLineDash([]);
};
createEffect(() => {
a();
b();
sum();
redraw();
});
return (
<section class="math-widget" aria-labelledby="number-line-title">
<h2 id="number-line-title" class="math-widget__title">Number-line addition</h2>
<div class="math-widget__body">
<div class="math-widget__controls">
<div class="scenario-demo__control">
<label class="scenario-demo__label" for="nl-a">
<span>First number a</span>
<span class="scenario-demo__value">{formatNum(a())}</span>
</label>
<input
id="nl-a"
class="scenario-demo__slider"
type="range"
min={MIN}
max={MAX}
step={1}
value={a()}
onInput={(e) => setA(Number(e.currentTarget.value))}
/>
</div>
<div class="scenario-demo__control">
<label class="scenario-demo__label" for="nl-b">
<span>Second number b</span>
<span class="scenario-demo__value">{formatNum(b())}</span>
</label>
<input
id="nl-b"
class="scenario-demo__slider"
type="range"
min={MIN}
max={MAX}
step={1}
value={b()}
onInput={(e) => setB(Number(e.currentTarget.value))}
/>
</div>
</div>
<div class="math-widget__formula" innerHTML={equationHtml()} aria-live="polite" />
<figure class="math-widget__figure">
<canvas
ref={(el) => {
canvasRef = el;
redraw();
}}
class="math-widget__canvas"
width={WIDTH}
height={120}
role="img"
aria-label={`Number line showing ${formatNum(a())} plus ${formatNum(b())} equals ${formatNum(sum())}`}
/>
<figcaption
class="math-widget__caption"
ref={(el) => {
if (el) renderMathInContainer(el);
}}
>
Blue: \(a\). Green: \(b\). Gold: sum \(a+b\). Dashed segment shows the move from \(a\) to
\(a+b\).
</figcaption>
</figure>
</div>
</section>
);
}
export default NumberLine;

View file

@ -1,114 +0,0 @@
import { renderLatex } from "@ofb/katex";
import { createMemo, createSignal } from "solid-js";
function formatNum(n: number) {
if (Number.isInteger(n)) return String(n);
return (Math.round(n * 100) / 100).toString();
}
function RatioDemo() {
const [partA, setPartA] = createSignal(2);
const [partB, setPartB] = createSignal(5);
const [total, setTotal] = createSignal(28);
const sumParts = createMemo(() => partA() + partB());
const shareA = createMemo(() => (partA() / sumParts()) * total());
const shareB = createMemo(() => (partB() / sumParts()) * total());
const formulaHtml = createMemo(() =>
renderLatex(
`${partA()}:${partB()} \\Rightarrow ${formatNum(shareA())} : ${formatNum(shareB())} \\text{ from total } ${formatNum(total())}`
)
);
return (
<section
class="scenario-demo scenario-demo--ratio"
aria-label="Sharing a total in a given ratio"
>
<div class="scenario-demo__stage scenario-demo__stage--wide">
<p class="scenario-demo__live" aria-live="polite">
Split <strong>{formatNum(total())}</strong> in the ratio{" "}
<strong>
{partA()}:{partB()}
</strong>
. Each of the <strong>{sumParts()}</strong> equal parts has size{" "}
<strong>{formatNum(total() / sumParts())}</strong>.
</p>
<div class="ratio-demo__bars" role="img" aria-hidden="true">
<div
class="ratio-demo__bar ratio-demo__bar--a"
style={{ width: `${(partA() / sumParts()) * 100}%` }}
/>
<div
class="ratio-demo__bar ratio-demo__bar--b"
style={{ width: `${(partB() / sumParts()) * 100}%` }}
/>
</div>
<div class="scenario-demo__control">
<label class="scenario-demo__label" for="ratio-a">
<span>First part of ratio</span>
<span class="scenario-demo__value">{partA()}</span>
</label>
<input
id="ratio-a"
class="scenario-demo__slider"
type="range"
min={1}
max={8}
step={1}
value={partA()}
onInput={(e) => setPartA(Number(e.currentTarget.value))}
/>
</div>
<div class="scenario-demo__control">
<label class="scenario-demo__label" for="ratio-b">
<span>Second part of ratio</span>
<span class="scenario-demo__value">{partB()}</span>
</label>
<input
id="ratio-b"
class="scenario-demo__slider"
type="range"
min={1}
max={8}
step={1}
value={partB()}
onInput={(e) => setPartB(Number(e.currentTarget.value))}
/>
</div>
<div class="scenario-demo__control">
<label class="scenario-demo__label" for="ratio-total">
<span>Total to share</span>
<span class="scenario-demo__value">{formatNum(total())}</span>
</label>
<input
id="ratio-total"
class="scenario-demo__slider"
type="range"
min={10}
max={100}
step={2}
value={total()}
onInput={(e) => setTotal(Number(e.currentTarget.value))}
/>
</div>
</div>
<div class="scenario-demo__panel">
<div class="scenario-demo__formula" innerHTML={formulaHtml()} aria-live="polite" />
<div class="scenario-demo__stats">
<div class="scenario-demo__stat scenario-demo__stat--highlight">
<span class="scenario-demo__stat-label">First share</span>
<span class="scenario-demo__stat-value">{formatNum(shareA())}</span>
</div>
<div class="scenario-demo__stat">
<span class="scenario-demo__stat-label">Second share</span>
<span class="scenario-demo__stat-value">{formatNum(shareB())}</span>
</div>
</div>
</div>
</section>
);
}
export default RatioDemo;

View file

@ -0,0 +1,83 @@
+++
title = "Integer arithmetic"
description = "Multiply and divide integers from models to symbolic rules; apply order of operations with signed numbers in multi-step expressions."
template = "chapter.html"
weight = 9
[extra]
subject = "math"
chapter_id = "integer-arithmetic"
strand = "Number & Algebra"
+++
<div class="book-prose">
<p>
This chapter extends integer work to multiplication, division, and multi-step expressions.
</p>
<h2 id="sign-rules" class="book-prose__heading">Sign rules for multiplication and division</h2>
<div class="book-table-wrap">
<table class="book-table">
<thead>
<tr>
<th scope="col">Operation</th>
<th scope="col">Result sign</th>
</tr>
</thead>
<tbody>
<tr>
<td>same signs</td>
<td>positive</td>
</tr>
<tr>
<td>different signs</td>
<td>negative</td>
</tr>
</tbody>
</table>
</div>
<p>
Examples: \((-3)(-4)=12\), \(18\div(-3)=-6\).
</p>
<h2 id="patterns" class="book-prose__heading">Why negative times negative is positive</h2>
<p>
Arithmetic rules must stay consistent with distribution. This leads to
\((-a)(-b)=ab\).
</p>
<h2 id="order" class="book-prose__heading">Order of operations with signed numbers</h2>
<p>
Use brackets, exponents, multiplication/division, then addition/subtraction.
</p>
<p class="book-formula">
\(5-(-2)\times 3 = 5-(-6)=11\)
</p>
<h2 id="multi-step" class="book-prose__heading">Multi-step integer expressions</h2>
<p>
Keep signs with their numbers and rewrite subtraction as adding opposites when needed.
</p>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: evaluate \((-6)\times 7\)</summary>
<div class="book-question__solution">
<p>\(-42\).</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: evaluate \(36\div(-9)\)</summary>
<div class="book-question__solution">
<p>\(-4\).</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: evaluate \(8-3(2-5)\)</summary>
<div class="book-question__solution">
<p>
\(2-5=-3\), then \(8-3(-3)=8-(-9)=17\).
</p>
</div>
</details>
</div>

View file

@ -0,0 +1,72 @@
<div class="book-prose">
<p>
This chapter extends integer work to multiplication, division, and multi-step expressions.
</p>
<h2 id="sign-rules" class="book-prose__heading">Sign rules for multiplication and division</h2>
<div class="book-table-wrap">
<table class="book-table">
<thead>
<tr>
<th scope="col">Operation</th>
<th scope="col">Result sign</th>
</tr>
</thead>
<tbody>
<tr>
<td>same signs</td>
<td>positive</td>
</tr>
<tr>
<td>different signs</td>
<td>negative</td>
</tr>
</tbody>
</table>
</div>
<p>
Examples: \((-3)(-4)=12\), \(18\div(-3)=-6\).
</p>
<h2 id="patterns" class="book-prose__heading">Why negative times negative is positive</h2>
<p>
Arithmetic rules must stay consistent with distribution. This leads to
\((-a)(-b)=ab\).
</p>
<h2 id="order" class="book-prose__heading">Order of operations with signed numbers</h2>
<p>
Use brackets, exponents, multiplication/division, then addition/subtraction.
</p>
<p class="book-formula">
\(5-(-2)\times 3 = 5-(-6)=11\)
</p>
<h2 id="multi-step" class="book-prose__heading">Multi-step integer expressions</h2>
<p>
Keep signs with their numbers and rewrite subtraction as adding opposites when needed.
</p>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: evaluate \((-6)\times 7\)</summary>
<div class="book-question__solution">
<p>\(-42\).</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: evaluate \(36\div(-9)\)</summary>
<div class="book-question__solution">
<p>\(-4\).</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: evaluate \(8-3(2-5)\)</summary>
<div class="book-question__solution">
<p>
\(2-5=-3\), then \(8-3(-3)=8-(-9)=17\).
</p>
</div>
</details>
</div>

View file

@ -0,0 +1,74 @@
+++
title = "Integer foundations"
description = "Model directed magnitude on number lines; use the zero principle and tiles to add and subtract integers, and see subtraction as adding an opposite."
template = "chapter.html"
weight = 8
[extra]
subject = "math"
chapter_id = "integer-foundations"
strand = "Number & Algebra"
+++
<div class="book-prose">
<p>
Integers extend whole numbers to include values below zero. They are useful for temperature,
elevation, and money balances.
</p>
<h2 id="number-line" class="book-prose__heading">Directed numbers on a number line</h2>
<p>
Positive numbers are to the right of zero, negative numbers are to the left. Moving right
increases value; moving left decreases value.
</p>
<div class="book-callout book-callout--formula" role="note">
<p class="book-callout__label">Compare quickly</p>
<p class="book-formula">\(a &gt; b\) means \(a\) is to the right of \(b\) on the number line.</p>
</div>
<h2 id="absolute-value" class="book-prose__heading">Absolute value and opposites</h2>
<p>
Absolute value is distance from zero: \(|-7|=7\). Opposites have equal distance from zero and
opposite signs, such as \(+5\) and \(-5\).
</p>
<h2 id="add-subtract" class="book-prose__heading">Adding and subtracting integers</h2>
<p>
You can think of addition and subtraction as movement on the number line.
</p>
<ul>
<li>\(a+b\): start at \(a\), move by \(b\).</li>
<li>\(a-b = a+(-b)\): subtracting is adding the opposite.</li>
</ul>
<p>
Example: \(6-(-4)=6+4=10\).
</p>
<h2 id="zero-principle" class="book-prose__heading">Zero principle with tiles</h2>
<p>
A positive tile and a negative tile form a zero pair. Add or remove zero pairs to simplify
without changing value.
</p>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: evaluate \(-3 + 8\)</summary>
<div class="book-question__solution">
<p>\(-3 + 8 = 5\). Start at \(-3\), move 8 units right.</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: evaluate \(4 - 9\)</summary>
<div class="book-question__solution">
<p>\(4 - 9 = -5\). Equivalent to \(4 + (-9)\).</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: explain why \(2-(-2)=4\)</summary>
<div class="book-question__solution">
<p>
Subtracting \(-2\) means adding its opposite \(+2\), so \(2-(-2)=2+2=4\).
</p>
</div>
</details>
</div>

View file

@ -0,0 +1,63 @@
<div class="book-prose">
<p>
Integers extend whole numbers to include values below zero. They are useful for temperature,
elevation, and money balances.
</p>
<h2 id="number-line" class="book-prose__heading">Directed numbers on a number line</h2>
<p>
Positive numbers are to the right of zero, negative numbers are to the left. Moving right
increases value; moving left decreases value.
</p>
<div class="book-callout book-callout--formula" role="note">
<p class="book-callout__label">Compare quickly</p>
<p class="book-formula">\(a &gt; b\) means \(a\) is to the right of \(b\) on the number line.</p>
</div>
<h2 id="absolute-value" class="book-prose__heading">Absolute value and opposites</h2>
<p>
Absolute value is distance from zero: \(|-7|=7\). Opposites have equal distance from zero and
opposite signs, such as \(+5\) and \(-5\).
</p>
<h2 id="add-subtract" class="book-prose__heading">Adding and subtracting integers</h2>
<p>
You can think of addition and subtraction as movement on the number line.
</p>
<ul>
<li>\(a+b\): start at \(a\), move by \(b\).</li>
<li>\(a-b = a+(-b)\): subtracting is adding the opposite.</li>
</ul>
<p>
Example: \(6-(-4)=6+4=10\).
</p>
<h2 id="zero-principle" class="book-prose__heading">Zero principle with tiles</h2>
<p>
A positive tile and a negative tile form a zero pair. Add or remove zero pairs to simplify
without changing value.
</p>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: evaluate \(-3 + 8\)</summary>
<div class="book-question__solution">
<p>\(-3 + 8 = 5\). Start at \(-3\), move 8 units right.</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: evaluate \(4 - 9\)</summary>
<div class="book-question__solution">
<p>\(4 - 9 = -5\). Equivalent to \(4 + (-9)\).</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: explain why \(2-(-2)=4\)</summary>
<div class="book-question__solution">
<p>
Subtracting \(-2\) means adding its opposite \(+2\), so \(2-(-2)=2+2=4\).
</p>
</div>
</details>
</div>

View file

@ -0,0 +1,69 @@
+++
title = "Percentage applications"
description = "Relate fractions and decimals to base-100 ratios; calculate percent increase and decrease in financial and real-world contexts."
template = "chapter.html"
weight = 11
[extra]
subject = "math"
chapter_id = "percentage-applications"
strand = "Number & Algebra"
+++
<div class="book-prose">
<p>
Percent means “per hundred.” This chapter connects percent, fraction, and decimal forms and
applies them in everyday contexts.
</p>
<h2 id="representations" class="book-prose__heading">Percent, fraction, decimal</h2>
<p class="book-formula">
\(35\% = \frac{35}{100}=0.35\)
</p>
<p>
Convert by multiplying or dividing by 100 as needed.
</p>
<h2 id="part-whole" class="book-prose__heading">Finding part and whole</h2>
<p>
To find \(p\%\) of a quantity \(Q\), use \(\frac{p}{100}\times Q\).
</p>
<p class="book-formula">
\(18\%\text{ of }250 = 0.18\times250 = 45\)
</p>
<h2 id="change" class="book-prose__heading">Percent increase and decrease</h2>
<p>
Percent change compares new and original values.
</p>
<p class="book-formula">
\[
\%\text{ change}=\frac{\text{new}-\text{original}}{\text{original}}\times 100\%.
\]
</p>
<p>
New values can also be found with multipliers:
</p>
<ul>
<li>Increase by \(r\%\): multiply by \(1+\frac{r}{100}\).</li>
<li>Decrease by \(r\%\): multiply by \(1-\frac{r}{100}\).</li>
</ul>
<h2 id="applications" class="book-prose__heading">Real-world applications</h2>
<p>
Discounts, tax, markups, interest, and error rates are all percentage models.
</p>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: 25% off a \$80 item</summary>
<div class="book-question__solution">
<p>Discount \(=0.25\times80=20\), so sale price is \$60.</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: increase 200 by 12%</summary>
<div class="book-question__solution">
<p>\(200\times1.12=224\).</p>
</div>
</details>
</div>

View file

@ -0,0 +1,58 @@
<div class="book-prose">
<p>
Percent means “per hundred.” This chapter connects percent, fraction, and decimal forms and
applies them in everyday contexts.
</p>
<h2 id="representations" class="book-prose__heading">Percent, fraction, decimal</h2>
<p class="book-formula">
\(35\% = \frac{35}{100}=0.35\)
</p>
<p>
Convert by multiplying or dividing by 100 as needed.
</p>
<h2 id="part-whole" class="book-prose__heading">Finding part and whole</h2>
<p>
To find \(p\%\) of a quantity \(Q\), use \(\frac{p}{100}\times Q\).
</p>
<p class="book-formula">
\(18\%\text{ of }250 = 0.18\times250 = 45\)
</p>
<h2 id="change" class="book-prose__heading">Percent increase and decrease</h2>
<p>
Percent change compares new and original values.
</p>
<p class="book-formula">
\[
\%\text{ change}=\frac{\text{new}-\text{original}}{\text{original}}\times 100\%.
\]
</p>
<p>
New values can also be found with multipliers:
</p>
<ul>
<li>Increase by \(r\%\): multiply by \(1+\frac{r}{100}\).</li>
<li>Decrease by \(r\%\): multiply by \(1-\frac{r}{100}\).</li>
</ul>
<h2 id="applications" class="book-prose__heading">Real-world applications</h2>
<p>
Discounts, tax, markups, interest, and error rates are all percentage models.
</p>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: 25% off a \$80 item</summary>
<div class="book-question__solution">
<p>Discount \(=0.25\times80=20\), so sale price is \$60.</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: increase 200 by 12%</summary>
<div class="book-question__solution">
<p>\(200\times1.12=224\).</p>
</div>
</details>
</div>

View file

@ -0,0 +1,63 @@
+++
title = "Fractions and decimals"
description = "Convert between fractions, terminating decimals, and repeating decimals; add, subtract, multiply, and divide rational numbers and mixed numbers."
template = "chapter.html"
weight = 10
[extra]
subject = "math"
chapter_id = "rational-number-operations"
strand = "Number & Algebra"
+++
<div class="book-prose">
<p>
Rational numbers can be written as fractions \(a/b\) with \(b\neq 0\). Decimals and mixed
numbers are alternative forms of the same values.
</p>
<h2 id="convert" class="book-prose__heading">Converting fractions and decimals</h2>
<ul>
<li>Terminating decimal to fraction: \(0.375=\frac{375}{1000}=\frac{3}{8}\).</li>
<li>Fraction to decimal: divide numerator by denominator.</li>
<li>Repeating decimal to fraction: \(0.\overline{3}=\frac{1}{3}\).</li>
</ul>
<h2 id="add-subtract" class="book-prose__heading">Add and subtract fractions</h2>
<p>
Use a common denominator:
</p>
<p class="book-formula">
\[
\frac{2}{5}+\frac{1}{3}=\frac{6}{15}+\frac{5}{15}=\frac{11}{15}.
\]
</p>
<h2 id="multiply-divide" class="book-prose__heading">Multiply and divide fractions</h2>
<p>
Multiply numerators and denominators. For division, multiply by the reciprocal.
</p>
<p class="book-formula">
\[
\frac{3}{4}\div\frac{5}{6}=\frac{3}{4}\times\frac{6}{5}=\frac{9}{10}.
\]
</p>
<h2 id="mixed" class="book-prose__heading">Mixed numbers</h2>
<p>
Convert mixed numbers to improper fractions before operations.
</p>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: simplify \(1\frac{1}{2}+2\frac{1}{3}\)</summary>
<div class="book-question__solution">
<p>\(\frac{3}{2}+\frac{7}{3}=\frac{9}{6}+\frac{14}{6}=\frac{23}{6}=3\frac{5}{6}\).</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: write \(0.125\) as a fraction</summary>
<div class="book-question__solution">
<p>\(0.125=\frac{125}{1000}=\frac{1}{8}\).</p>
</div>
</details>
</div>

View file

@ -0,0 +1,52 @@
<div class="book-prose">
<p>
Rational numbers can be written as fractions \(a/b\) with \(b\neq 0\). Decimals and mixed
numbers are alternative forms of the same values.
</p>
<h2 id="convert" class="book-prose__heading">Converting fractions and decimals</h2>
<ul>
<li>Terminating decimal to fraction: \(0.375=\frac{375}{1000}=\frac{3}{8}\).</li>
<li>Fraction to decimal: divide numerator by denominator.</li>
<li>Repeating decimal to fraction: \(0.\overline{3}=\frac{1}{3}\).</li>
</ul>
<h2 id="add-subtract" class="book-prose__heading">Add and subtract fractions</h2>
<p>
Use a common denominator:
</p>
<p class="book-formula">
\[
\frac{2}{5}+\frac{1}{3}=\frac{6}{15}+\frac{5}{15}=\frac{11}{15}.
\]
</p>
<h2 id="multiply-divide" class="book-prose__heading">Multiply and divide fractions</h2>
<p>
Multiply numerators and denominators. For division, multiply by the reciprocal.
</p>
<p class="book-formula">
\[
\frac{3}{4}\div\frac{5}{6}=\frac{3}{4}\times\frac{6}{5}=\frac{9}{10}.
\]
</p>
<h2 id="mixed" class="book-prose__heading">Mixed numbers</h2>
<p>
Convert mixed numbers to improper fractions before operations.
</p>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: simplify \(1\frac{1}{2}+2\frac{1}{3}\)</summary>
<div class="book-question__solution">
<p>\(\frac{3}{2}+\frac{7}{3}=\frac{9}{6}+\frac{14}{6}=\frac{23}{6}=3\frac{5}{6}\).</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: write \(0.125\) as a fraction</summary>
<div class="book-question__solution">
<p>\(0.125=\frac{125}{1000}=\frac{1}{8}\).</p>
</div>
</details>
</div>

View file

@ -0,0 +1,58 @@
+++
title = "Ratios & rates foundations"
description = "Formulate part-to-part and part-to-whole ratios, find equivalent ratios, compute unit rates, and graph proportional relationships."
template = "chapter.html"
weight = 12
[extra]
subject = "math"
chapter_id = "ratios-and-rates-foundation"
strand = "Number & Algebra"
+++
<div class="book-prose">
<p>
Ratios compare quantities. Rates compare quantities with different units. Both are essential
for scale, speed, and pricing.
</p>
<h2 id="ratio-meaning" class="book-prose__heading">Part-to-part and part-to-whole ratios</h2>
<p>
A ratio \(2:3\) means two equal parts compared with three equal parts. Total parts are \(2+3=5\).
</p>
<p>
If a class has 12 boys and 18 girls, boys:girls is \(12:18=2:3\), and boys:total is \(12:30=2:5\).
</p>
<h2 id="equivalent" class="book-prose__heading">Equivalent ratios</h2>
<p>
Multiply or divide both parts by the same nonzero number.
</p>
<p class="book-formula">
\(3:5 = 6:10 = 12:20\)
</p>
<h2 id="unit-rate" class="book-prose__heading">Unit rates</h2>
<p>
A unit rate is “per one.” If 180 km takes 3 hours, speed is \(180\div3=60\) km/h.
</p>
<h2 id="proportion-graph" class="book-prose__heading">Proportional relationships</h2>
<p>
For proportional relationships, \(y=kx\). Graphs are straight lines through the origin where
slope is the constant of proportionality \(k\).
</p>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: share 56 in ratio \(3:4\)</summary>
<div class="book-question__solution">
<p>Total parts \(=7\), one part \(=8\), shares are 24 and 32.</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: 45 dollars for 6 kg, find unit price</summary>
<div class="book-question__solution">
<p>\(45\div6=7.5\). Unit price is 7.5 dollars per kg.</p>
</div>
</details>
</div>

View file

@ -0,0 +1,47 @@
<div class="book-prose">
<p>
Ratios compare quantities. Rates compare quantities with different units. Both are essential
for scale, speed, and pricing.
</p>
<h2 id="ratio-meaning" class="book-prose__heading">Part-to-part and part-to-whole ratios</h2>
<p>
A ratio \(2:3\) means two equal parts compared with three equal parts. Total parts are \(2+3=5\).
</p>
<p>
If a class has 12 boys and 18 girls, boys:girls is \(12:18=2:3\), and boys:total is \(12:30=2:5\).
</p>
<h2 id="equivalent" class="book-prose__heading">Equivalent ratios</h2>
<p>
Multiply or divide both parts by the same nonzero number.
</p>
<p class="book-formula">
\(3:5 = 6:10 = 12:20\)
</p>
<h2 id="unit-rate" class="book-prose__heading">Unit rates</h2>
<p>
A unit rate is “per one.” If 180 km takes 3 hours, speed is \(180\div3=60\) km/h.
</p>
<h2 id="proportion-graph" class="book-prose__heading">Proportional relationships</h2>
<p>
For proportional relationships, \(y=kx\). Graphs are straight lines through the origin where
slope is the constant of proportionality \(k\).
</p>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: share 56 in ratio \(3:4\)</summary>
<div class="book-question__solution">
<p>Total parts \(=7\), one part \(=8\), shares are 24 and 32.</p>
</div>
</details>
<details class="book-question">
<summary class="book-question__prompt">Checkpoint: 45 dollars for 6 kg, find unit price</summary>
<div class="book-question__solution">
<p>\(45\div6=7.5\). Unit price is 7.5 dollars per kg.</p>
</div>
</details>
</div>

View file

@ -14,26 +14,32 @@
{
"id": "how-different",
"type": "comparison",
"question": "How is Open Free Books different from GeoGebra, Math is Fun, and Wikipedia?",
"intro": "We respect these projects — they solve different problems. Open Free Books is a free, open-source textbook library on the web.",
"question": "How is Open Free Books different from LibreTexts, Open Textbook Library, Project Gutenberg, and OpenStax?",
"intro": "We respect these projects — they solve different problems. On many platforms, you find lots of different books for a single subject. With Open Free Books, there's just one textbook per subject—designed to be comprehensive so people everywhere can use it for any curriculum. That way, you don't need to pick between competing choices—you can just focus on learning. Oh, so this platform usually only provides static HTML without any interaction or just a PDF, but in OpenFreeBooks we have interactive demos An alleged map that are tailor made to visualize complex idea in simple ways.",
"peers": [
{
"name": "GeoGebra",
"url": "https://www.geogebra.org/",
"role": "Interactive geometry and algebra tools, activities, and classroom apps.",
"contrast": "Open Free Books publishes structured textbook chapters and learning paths, not a general-purpose construction sandbox."
"name": "LibreTexts",
"url": "https://libretexts.org/",
"role": "Open educational resource platform with broad textbook collections and institutional adoption.",
"contrast": "Open Free Books is a focused open textbook library with curriculum-shaped pathways, lightweight static delivery, and contributor-driven book structure."
},
{
"name": "Math is Fun",
"url": "https://www.mathsisfun.com/",
"role": "Friendly reference pages, games, and explanations across many topics.",
"contrast": "Open Free Books is curriculum-shaped: ordered chapters, prerequisites in the catalog map, and authored books — not a grab-bag of articles."
"name": "Open Textbook Library",
"url": "https://open.umn.edu/opentextbooks",
"role": "A catalog and discovery hub for openly licensed textbooks with reviews and adoption support.",
"contrast": "Open Free Books publishes and maintains textbooks directly in the open repository, including chapter sequencing and prerequisite maps."
},
{
"name": "Wikipedia",
"url": "https://www.wikipedia.org/",
"role": "Encyclopedic, community-edited reference on almost everything.",
"contrast": "Not a wiki-style fact pile. We publish opinionated paths from prerequisite to mastery — structure on purpose, not everything about X."
"name": "Project Gutenberg: Free eBooks",
"url": "https://www.gutenberg.org/",
"role": "A public library of free eBooks, especially classic works and historical texts.",
"contrast": "Open Free Books is built for active learning: modern textbook chapters, guided progression, and curriculum alignment rather than archival eBook distribution."
},
{
"name": "OpenStax",
"url": "https://openstax.org/",
"role": "Peer-reviewed open textbooks for major school and college subjects.",
"contrast": "Open Free Books emphasizes community-authored web textbooks with transparent GitHub workflows and adaptable chapter-level contribution."
}
],
"ofb": "Free forever, no ads, no commercial upsell, and open on GitHub for anyone to fix or extend."
@ -102,6 +108,16 @@
"The open web is more durable: HTML and JavaScript are stable foundations likely to remain usable for decades. Building high-quality, future-proof educational materials now — with AI assistance but web-native outputs — is the practical long-term approach."
]
},
{
"id": "content-perfect",
"type": "standard",
"question": "Why isn’t the content perfect?",
"answer": [
"No textbook is perfect — whether it’s a PDF, a printed book, or an online resource. Learning evolves, and so does our understanding of what makes content useful and accurate.",
"Open Free Books may not be flawless, but it’s built on lasting web standards: HTML, JavaScript, and CSS. This means chapters are readable on any device, by anyone, anywhere — making them among the most accessible textbooks in the world.",
"We set high standards for academic quality, and the catalog is always improving. Every chapter is open for review and enhancement by contributors, so progress never stops."
]
},
{
"id": "subjects",
"type": "standard",

View file

@ -45,14 +45,6 @@
},
{
"from": "integer-arithmetic",
"to": "directed-numbers-rates"
},
{
"from": "ratios-and-rates-foundation",
"to": "directed-numbers-rates"
},
{
"from": "directed-numbers-rates",
"to": "polynomials-expansion-factorisation"
},
{
@ -172,7 +164,7 @@
"to": "loci"
},
{
"from": "directed-numbers-rates",
"from": "ratios-and-rates-foundation",
"to": "statistical-charts-averages"
},
{
@ -304,7 +296,7 @@
"slug": "integer-foundations",
"title": "Integer foundations",
"description": "Model directed magnitude on number lines; use the zero principle and tiles to add and subtract integers, and see subtraction as adding an opposite.",
"status": "planned",
"status": "live",
"curriculumCoverage": {
"Foundation": "core",
"IGCSE": "core",
@ -322,7 +314,7 @@
"slug": "integer-arithmetic",
"title": "Integer arithmetic",
"description": "Multiply and divide integers from models to symbolic rules; apply order of operations with signed numbers in multi-step expressions.",
"status": "planned",
"status": "live",
"curriculumCoverage": {
"Foundation": "core",
"IGCSE": "core",
@ -340,7 +332,7 @@
"slug": "rational-number-operations",
"title": "Fractions and decimals",
"description": "Convert between fractions, terminating decimals, and repeating decimals; add, subtract, multiply, and divide rational numbers and mixed numbers.",
"status": "planned",
"status": "live",
"curriculumCoverage": {
"Foundation": "core",
"IGCSE": "core",
@ -358,7 +350,7 @@
"slug": "percentage-applications",
"title": "Percentage applications",
"description": "Relate fractions and decimals to base-100 ratios; calculate percent increase and decrease in financial and real-world contexts.",
"status": "planned",
"status": "live",
"curriculumCoverage": {
"Foundation": "core",
"IGCSE": "core",
@ -376,7 +368,7 @@
"slug": "ratios-and-rates-foundation",
"title": "Ratios & rates foundations",
"description": "Formulate part-to-part and part-to-whole ratios, find equivalent ratios, compute unit rates, and graph proportional relationships.",
"status": "planned",
"status": "live",
"curriculumCoverage": {
"Foundation": "core",
"IGCSE": "core",
@ -390,24 +382,6 @@
"Gaokao": "related"
}
},
{
"slug": "directed-numbers-rates",
"title": "Directed numbers, rates & ratios",
"description": "Operate with negative numbers and solve ratio, rate, and proportion problems in context.",
"status": "live",
"curriculumCoverage": {
"DSE": "core",
"IGCSE": "core",
"Common Core": "core",
"Singapore": "core",
"UK GCSE": "core",
"Foundation": "related",
"IB": "related",
"A-Level": "related",
"AP": "related",
"Gaokao": "related"
}
},
{
"slug": "polynomials-expansion-factorisation",
"title": "Polynomials: expansion & factorisation",

View file

@ -7,7 +7,8 @@
"sync:chapters": "bun scripts/sync-chapters.ts",
"generate:site-metadata": "bun scripts/generate-site-metadata.ts",
"build:js": "bun run sync:chapters && vite build",
"build": "bun run check:static-html && bun run validate:curriculum && rm -f themes/openfreebooks/static/main.css public/main.css && bun run build:js && bun run generate:site-metadata && zola build && bun run index:search",
"build:site": "bun run generate:site-metadata && zola build && bun run index:search",
"build": "bun run check:static-html && bun run validate:curriculum && rm -f themes/openfreebooks/static/main.css public/main.css && bun run build:js && bun run build:site",
"index:search": "pagefind --site public --glob \"**/index.html\" && rm -rf static/pagefind && cp -R public/pagefind static/pagefind",
"dev:js": "bun run sync:chapters && vite build --watch",
"dev": "bash scripts/dev.sh",

View file

@ -4,7 +4,42 @@
<title>Open Free Books</title>
<link>https://openfreebooks.org/</link>
<description>Recent updates to Open Free Books pages and live chapters.</description>
<lastBuildDate>Thu, 21 May 2026 16:54:30 GMT</lastBuildDate>
<lastBuildDate>Thu, 21 May 2026 17:43:39 GMT</lastBuildDate>
<item>
<title>Integer foundations</title>
<link>https://openfreebooks.org/math/integer-foundations/</link>
<guid isPermaLink="true">https://openfreebooks.org/math/integer-foundations/</guid>
<pubDate>Thu, 21 May 2026 17:43:39 GMT</pubDate>
<description>Model directed magnitude on number lines; use the zero principle and tiles to add and subtract integers, and see subtraction as adding an opposite.</description>
</item>
<item>
<title>Integer arithmetic</title>
<link>https://openfreebooks.org/math/integer-arithmetic/</link>
<guid isPermaLink="true">https://openfreebooks.org/math/integer-arithmetic/</guid>
<pubDate>Thu, 21 May 2026 17:43:39 GMT</pubDate>
<description>Multiply and divide integers from models to symbolic rules; apply order of operations with signed numbers in multi-step expressions.</description>
</item>
<item>
<title>Percentage applications</title>
<link>https://openfreebooks.org/math/percentage-applications/</link>
<guid isPermaLink="true">https://openfreebooks.org/math/percentage-applications/</guid>
<pubDate>Thu, 21 May 2026 17:43:39 GMT</pubDate>
<description>Relate fractions and decimals to base-100 ratios; calculate percent increase and decrease in financial and real-world contexts.</description>
</item>
<item>
<title>Fractions and decimals</title>
<link>https://openfreebooks.org/math/rational-number-operations/</link>
<guid isPermaLink="true">https://openfreebooks.org/math/rational-number-operations/</guid>
<pubDate>Thu, 21 May 2026 17:43:39 GMT</pubDate>
<description>Convert between fractions, terminating decimals, and repeating decimals; add, subtract, multiply, and divide rational numbers and mixed numbers.</description>
</item>
<item>
<title>Ratios &amp; rates foundations</title>
<link>https://openfreebooks.org/math/ratios-and-rates-foundation/</link>
<guid isPermaLink="true">https://openfreebooks.org/math/ratios-and-rates-foundation/</guid>
<pubDate>Thu, 21 May 2026 17:43:39 GMT</pubDate>
<description>Formulate part-to-part and part-to-whole ratios, find equivalent ratios, compute unit rates, and graph proportional relationships.</description>
</item>
<item>
<title>Advanced trigonometry</title>
<link>https://openfreebooks.org/math/advanced-trigonometry/</link>
@ -243,13 +278,6 @@
<pubDate>Wed, 20 May 2026 20:17:25 GMT</pubDate>
<description>Simplify and combine algebraic fractions; rearrange formulas in science contexts.</description>
</item>
<item>
<title>Directed numbers, rates &amp; ratios</title>
<link>https://openfreebooks.org/math/directed-numbers-rates/</link>
<guid isPermaLink="true">https://openfreebooks.org/math/directed-numbers-rates/</guid>
<pubDate>Wed, 20 May 2026 20:17:25 GMT</pubDate>
<description>Operate with negative numbers and solve ratio, rate, and proportion problems in context.</description>
</item>
<item>
<title>Polynomials: expansion &amp; factorisation</title>
<link>https://openfreebooks.org/math/polynomials-expansion-factorisation/</link>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 92 KiB

Before After
Before After

View file

@ -72,10 +72,6 @@
<loc>https://openfreebooks.org/math/deductive-geometry/</loc>
<lastmod>2026-05-21T16:54:30.000Z</lastmod>
</url>
<url>
<loc>https://openfreebooks.org/math/directed-numbers-rates/</loc>
<lastmod>2026-05-20T20:17:25.000Z</lastmod>
</url>
<url>
<loc>https://openfreebooks.org/math/exponential-logarithmic/</loc>
<lastmod>2026-05-21T07:33:01.000Z</lastmod>
@ -88,6 +84,14 @@
<loc>https://openfreebooks.org/math/functions-graphs/</loc>
<lastmod>2026-05-21T07:33:01.000Z</lastmod>
</url>
<url>
<loc>https://openfreebooks.org/math/integer-arithmetic/</loc>
<lastmod>2026-05-21T17:43:39.596Z</lastmod>
</url>
<url>
<loc>https://openfreebooks.org/math/integer-foundations/</loc>
<lastmod>2026-05-21T17:43:39.989Z</lastmod>
</url>
<url>
<loc>https://openfreebooks.org/math/introduction-trigonometry/</loc>
<lastmod>2026-05-21T16:54:30.000Z</lastmod>
@ -124,6 +128,10 @@
<loc>https://openfreebooks.org/math/normal-distribution-z-scores/</loc>
<lastmod>2026-05-21T16:54:30.000Z</lastmod>
</url>
<url>
<loc>https://openfreebooks.org/math/percentage-applications/</loc>
<lastmod>2026-05-21T17:43:39.595Z</lastmod>
</url>
<url>
<loc>https://openfreebooks.org/math/permutations-combinations-probability/</loc>
<lastmod>2026-05-21T16:54:30.000Z</lastmod>
@ -144,6 +152,14 @@
<loc>https://openfreebooks.org/math/quadratic-equations/</loc>
<lastmod>2026-05-20T20:17:25.000Z</lastmod>
</url>
<url>
<loc>https://openfreebooks.org/math/rational-number-operations/</loc>
<lastmod>2026-05-21T17:43:39.472Z</lastmod>
</url>
<url>
<loc>https://openfreebooks.org/math/ratios-and-rates-foundation/</loc>
<lastmod>2026-05-21T17:43:39.210Z</lastmod>
</url>
<url>
<loc>https://openfreebooks.org/math/sequences-series/</loc>
<lastmod>2026-05-21T07:33:01.000Z</lastmod>