import React, { useRef, useState, useEffect } from "react"; import { ArrowDown, Check, BookOpen, TrendingUp } from "lucide-react"; import LinearTransformationWidget from "../../../components/lessons/LinearTransformationWidget"; import Quiz from "../../../components/lessons/Quiz"; import { LINEAR_TRANSFORMATIONS_QUIZ_DATA } from "../../../utils/constants"; interface LessonProps { onFinish?: () => void; } const LinearTransformationsLesson: React.FC = ({ onFinish }) => { const [activeSection, setActiveSection] = useState(0); const sectionsRef = useRef<(HTMLElement | null)[]>([]); const scrollToSection = (index: number) => { setActiveSection(index); sectionsRef.current[index]?.scrollIntoView({ behavior: "smooth", block: "start", }); }; useEffect(() => { const observer = new IntersectionObserver( (entries) => { entries.forEach((entry) => { if (entry.isIntersecting) { const index = sectionsRef.current.indexOf( entry.target as HTMLElement, ); if (index !== -1) setActiveSection(index); } }); }, { rootMargin: "-20% 0px -60% 0px" }, ); sectionsRef.current.forEach((section) => { if (section) observer.observe(section); }); return () => observer.disconnect(); }, []); const SectionMarker = ({ index, title, icon: Icon, }: { index: number; title: string; icon: any; }) => { const isActive = activeSection === index; const isPast = activeSection > index; return ( ); }; return (
{/* Section 1 */}
{ sectionsRef.current[0] = el; }} className="min-h-screen flex flex-col justify-center mb-24 pt-20 lg:pt-0" >

Function Transformations

Given a base function f(x), transformations let you shift, flip, and scale it predictably. These rules apply to any{" "} function type — linear, quadratic, absolute value, or otherwise. The SAT tests these with graphs, tables, and algebraic forms, so you must recognize them quickly.

{/* Transformation Table */}

All Six Transformations

Transformation Notation Effect on Graph Effect on Points
Shift Up k units f(x) + k Entire graph moves up by k (x, y) → (x, y + k)
Shift Down k units f(x) − k Entire graph moves down by k (x, y) → (x, y − k)
Shift Right h units f(x − h) Graph moves RIGHT by h (x, y) → (x + h, y)
Shift Left h units f(x + h) Graph moves LEFT by h (x, y) → (x − h, y)
Reflect over x-axis −f(x) Graph flips vertically (x, y) → (x, −y)
Reflect over y-axis f(−x) Graph flips horizontally (x, y) → (−x, y)
{/* The #1 Trap */}

⚠ The #1 Trap — Horizontal Shifts Are BACKWARDS

f(x − 3) shifts the graph right 3 (NOT left). f(x + 2) shifts the graph left 2 (NOT right).

Why? Because to get the same y-value, x must be 3 larger. The shift in the graph is always opposite to the sign inside.

f(x) = x² has vertex at (0, 0)

g(x) = (x − 3)² → vertex at (3, 0) → shifted RIGHT 3 ✓

h(x) = (x + 2)² → vertex at (−2, 0) → shifted LEFT 2 ✓

{/* Combined Transformations */}

Combined Transformations — Apply in Order

When multiple transformations are applied, you can read them directly from the equation. Apply in this order: horizontal shift → vertical stretch/compress → reflection → vertical shift.

Example: g(x) = −f(x − 2) + 3

→ shift right 2: f(x − 2) moves graph right 2
→ reflect over x-axis: −f(...) flips graph vertically
→ shift up 3: + 3 moves graph up 3

If f has point (4, 1), then g has point (4 + 2, −1 + 3) = (6, 2)

Example: h(x) = 2f(x + 1) − 4

→ shift left 1: f(x + 1) moves graph left 1
→ stretch vertically by 2: all y-values multiply by 2
→ shift down 4: − 4 moves graph down 4
{/* SAT Question Type */}

SAT Question Type: Table of Values

The SAT may give you a table of values for f(x) and ask for values of g(x) = f(x − 2) + 1. Strategy: for each value in the g(x) table, work backwards. To find g(3), you need f(3 − 2) + 1 = f(1) + 1. Look up f(1) in the original table, then add 1.

{/* Section 2: Quiz */}
{ sectionsRef.current[1] = el; }} className="min-h-screen flex flex-col justify-center" >

Practice Time

{LINEAR_TRANSFORMATIONS_QUIZ_DATA.map((quiz, idx) => (
))}

Topic Mastered!

); }; export default LinearTransformationsLesson;