<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Basics on Blog</title><link>https://svfcode.github.io/en/tags/basics/</link><description>Recent content in Basics on Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Mon, 01 Jun 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://svfcode.github.io/en/tags/basics/index.xml" rel="self" type="application/rss+xml"/><item><title>BetterExplained - Part 2 - Arithmetic</title><link>https://svfcode.github.io/en/p/math-better-explained-arithmetic/</link><pubDate>Mon, 01 Jun 2026 00:00:00 +0000</pubDate><guid>https://svfcode.github.io/en/p/math-better-explained-arithmetic/</guid><description>&lt;img src="https://svfcode.github.io/p/math-better-explained-arithmetic/cover.jpg" alt="Featured image of post BetterExplained - Part 2 - Arithmetic" />&lt;h2 id="mental-tricks">Mental tricks&lt;/h2>
&lt;div class="accordion-controls" role="group" aria-label="Управление секциями">
&lt;button type="button" class="accordion-toggle-all accordion-toggle-all--expand" data-action="expand" aria-label="Expand all">
&lt;span class="accordion-toggle-all__icon" aria-hidden="true">&lt;/span>
&lt;span class="accordion-toggle-all__label">Expand all&lt;/span>
&lt;/button>
&lt;button type="button" class="accordion-toggle-all accordion-toggle-all--collapse" data-action="collapse" aria-label="Collapse all">
&lt;span class="accordion-toggle-all__icon" aria-hidden="true">&lt;/span>
&lt;span class="accordion-toggle-all__label">Collapse all&lt;/span>
&lt;/button>
&lt;/div>&lt;script>
(function () {
if (window.__accordionControlsInit) return;
window.__accordionControlsInit = true;
document.addEventListener("click", function (e) {
var btn = e.target.closest(".accordion-toggle-all");
if (!btn) return;
var controls = btn.closest(".accordion-controls");
if (!controls) return;
var group = controls.nextElementSibling;
while (group &amp;&amp; !group.classList.contains("post-accordion-group")) {
group = group.nextElementSibling;
}
if (!group) return;
var open = btn.dataset.action === "expand";
group.querySelectorAll("details.post-accordion").forEach(function (d) {
d.open = open;
});
});
})();
&lt;/script>
&lt;div class="post-accordion-group">
&lt;h3 class="toc-heading-only" id="60-kmh-is-1-km-per-minute">60 km/h is 1 km per minute&lt;/h3>
&lt;details class="post-accordion">
&lt;summary>60 km/h is 1 km per minute&lt;/summary>
&lt;div>
&lt;p>Driver reaction time (notice → decide → act) is ~1 second.&lt;/p>
&lt;p>So if an obstacle appears closer than 16 meters (at 60 km/h), you probably cannot do anything in time. If the speed is three times higher, what distance is critical?&lt;/p>
&lt;/div>
&lt;/details>
&lt;h3 class="toc-heading-only" id="1-year--250-work-days--2000-work-hours">1 year = 250 work days = 2000 work hours&lt;/h3>
&lt;details class="post-accordion">
&lt;summary>1 year = 250 work days = 2000 work hours&lt;/summary>
&lt;div>
&lt;p>So if you spend 1 hour per day commuting (half an hour each way), you spend 250 hours per year on the road.&lt;/p>
&lt;/div>
&lt;/details>
&lt;h3 class="toc-heading-only" id="rule-of-72-years-to-double--72--interest-rate">Rule of 72: years to double = 72 / interest rate&lt;/h3>
&lt;details class="post-accordion">
&lt;summary>Rule of 72: years to double = 72 / interest rate&lt;/summary>
&lt;div>
&lt;p>Want 10% annual growth on your investments? They double in 7.2 years.&lt;/p>
&lt;p>Want your investments to double in 5 years? You need a rate of 72/5, or about 15%.&lt;/p>
&lt;p>You can use this rule for any time period, not just years.&lt;/p>
&lt;p>Inflation is 4%? That cuts your money in half in 72/4, or 18 years.&lt;/p>
&lt;/div>
&lt;/details>
&lt;h3 class="toc-heading-only" id="mental-arithmetic">Mental arithmetic&lt;/h3>
&lt;details class="post-accordion">
&lt;summary>Mental arithmetic&lt;/summary>
&lt;div>
&lt;p>10,000 = hundred hundred&lt;/p>
&lt;p>million = thousand thousand&lt;/p>
&lt;p>billion = thousand million&lt;/p>
&lt;p>trillion = million million&lt;/p>
&lt;p>1% of 10k is 100. The Dow is roughly 10k (it&amp;rsquo;s about 12k now). So if the Dow drops 100, it&amp;rsquo;s about a 1% loss.&lt;/p>
&lt;p>What&amp;rsquo;s 5k × 50k? That&amp;rsquo;s 250 × thousand × thousand, or 250 million.&lt;/p>
&lt;/div>
&lt;/details>
&lt;h3 class="toc-heading-only" id="visualizing-numbers">Visualizing numbers&lt;/h3>
&lt;details class="post-accordion">
&lt;summary>Visualizing numbers&lt;/summary>
&lt;div>
&lt;p>12 days = 1 million seconds&lt;/p>
&lt;p>1 year = 31 million seconds (about π × 10 million)&lt;/p>
&lt;p>30 years = 1 billion seconds&lt;/p>
&lt;p>30,000 years = 1 trillion seconds&lt;/p>
&lt;p>One “part per million” means an accuracy of 1 second every 12 days. One “part per trillion” means an accuracy of 1 second every 30,000 years.&lt;/p>
&lt;/div>
&lt;/details>
&lt;h3 class="toc-heading-only" id="a-of-b--b-of-a">a% of b = b% of a&lt;/h3>
&lt;details class="post-accordion">
&lt;summary>a% of b = b% of a&lt;/summary>
&lt;div>
&lt;p>It’s not immediately clear, but it’s true: a% of b = 0.01 × a × b, which is the same as b% of a (0.01 × b × a).&lt;/p>
&lt;p>What’s 16% of 25? The same as 25% of 16: 4.&lt;/p>
&lt;p>What’s 43% of 200? The same as 200% of 43: 86.&lt;/p>
&lt;/div>
&lt;/details>
&lt;/div>
&lt;h2 id="sum-from-1-to-n">Sum from 1 to n&lt;/h2>
&lt;div class="accordion-controls" role="group" aria-label="Управление секциями">
&lt;button type="button" class="accordion-toggle-all accordion-toggle-all--expand" data-action="expand" aria-label="Expand all">
&lt;span class="accordion-toggle-all__icon" aria-hidden="true">&lt;/span>
&lt;span class="accordion-toggle-all__label">Expand all&lt;/span>
&lt;/button>
&lt;button type="button" class="accordion-toggle-all accordion-toggle-all--collapse" data-action="collapse" aria-label="Collapse all">
&lt;span class="accordion-toggle-all__icon" aria-hidden="true">&lt;/span>
&lt;span class="accordion-toggle-all__label">Collapse all&lt;/span>
&lt;/button>
&lt;/div>
&lt;div class="post-accordion-group">
&lt;h3 class="toc-heading-only" id="were-usually-just-given-the-formula-and-told-to-memorize-it">We&amp;rsquo;re usually just given the formula and told to memorize it&lt;/h3>
&lt;details class="post-accordion">
&lt;summary>We're usually just given the formula and told to memorize it&lt;/summary>
&lt;div>
\[
\text{Sum from 1 to } n = \frac{n(n+1)}{2}
\]
\[
\text{Sum from 1 to 100} = \frac{100(100+1)}{2} = (50)(101) = 5050
\]
&lt;p>But to build &lt;strong>intuition&lt;/strong> and really understand it, you need to &lt;strong>derive the formula yourself&lt;/strong>.&lt;/p>
&lt;p>Below are four ways to derive it.&lt;/p>
&lt;/div>
&lt;/details>
&lt;h3 class="toc-heading-only" id="1-split-the-sequence-in-half-and-add-in-pairs">1) Split the sequence in half and add in pairs&lt;/h3>
&lt;details class="post-accordion">
&lt;summary>1) Split the sequence in half and add in pairs&lt;/summary>
&lt;div>
&lt;pre tabindex="0">&lt;code> 1 2 3 4 5
10 9 8 7 6
&lt;/code>&lt;/pre>&lt;p>Each vertical pair has the same sum: \(1 + 10 = 2 + 9 = \ldots = n + 1\). There are \(\frac{n}{2}\) pairs.&lt;/p>
\[
\text{Number of pairs} \times \text{sum of each pair} = \frac{n}{2}(n+1) = \frac{n(n+1)}{2}
\]
&lt;/div>
&lt;/details>
&lt;h3 class="toc-heading-only" id="2-two-rows-of-numbers">2) Two rows of numbers&lt;/h3>
&lt;details class="post-accordion">
&lt;summary>2) Two rows of numbers&lt;/summary>
&lt;div>
&lt;pre tabindex="0">&lt;code> 1 2 3 4 5 6 7 8 9 10
10 9 8 7 6 5 4 3 2 1
&lt;/code>&lt;/pre>&lt;p>Add &lt;strong>both&lt;/strong> rows: every column sums to \(n + 1\), and there are \(n\) columns:&lt;/p>
\[
\text{Sum of both rows} = n(n+1)
\]
&lt;p>We only want &lt;strong>one&lt;/strong> row, so divide by 2:&lt;/p>
\[
\frac{n(n+1)}{2}
\]
&lt;/div>
&lt;/details>
&lt;h3 class="toc-heading-only" id="3-picture-a-triangle">3) Picture a triangle&lt;/h3>
&lt;details class="post-accordion">
&lt;summary>3) Picture a triangle&lt;/summary>
&lt;div>
&lt;pre tabindex="0">&lt;code>x
x x
x x x
x x x x
x x x x x
&lt;/code>&lt;/pre>&lt;p>\(n\) rows, row \(k\) has \(k\) cells — \(1 + 2 + \ldots + n\) in total. Imagine fitting two such triangles together tooth-to-tooth to form a rectangle. &lt;strong>Derive the formula yourself&lt;/strong> from that picture.&lt;/p>
&lt;/div>
&lt;/details>
&lt;h3 class="toc-heading-only" id="4-via-the-average--the-most-interesting-one-in-my-view">4) Via the average — the most interesting one, in my view&lt;/h3>
&lt;details class="post-accordion">
&lt;summary>4) Via the average — the most interesting one, in my view&lt;/summary>
&lt;div>
&lt;p>We all know that&lt;/p>
\[
\text{average} = \frac{\text{sum}}{\text{number of items}}
\]
&lt;p>which we can rewrite as&lt;/p>
\[
\text{sum} = \text{average} \times \text{number of items}
\]
&lt;p>For \(1, 2, \ldots, n\) the average is easy to eyeball from the &lt;strong>middle&lt;/strong> of the range: \(\frac{n+1}{2}\). There are \(n\) items, so:&lt;/p>
\[
\text{sum} = \frac{n+1}{2} \cdot n = \frac{n(n+1)}{2}
\]
&lt;p>For \(1 \ldots 100\): average \(\approx 50.5\), sum \(50.5 \times 100 = 5050\).&lt;/p>
&lt;/div>
&lt;/details>
&lt;/div>
&lt;h2 id="visual-arithmetic">Visual arithmetic&lt;/h2>
&lt;div class="accordion-controls" role="group" aria-label="Управление секциями">
&lt;button type="button" class="accordion-toggle-all accordion-toggle-all--expand" data-action="expand" aria-label="Expand all">
&lt;span class="accordion-toggle-all__icon" aria-hidden="true">&lt;/span>
&lt;span class="accordion-toggle-all__label">Expand all&lt;/span>
&lt;/button>
&lt;button type="button" class="accordion-toggle-all accordion-toggle-all--collapse" data-action="collapse" aria-label="Collapse all">
&lt;span class="accordion-toggle-all__icon" aria-hidden="true">&lt;/span>
&lt;span class="accordion-toggle-all__label">Collapse all&lt;/span>
&lt;/button>
&lt;/div>
&lt;div class="post-accordion-group">
&lt;h3 class="toc-heading-only" id="every-operation-is-a-transformation">Every operation is a transformation&lt;/h3>
&lt;details class="post-accordion">
&lt;summary>Every operation is a transformation&lt;/summary>
&lt;div>
&lt;p>Every operation is a transformation. In the real world there are things we want to slide, smoosh and stretch — arithmetic is exactly what gives us the tools to model that.&lt;/p>
&lt;/div>
&lt;/details>
&lt;h3 class="toc-heading-only" id="addition-gives-tools-for">Addition gives tools for:&lt;/h3>
&lt;details class="post-accordion">
&lt;summary>Addition gives tools for:&lt;/summary>
&lt;div>
&lt;ol>
&lt;li>accumulation — counting quantities (total at checkout)&lt;/li>
&lt;li>slide — move a mark along a scale (temperature)&lt;/li>
&lt;li>combination — a new quantity from two different ones (sound wave)&lt;/li>
&lt;/ol>
&lt;/div>
&lt;/details>
&lt;h3 class="toc-heading-only" id="multiplication-gives-tools-for">Multiplication gives tools for:&lt;/h3>
&lt;details class="post-accordion">
&lt;summary>Multiplication gives tools for:&lt;/summary>
&lt;div>
&lt;ol>
&lt;li>repetition — several additions in a row&lt;/li>
&lt;li>scaling — a number grows or shrinks all at once&lt;/li>
&lt;/ol>
&lt;/div>
&lt;/details>
&lt;h3 class="toc-heading-only" id="negatives-and-inverses">Negatives and inverses&lt;/h3>
&lt;details class="post-accordion">
&lt;summary>Negatives and inverses&lt;/summary>
&lt;div>
&lt;ol>
&lt;li>multiply by 1/2: turn a profit of 1 into a profit of 1/2 (“unscale”)&lt;/li>
&lt;li>multiply by −2: turn a profit of 1 into a loss of 2 (“invert”)&lt;/li>
&lt;/ol>
&lt;/div>
&lt;/details>
&lt;h3 class="toc-heading-only" id="division-gives-tools-for">Division gives tools for:&lt;/h3>
&lt;details class="post-accordion">
&lt;summary>Division gives tools for:&lt;/summary>
&lt;div>
&lt;ol>
&lt;li>share (\(a/b\)) — how much of the whole: ate \(3/8\) of the pizza, tank is \(2/5\) full&lt;/li>
&lt;li>split (\(a \div b\)) — how many groups of \(b\) in \(a\): \(12 \div 3\) → 4 piles of 3&lt;/li>
&lt;li>undo scaling — multiplied by 3 → divide by 3 to get back&lt;/li>
&lt;/ol>
&lt;p>A fraction looks at &lt;strong>part of a whole&lt;/strong>; division looks at &lt;strong>how many times it fits&lt;/strong>.&lt;/p>
&lt;/div>
&lt;/details>
&lt;h3 class="toc-heading-only" id="powers-and-roots-give-tools-for">Powers and roots give tools for:&lt;/h3>
&lt;details class="post-accordion">
&lt;summary>Powers and roots give tools for:&lt;/summary>
&lt;div>
&lt;ol>
&lt;li>repeated multiplication — \(2^3 = 2 \times 2 \times 2\)&lt;/li>
&lt;li>growth across dimensions — length \(\times 2\) → area \(\times 4\) (\(n=2\)), volume \(\times 8\) (\(n=3\))&lt;/li>
&lt;li>root — inverse power: \(2^3 = 8 \Leftrightarrow \sqrt[3]{8} = 2\); \(a^{1/n}\) links \(\sqrt[n]{a}\) and \(a^n\)&lt;/li>
&lt;/ol>
&lt;/div>
&lt;/details>
&lt;h3 class="toc-heading-only" id="an-and-sqrtna--dont-mix-up-reverse">\(a^n\) and \(\sqrt[n]{a}\) — don’t mix up “reverse”&lt;/h3>
&lt;details class="post-accordion">
&lt;summary>\(a^n\) and \(\sqrt[n]{a}\) — don’t mix up “reverse”&lt;/summary>
&lt;div>
&lt;ol>
&lt;li>\(a^{-n}\) — “invert” growth: not 8, but \(1/8\)&lt;/li>
&lt;li>\(a^{1/n}\) — “unscale” the exponent: from 8 back to 2 without flipping sign&lt;/li>
&lt;/ol>
&lt;/div>
&lt;/details>
&lt;/div></description></item><item><title>Math with Bad Drawings — overview of Ben Orlin's books</title><link>https://svfcode.github.io/en/p/math-bad-drawings/</link><pubDate>Fri, 13 Mar 2026 00:00:00 +0000</pubDate><guid>https://svfcode.github.io/en/p/math-bad-drawings/</guid><description>&lt;img src="https://svfcode.github.io/p/math-bad-drawings/cover.jpg" alt="Featured image of post Math with Bad Drawings — overview of Ben Orlin's books" />&lt;p>Another way to build math intuition before the formulas — through stories and sketches. Ben Orlin writes as if explaining to a friend over tea: with humor, no pretense, and a focus on &lt;em>why&lt;/em> any of this matters.&lt;/p>
&lt;p>Author’s site: &lt;a class="link" href="https://mathwithbaddrawings.com/" target="_blank" rel="noopener"
>Math with Bad Drawings&lt;/a>.&lt;/p>
&lt;h2 id="math-with-bad-drawings">Math with Bad Drawings&lt;/h2>
&lt;p>The flagship book. Orlin covers school and early college topics — probability, geometry, statistics, infinity — via comics and everyday analogies.&lt;/p>
&lt;p>The strength: math as a way of thinking, not a memorization exam. Pairs well with &lt;a class="link" href="https://svfcode.github.io/en/p/math-better-explained/" >BetterExplained&lt;/a>: more pure intuition there, more narrative and humor here.&lt;/p>
&lt;h2 id="change-is-the-only-constant">Change Is the Only Constant&lt;/h2>
&lt;p>The second book — calculus and the history of ideas: how people arrived at derivatives, integrals, and limits. A good bridge to &lt;a class="link" href="https://svfcode.github.io/en/p/math-derivatives/" >derivatives&lt;/a> and the &lt;a class="link" href="https://svfcode.github.io/en/p/math-circle-area/" >circle area example&lt;/a>: story and meaning first, symbols second.&lt;/p>
&lt;h2 id="math-games-with-bad-drawings">Math Games with Bad Drawings&lt;/h2>
&lt;p>A collection of games and puzzles — logic, combinatorics, strategy. Less directly about ML, but it trains mathematical thinking: spot structure, test hypotheses, don’t fear being wrong.&lt;/p>
&lt;h2 id="when-to-read-in-this-series">When to read in this series&lt;/h2>
&lt;ul>
&lt;li>After &lt;a class="link" href="https://svfcode.github.io/en/p/math-better-explained/" >BetterExplained&lt;/a> — same “understand, don’t memorize” vibe, in book form.&lt;/li>
&lt;li>Alongside the &lt;a class="link" href="https://svfcode.github.io/en/p/math-essentials-overview/" >interview math overview&lt;/a> — so the checklist topics aren’t just a dry list.&lt;/li>
&lt;/ul>
&lt;p>You don’t need all three in order: start with &lt;em>Math with Bad Drawings&lt;/em> for a broad tour; with &lt;em>Change Is the Only Constant&lt;/em> if calculus is the sticking point.&lt;/p></description></item><item><title>BetterExplained - Part 1 - Intuitive Math</title><link>https://svfcode.github.io/en/p/math-better-explained/</link><pubDate>Tue, 10 Mar 2026 00:00:00 +0000</pubDate><guid>https://svfcode.github.io/en/p/math-better-explained/</guid><description>&lt;img src="https://svfcode.github.io/p/math-better-explained/cover.jpg" alt="Featured image of post BetterExplained - Part 1 - Intuitive Math" />&lt;p>First article in the &lt;strong>BetterExplained&lt;/strong> series on this blog — not about formulas, but about &lt;em>how&lt;/em> to understand them.&lt;/p>
&lt;p>&lt;strong>Learn Right, Not Rote.&lt;/strong>&lt;/p>
&lt;blockquote>
&lt;p>Math is no more about equations than poetry is about spelling.&lt;/p>
&lt;/blockquote>
&lt;p>Formulas and rules are tools. Without a sense of &lt;em>why&lt;/em> something works, they become symbols that are easy to forget and hard to apply. In machine learning this shows up everywhere: gradient, matrix, integral — the meaning slips away if there is no intuition behind them.&lt;/p>
&lt;h2 id="betterexplained">BetterExplained&lt;/h2>
&lt;p>&lt;a class="link" href="https://betterexplained.com/" target="_blank" rel="noopener"
>BetterExplained&lt;/a> is Kalid Azad’s site of intuitive math explanations. The material is built from images and meaning toward notation, not the other way around.&lt;/p>
&lt;p>The usual pattern: first &lt;em>what is going on&lt;/em> (geometry, analogy, story), then symbols. That makes it easier to connect school math with linear algebra, calculus, and probability for AI.&lt;/p>
&lt;h2 id="what-is-useful-for-this-series">What is useful for this series&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Derivatives and integrals&lt;/strong> — rate of change and accumulation before the formulas; good prep for &lt;a class="link" href="https://svfcode.github.io/en/p/math-derivatives/" >derivatives&lt;/a> and the &lt;a class="link" href="https://svfcode.github.io/en/p/math-circle-area/" >circle area&lt;/a> example.&lt;/li>
&lt;li>&lt;strong>Exponents and e&lt;/strong> — why &lt;code>e^x&lt;/code> behaves as it does; useful for softmax, loss, and growth in models.&lt;/li>
&lt;li>&lt;strong>Vectors and dot products&lt;/strong> — geometric meaning before matrix algebra.&lt;/li>
&lt;li>&lt;strong>Euler’s formula&lt;/strong> — one intuition linking exponentials, sin/cos, and complex numbers.&lt;/li>
&lt;/ul>
&lt;p>You do not need to read everything: pick the topic that still feels opaque in a textbook or an ML article.&lt;/p>
&lt;h2 id="how-to-use-it-with-this-blog">How to use it with this blog&lt;/h2>
&lt;ol>
&lt;li>Here — why the math matters for AI and short ML-oriented write-ups.&lt;/li>
&lt;li>On BetterExplained — deeper intuition on classic topics.&lt;/li>
&lt;li>Return to the formulas with a mental picture — articles, code, and lectures become easier.&lt;/li>
&lt;/ol>
&lt;p>&lt;strong>Next in the series:&lt;/strong> &lt;a class="link" href="https://svfcode.github.io/en/p/math-better-explained-arithmetic/" >BetterExplained — Part 2 — Arithmetic&lt;/a>.&lt;/p></description></item></channel></rss>