{
 "name": "Formula Bro",
 "url": "https://formulabro.yunusemrevurgun.com/",
 "description": "Formulas explained in plain English, with checked worked examples.",
 "author": {
  "name": "Yunus Emre Vurgun",
  "url": "https://yunusemrevurgun.com/"
 },
 "updated": "2026-10-22",
 "categories": [
  {
   "id": "ai-ml",
   "name": "AI & Machine Learning",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/",
   "formulas": [
    "ai-ml/artificial-neuron",
    "ai-ml/sigmoid-function",
    "ai-ml/softmax",
    "ai-ml/mean-squared-error",
    "ai-ml/cross-entropy-loss",
    "ai-ml/gradient-descent",
    "ai-ml/bayes-theorem",
    "ai-ml/scaled-dot-product-attention",
    "ai-ml/linear-regression",
    "ai-ml/logistic-regression",
    "ai-ml/relu-activation",
    "ai-ml/tanh-activation",
    "ai-ml/mean-absolute-error",
    "ai-ml/huber-loss",
    "ai-ml/hinge-loss",
    "ai-ml/l2-regularization",
    "ai-ml/l1-regularization",
    "ai-ml/momentum-optimizer",
    "ai-ml/adam-optimizer",
    "ai-ml/backpropagation-chain-rule",
    "ai-ml/batch-normalization",
    "ai-ml/layer-normalization",
    "ai-ml/dropout",
    "ai-ml/precision-and-recall",
    "ai-ml/f1-score",
    "ai-ml/classification-accuracy",
    "ai-ml/cosine-similarity",
    "ai-ml/euclidean-distance",
    "ai-ml/k-means-clustering",
    "ai-ml/kl-divergence",
    "ai-ml/naive-bayes-classifier",
    "ai-ml/gini-impurity",
    "ai-ml/information-gain",
    "ai-ml/softmax-temperature",
    "ai-ml/perplexity",
    "ai-ml/positional-encoding",
    "ai-ml/convolution-output-size",
    "ai-ml/r-squared",
    "ai-ml/q-learning-update",
    "ai-ml/discounted-return",
    "ai-ml/z-score-standardization"
   ]
  },
  {
   "id": "computer-science",
   "name": "Computer Science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/",
   "formulas": [
    "computer-science/binary-number-value",
    "computer-science/binary-search-steps",
    "computer-science/shannon-entropy",
    "computer-science/amdahls-law",
    "computer-science/de-morgans-laws",
    "computer-science/littles-law",
    "computer-science/hexadecimal-number-value",
    "computer-science/twos-complement",
    "computer-science/floating-point-value",
    "computer-science/bits-needed",
    "computer-science/big-o-notation",
    "computer-science/master-theorem",
    "computer-science/sum-of-first-n-integers",
    "computer-science/geometric-series",
    "computer-science/permutations",
    "computer-science/combinations",
    "computer-science/pigeonhole-principle",
    "computer-science/inclusion-exclusion-principle",
    "computer-science/hash-table-load-factor",
    "computer-science/birthday-problem",
    "computer-science/bloom-filter-false-positive-rate",
    "computer-science/modulo-operation",
    "computer-science/euclidean-algorithm-gcd",
    "computer-science/rsa-encryption",
    "computer-science/hamming-distance",
    "computer-science/password-entropy",
    "computer-science/data-transfer-time",
    "computer-science/bandwidth-delay-product",
    "computer-science/nyquist-sampling-theorem",
    "computer-science/shannon-hartley-theorem",
    "computer-science/average-memory-access-time",
    "computer-science/cpu-time-equation",
    "computer-science/gustafsons-law",
    "computer-science/system-availability",
    "computer-science/mm1-queue",
    "computer-science/perfect-binary-tree-nodes",
    "computer-science/complete-graph-edges",
    "computer-science/eulers-formula-for-planar-graphs",
    "computer-science/pagerank",
    "computer-science/tf-idf"
   ]
  },
  {
   "id": "electricity",
   "name": "Electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/",
   "formulas": [
    "electricity/ohms-law",
    "electricity/electric-power",
    "electricity/energy-and-kilowatt-hours",
    "electricity/resistors-in-series-and-parallel",
    "electricity/kirchhoffs-current-law",
    "electricity/rc-time-constant",
    "electricity/coulombs-law",
    "electricity/charge-and-current",
    "electricity/kirchhoffs-voltage-law",
    "electricity/voltage-divider",
    "electricity/current-divider",
    "electricity/resistivity",
    "electricity/temperature-coefficient-of-resistance",
    "electricity/drift-velocity",
    "electricity/internal-resistance",
    "electricity/maximum-power-transfer",
    "electricity/wheatstone-bridge",
    "electricity/battery-capacity-runtime",
    "electricity/capacitance",
    "electricity/parallel-plate-capacitor",
    "electricity/capacitors-in-series-and-parallel",
    "electricity/energy-stored-in-capacitor",
    "electricity/inductor-voltage",
    "electricity/energy-stored-in-inductor",
    "electricity/rl-time-constant",
    "electricity/capacitive-reactance",
    "electricity/inductive-reactance",
    "electricity/rlc-impedance",
    "electricity/resonant-frequency",
    "electricity/rms-voltage",
    "electricity/ac-power-factor",
    "electricity/three-phase-power",
    "electricity/transformer-turns-ratio",
    "electricity/electric-field-of-point-charge",
    "electricity/electric-potential",
    "electricity/magnetic-force-on-moving-charge",
    "electricity/force-on-current-carrying-wire",
    "electricity/magnetic-field-of-straight-wire",
    "electricity/magnetic-field-of-solenoid",
    "electricity/faradays-law"
   ]
  },
  {
   "id": "quantum-mechanics",
   "name": "Quantum Mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/",
   "formulas": [
    "quantum-mechanics/planck-einstein-relation",
    "quantum-mechanics/photoelectric-effect",
    "quantum-mechanics/de-broglie-wavelength",
    "quantum-mechanics/heisenberg-uncertainty-principle",
    "quantum-mechanics/born-rule",
    "quantum-mechanics/schrodinger-equation",
    "quantum-mechanics/hydrogen-energy-levels",
    "quantum-mechanics/photon-momentum",
    "quantum-mechanics/compton-scattering",
    "quantum-mechanics/plancks-law",
    "quantum-mechanics/wiens-displacement-law",
    "quantum-mechanics/stefan-boltzmann-law",
    "quantum-mechanics/rydberg-formula",
    "quantum-mechanics/bohr-radius",
    "quantum-mechanics/hydrogen-like-atom-energy",
    "quantum-mechanics/electron-shell-capacity",
    "quantum-mechanics/particle-in-a-box",
    "quantum-mechanics/quantum-harmonic-oscillator",
    "quantum-mechanics/quantum-tunneling-probability",
    "quantum-mechanics/wave-function-normalization",
    "quantum-mechanics/expectation-value",
    "quantum-mechanics/qubit-state",
    "quantum-mechanics/bloch-sphere",
    "quantum-mechanics/stationary-state-time-evolution",
    "quantum-mechanics/energy-time-uncertainty",
    "quantum-mechanics/canonical-commutation-relation",
    "quantum-mechanics/angular-momentum-quantization",
    "quantum-mechanics/spin-one-half",
    "quantum-mechanics/zeeman-effect",
    "quantum-mechanics/fine-structure-constant",
    "quantum-mechanics/double-slit-interference",
    "quantum-mechanics/bragg-law",
    "quantum-mechanics/thermal-de-broglie-wavelength",
    "quantum-mechanics/relativistic-energy-momentum",
    "quantum-mechanics/pair-production-threshold",
    "quantum-mechanics/radioactive-decay-law",
    "quantum-mechanics/fermi-dirac-distribution",
    "quantum-mechanics/bose-einstein-distribution",
    "quantum-mechanics/fermi-energy",
    "quantum-mechanics/chsh-inequality"
   ]
  }
 ],
 "formulas": [
  {
   "id": "ai-ml/artificial-neuron",
   "title": "Artificial Neuron (Weighted Sum)",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/artificial-neuron/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/artificial-neuron.md",
   "latex": "z = \\sum_{i=1}^{n} w_i x_i + b, \\quad a = f(z)",
   "one_liner": "An artificial neuron multiplies each input by a weight, adds them up with a bias, and then decides how strongly to fire.",
   "read_aloud": "z equals the sum, for i from 1 to n, of weight i times input i, plus the bias b. Then the output a equals f of z, where f is the activation function.",
   "symbols": [
    {
     "latex": "x_i",
     "meaning": "One input number, for example a pixel brightness or a sensor reading. The neuron has $n$ inputs in total."
    },
    {
     "latex": "w_i",
     "meaning": "The weight for input $i$. A large positive weight pushes the neuron toward firing, and a negative weight pushes against it. Training is the process that adjusts the weights."
    },
    {
     "latex": "i",
     "meaning": "The position of one input in the list, counting from 1 up to $n$."
    },
    {
     "latex": "n",
     "meaning": "How many inputs the neuron has."
    },
    {
     "latex": "b",
     "meaning": "The bias, one extra number added at the end. It shifts the threshold up or down, so the neuron can fire or stay quiet no matter what the inputs are."
    },
    {
     "latex": "\\sum_{i=1}^{n}",
     "meaning": "\"Add up for every $i$ from 1 to $n$\": multiply each input by its weight and total all the results."
    },
    {
     "latex": "z",
     "meaning": "The weighted sum plus the bias: the raw total before the activation function is applied."
    },
    {
     "latex": "f",
     "meaning": "The activation function, a rule that turns the total $z$ into the final output. Two common examples are ReLU and the sigmoid."
    },
    {
     "latex": "a",
     "meaning": "The output of the neuron, also called its activation. It is the number passed on to the next layer."
    }
   ],
   "worked_example": {
    "title": "One neuron with two inputs",
    "setup": "Two inputs $x = (2, 3)$ with weights $w = (0.5, -1)$ and bias $b = 1$. The activation function is ReLU, which returns $\\max(0, z)$: a negative total becomes 0, and a positive total passes through unchanged. All values are unitless in this example.",
    "steps": [
     "Multiply each input by its weight: $0.5 \\times 2 = 1$ and $(-1) \\times 3 = -3$.",
     "Add the products and the bias: $z = 1 + (-3) + 1 = -1$.",
     "Apply ReLU: $a = \\max(0, -1) = 0$."
    ],
    "answer": "The neuron outputs **0**. Its weighted total was negative, so ReLU silenced it. A negative total always becomes 0 under ReLU, and only a positive total gets through."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/sigmoid-function/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/softmax/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/gradient-descent/"
   ],
   "sources": [
    {
     "title": "Artificial neuron, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Artificial_neuron"
    },
    {
     "title": "Rectifier (neural networks), Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Rectifier_(neural_networks)"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/sigmoid-function",
   "title": "Sigmoid Function",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/sigmoid-function/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/sigmoid-function.md",
   "latex": "\\sigma(z) = \\frac{1}{1 + e^{-z}}",
   "one_liner": "The sigmoid takes any number, however big or small, and squeezes it into a value between 0 and 1 that can be read as a chance.",
   "read_aloud": "Sigma of z equals one divided by the quantity one plus e to the power of negative z.",
   "symbols": [
    {
     "latex": "\\sigma(z)",
     "meaning": "The sigmoid of $z$: the output. It is always strictly between 0 and 1."
    },
    {
     "latex": "z",
     "meaning": "The input number, a raw score. It can be any real number: positive, negative or zero. It has no unit in most models."
    },
    {
     "latex": "e",
     "meaning": "Euler's number, about 2.718. Here it is raised to the power $-z$."
    }
   ],
   "worked_example": {
    "title": "Three inputs: positive, zero and negative",
    "setup": "Apply the sigmoid to three raw scores: $z = 2$, $z = 0$ and $z = -2$. All values are unitless here.",
    "steps": [
     "For $z = 2$: $\\sigma(2) = \\frac{1}{1 + e^{-2}} = \\frac{1}{1 + 0.1353} \\approx 0.881$.",
     "For $z = 0$: $\\sigma(0) = \\frac{1}{1 + e^{0}} = \\frac{1}{1 + 1} = 0.5$.",
     "For $z = -2$: $\\sigma(-2) = \\frac{1}{1 + e^{2}} = \\frac{1}{1 + 7.389} \\approx 0.119$."
    ],
    "answer": "A raw score of $+2$ becomes about **0.881**, a score of 0 lands exactly on **0.5**, and a score of $-2$ drops to about **0.119**. Positive scores lean toward 1, negative scores lean toward 0, and 0 sits in the middle."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/artificial-neuron/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/softmax/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/cross-entropy-loss/"
   ],
   "sources": [
    {
     "title": "Sigmoid function, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Sigmoid_function"
    },
    {
     "title": "Logistic function, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Logistic_function"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/softmax",
   "title": "Softmax",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/softmax/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/softmax.md",
   "latex": "\\operatorname{softmax}(z)_i = \\frac{e^{z_i}}{\\sum_{j=1}^{K} e^{z_j}}",
   "one_liner": "Softmax takes a list of scores, any numbers at all, and turns them into percentages that add up to 100%.",
   "read_aloud": "The softmax of score number i equals e to the power of that score, divided by the sum of e to the power of every score.",
   "symbols": [
    {
     "latex": "z",
     "meaning": "The list of raw scores (also called **logits**). A model produces one score per possible answer. They can be any real numbers, even negative."
    },
    {
     "latex": "z_i",
     "meaning": "One score from the list, the one for answer number $i$."
    },
    {
     "latex": "K",
     "meaning": "How many scores are in the list, so how many possible answers there are."
    },
    {
     "latex": "e",
     "meaning": "Euler's number, about 2.718. Raising $e$ to a power makes every number positive."
    },
    {
     "latex": "\\sum_{j=1}^{K}",
     "meaning": "\"Add up for every $j$ from 1 to $K$\": go through the whole list and total it."
    },
    {
     "latex": "\\operatorname{softmax}(z)_i",
     "meaning": "The result for answer $i$: a number between 0 and 1, read as the probability of that answer."
    }
   ],
   "worked_example": {
    "title": "A photo classifier choosing between cat, dog and bird",
    "setup": "The model gives the scores $z = (2.0,\\ 1.0,\\ 0.1)$ for *cat*, *dog* and *bird*.",
    "steps": [
     "Raise $e$ to each score: $e^{2.0} \\approx 7.389$, $e^{1.0} \\approx 2.718$, $e^{0.1} \\approx 1.105$.",
     "Add them up: $7.389 + 2.718 + 1.105 = 11.213$.",
     "Divide each one by the total: $$\\frac{7.389}{11.213} \\approx 0.659, \\quad \\frac{2.718}{11.213} \\approx 0.242, \\quad \\frac{1.105}{11.213} \\approx 0.099$$",
     "Check: $0.659 + 0.242 + 0.099 = 1.000$."
    ],
    "answer": "The model says *cat* with about **65.9%** confidence, *dog* 24.2% and *bird* 9.9%. The cat score was only twice the dog score, but its probability is almost three times bigger: that is the stretching effect of $e^{z}$."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/sigmoid-function/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/cross-entropy-loss/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/scaled-dot-product-attention/"
   ],
   "sources": [
    {
     "title": "Softmax function, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Softmax_function"
    },
    {
     "title": "Goodfellow, Bengio and Courville, Deep Learning, chapter 6.2.2.3 (Softmax units)",
     "url": "https://www.deeplearningbook.org/contents/mlp.html"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/mean-squared-error",
   "title": "Mean Squared Error (MSE)",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/mean-squared-error/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/mean-squared-error.md",
   "latex": "\\mathrm{MSE} = \\frac{1}{n}\\sum_{i=1}^{n} (y_i - \\hat{y}_i)^2",
   "one_liner": "Mean squared error measures how wrong a model's guesses are by squaring each miss, so big misses count much more, and then averaging them.",
   "read_aloud": "M S E equals one over n, times the sum, for i from 1 to n, of the true value y i minus the predicted value y hat i, all squared.",
   "symbols": [
    {
     "latex": "\\mathrm{MSE}",
     "meaning": "The mean squared error: one number that sums up how wrong the predictions are. It is in squared units, so if the values are in meters, the MSE is in square meters."
    },
    {
     "latex": "n",
     "meaning": "How many predictions you are scoring."
    },
    {
     "latex": "i",
     "meaning": "The position of one prediction in the list, counting from 1 up to $n$."
    },
    {
     "latex": "\\sum_{i=1}^{n}",
     "meaning": "\"Add up for every $i$ from 1 to $n$\": go through all the predictions and total the results."
    },
    {
     "latex": "y_i",
     "meaning": "The true value for case $i$, the answer you know is correct."
    },
    {
     "latex": "\\hat{y}_i",
     "meaning": "The predicted value for case $i$, the model's guess. The hat over the $y$ is the usual sign for a prediction."
    }
   ],
   "worked_example": {
    "title": "Three temperature predictions",
    "setup": "A model predicts the temperature in three cities, in degrees Celsius. The true temperatures are $y = (3, 5, 2)$ and the predictions are $\\hat{y} = (2, 6, 4)$.",
    "steps": [
     "Find each gap: $3 - 2 = 1$, $5 - 6 = -1$ and $2 - 4 = -2$.",
     "Square each gap: $1^2 = 1$, $(-1)^2 = 1$ and $(-2)^2 = 4$.",
     "Add the squares: $1 + 1 + 4 = 6$.",
     "Divide by the number of predictions, $n = 3$: $\\mathrm{MSE} = \\frac{6}{3} = 2.0$."
    ],
    "answer": "The MSE is **2.0 square degrees Celsius**. The biggest miss, the $-2$ for the third city, contributed 4 of the 6 squared points, so it dominates the score. A perfect model would score 0."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/gradient-descent/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/cross-entropy-loss/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/artificial-neuron/"
   ],
   "sources": [
    {
     "title": "Mean squared error, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Mean_squared_error"
    },
    {
     "title": "Loss function, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Loss_function"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/cross-entropy-loss",
   "title": "Cross-Entropy Loss",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/cross-entropy-loss/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/cross-entropy-loss.md",
   "latex": "L = -\\sum_{i=1}^{K} y_i \\ln(\\hat{y}_i)",
   "one_liner": "Cross-entropy loss gives a small score when the model was confident in the right answer and a big score when it was not.",
   "read_aloud": "L equals minus the sum, for i from 1 to K, of y i times the natural log of y hat i.",
   "symbols": [
    {
     "latex": "L",
     "meaning": "The loss: one number that says how wrong the model was. Lower is better, and 0 is a perfect score. With the natural log, the unit is the nat."
    },
    {
     "latex": "K",
     "meaning": "The number of possible classes, such as cat, dog and bird."
    },
    {
     "latex": "i",
     "meaning": "The position of one class in the list, counting from 1 up to $K$."
    },
    {
     "latex": "\\sum_{i=1}^{K}",
     "meaning": "\"Add up for every $i$ from 1 to $K$\": total the terms for all the classes."
    },
    {
     "latex": "y_i",
     "meaning": "The true label for class $i$: 1 for the correct class and 0 for every other class. This is called a one-hot label."
    },
    {
     "latex": "\\hat{y}_i",
     "meaning": "The probability the model gave to class $i$. It is a number between 0 and 1."
    },
    {
     "latex": "\\ln",
     "meaning": "The natural logarithm, which asks: what power of $e$ gives this number? Any number between 0 and 1 gives a negative log, which is why the formula has a minus sign in front."
    }
   ],
   "worked_example": {
    "title": "Cat, dog or bird, with a different correct answer",
    "setup": "The softmax example gave the probabilities cat 0.659, dog 0.242 and bird 0.099. Each case below uses a one-hot label, so only the correct class has $y = 1$.",
    "steps": [
     "If the correct answer is cat, only the cat term survives: $L = -\\ln(0.659) \\approx 0.417$.",
     "If the correct answer had been bird, only the bird term survives: $L = -\\ln(0.099) \\approx 2.313$.",
     "The other terms are all 0, because their $y_i$ values are 0."
    ],
    "answer": "When the model was right about cat, the loss is a small **0.417**. When the true answer was bird, the model had put only 9.9% on it, and the loss jumps to **2.313**. The less probability the model gave to the truth, the faster the loss rises."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/softmax/",
    "https://formulabro.yunusemrevurgun.com/computer-science/shannon-entropy/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/gradient-descent/"
   ],
   "sources": [
    {
     "title": "Cross-entropy, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Cross-entropy"
    },
    {
     "title": "Loss function, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Loss_function"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/gradient-descent",
   "title": "Gradient Descent",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/gradient-descent/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/gradient-descent.md",
   "latex": "\\theta_{\\text{new}} = \\theta_{\\text{old}} - \\eta \\, \\nabla L(\\theta_{\\text{old}})",
   "one_liner": "Gradient descent nudges a model's settings a small step in the direction that lowers the error, then repeats until the error stops falling.",
   "read_aloud": "Theta new equals theta old, minus eta times the gradient of L, evaluated at theta old.",
   "symbols": [
    {
     "latex": "\\theta",
     "meaning": "The settings the model learns, such as its weights and biases. When there are many settings, they are gathered into one list. Training means finding good values for them."
    },
    {
     "latex": "\\theta_{\\text{old}}",
     "meaning": "The current settings, before this update step."
    },
    {
     "latex": "\\theta_{\\text{new}}",
     "meaning": "The settings after one update step."
    },
    {
     "latex": "\\eta",
     "meaning": "The learning rate, the Greek letter eta: a small positive number that sets how big each step is."
    },
    {
     "latex": "L",
     "meaning": "The loss function, which scores how wrong the model is at a given set of settings. Lower is better."
    },
    {
     "latex": "\\nabla L",
     "meaning": "The gradient of the loss: the slope of the loss in each direction. It points the way the loss rises fastest."
    }
   ],
   "worked_example": {
    "title": "Finding the bottom of a simple bowl",
    "setup": "The loss is $L(w) = (w - 3)^2$, a bowl whose lowest point is at $w = 3$. Its gradient is $\\frac{dL}{dw} = 2(w - 3)$. Start at $w = 0$ with learning rate $\\eta = 0.1$. All values are unitless here.",
    "steps": [
     "First step: the gradient at $w = 0$ is $2(0 - 3) = -6$. The update is $w = 0 - 0.1 \\times (-6) = 0.6$.",
     "Second step: the gradient at $w = 0.6$ is $2(0.6 - 3) = -4.8$. The update is $w = 0.6 - 0.1 \\times (-4.8) = 1.08$.",
     "Third step: the gradient at $w = 1.08$ is $2(1.08 - 3) = -3.84$. The update is $w = 1.08 - 0.1 \\times (-3.84) = 1.464$."
    ],
    "answer": "After three steps the setting is $w = 1.464$, closer to the bottom at 3 than the start was. Each step is smaller than the one before, because the slope gets gentler as $w$ nears 3."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/mean-squared-error/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/cross-entropy-loss/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/artificial-neuron/"
   ],
   "sources": [
    {
     "title": "Gradient descent, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Gradient_descent"
    },
    {
     "title": "Backpropagation, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Backpropagation"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/bayes-theorem",
   "title": "Bayes' Theorem",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/bayes-theorem/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/bayes-theorem.md",
   "latex": "P(A \\mid B) = \\frac{P(B \\mid A)\\, P(A)}{P(B)}",
   "one_liner": "Bayes' theorem tells you how much to change your belief in something after you see new evidence.",
   "read_aloud": "The probability of A given B equals the probability of B given A, times the probability of A, divided by the probability of B.",
   "symbols": [
    {
     "latex": "P(A \\mid B)",
     "meaning": "The probability that $A$ is true once you know that $B$ happened. This is the updated belief, the answer you want."
    },
    {
     "latex": "P(B \\mid A)",
     "meaning": "The probability of seeing the evidence $B$ if $A$ is true. It is often the number that is easiest to measure."
    },
    {
     "latex": "P(A)",
     "meaning": "The prior: the probability of $A$ before you see any evidence."
    },
    {
     "latex": "P(B)",
     "meaning": "The overall probability of seeing the evidence $B$, counting every way it can happen."
    },
    {
     "latex": "A",
     "meaning": "The thing you want to know about, such as a person being sick."
    },
    {
     "latex": "B",
     "meaning": "The evidence you have recently observed, such as a positive test result."
    }
   ],
   "worked_example": {
    "title": "A medical test for a rare disease",
    "setup": "Let $A$ be the event that a person is sick and $B$ be the event that the test is positive. Suppose 1% of people are sick, so $P(A) = 0.01$. The test is positive for 90% of sick people, so $P(B \\mid A) = 0.9$. It is also positive for 9% of healthy people, so the false positive rate is $0.09$. A random person tests positive. What is the chance they are sick?",
    "steps": [
     "Find the overall chance of a positive test, $P(B)$. Add the two ways to test positive: being sick and testing positive, and being healthy and testing positive. $P(B) = 0.9 \\times 0.01 + 0.09 \\times 0.99 = 0.009 + 0.0891 = 0.0981$.",
     "Apply Bayes' theorem: $P(A \\mid B) = \\frac{0.9 \\times 0.01}{0.0981} = \\frac{0.009}{0.0981} \\approx 0.092$."
    ],
    "answer": "Even after a positive result, the chance of being sick is only about **9.2%**. The test is good, but the disease is rare, so most positive results come from the much larger group of healthy people."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/cross-entropy-loss/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/softmax/",
    "https://formulabro.yunusemrevurgun.com/computer-science/shannon-entropy/"
   ],
   "sources": [
    {
     "title": "Bayes' theorem, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Bayes%27_theorem"
    },
    {
     "title": "Naive Bayes spam filtering, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Naive_Bayes_spam_filtering"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/scaled-dot-product-attention",
   "title": "Scaled Dot-Product Attention",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/scaled-dot-product-attention/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/scaled-dot-product-attention.md",
   "latex": "\\operatorname{Attention}(Q, K, V) = \\operatorname{softmax}\\left(\\frac{Q K^{\\top}}{\\sqrt{d_k}}\\right) V",
   "one_liner": "Attention lets a model look at every item in a list and decide how much each one matters for the item it is working on.",
   "read_aloud": "Attention of Q, K and V equals softmax of Q times K transposed, divided by the square root of d k, all times V.",
   "symbols": [
    {
     "latex": "\\operatorname{Attention}(Q, K, V)",
     "meaning": "The output: for each query, a blend of the values, weighted by how well that query matches each key."
    },
    {
     "latex": "Q",
     "meaning": "The queries: one row per item, describing what that item is looking for. Each row is a short list of numbers called a vector."
    },
    {
     "latex": "K",
     "meaning": "The keys: one row per item, describing what that item offers. Queries are matched against keys."
    },
    {
     "latex": "V",
     "meaning": "The values: one row per item, holding the content that gets passed along when the item is attended to."
    },
    {
     "latex": "K^{\\top}",
     "meaning": "The keys turned on their side (the transpose), so that every query can be dotted with every key."
    },
    {
     "latex": "d_k",
     "meaning": "The length of each key vector, meaning how many numbers it holds."
    },
    {
     "latex": "\\sqrt{d_k}",
     "meaning": "The square root of $d_k$. Dividing by it keeps the match scores from growing too large as the vectors get longer."
    },
    {
     "latex": "\\operatorname{softmax}",
     "meaning": "The softmax rule: it turns a list of scores into positive weights that add up to 1."
    }
   ],
   "worked_example": {
    "title": "One query and two keys",
    "setup": "One query $q = (1, 0)$, two keys $k_1 = (1, 0)$ and $k_2 = (0, 1)$, and two values $v_1 = (10, 0)$ and $v_2 = (0, 10)$. Each key has length $d_k = 2$. All numbers are unitless here.",
    "steps": [
     "Dot the query with each key: $q \\cdot k_1 = 1 \\times 1 + 0 \\times 0 = 1$ and $q \\cdot k_2 = 1 \\times 0 + 0 \\times 1 = 0$.",
     "Divide by $\\sqrt{d_k} = \\sqrt{2} \\approx 1.414$: $1 / 1.414 \\approx 0.707$ and $0 / 1.414 = 0$.",
     "Apply softmax. Raise $e$ to each scaled score: $e^{0.707} \\approx 2.028$ and $e^{0} = 1$, which add up to $3.028$. The weights are $\\frac{2.028}{3.028} \\approx 0.670$ and $\\frac{1}{3.028} \\approx 0.330$.",
     "Take the weighted sum of the values: $0.670 \\times (10, 0) + 0.330 \\times (0, 10) = (6.70, 3.30)$."
    ],
    "answer": "The output is **(6.70, 3.30)**. It is mostly the first value, because the query matched the first key better. The second key still gets about a third of the weight, so its value is not ignored."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/softmax/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/artificial-neuron/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/cross-entropy-loss/"
   ],
   "sources": [
    {
     "title": "Vaswani et al., Attention Is All You Need (arXiv:1706.03762)",
     "url": "https://arxiv.org/abs/1706.03762"
    },
    {
     "title": "Attention (machine learning), Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Attention_(machine_learning)"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/linear-regression",
   "title": "Linear Regression",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/linear-regression/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/linear-regression.md",
   "latex": "\\hat{y} = w x + b",
   "one_liner": "Linear regression predicts a number by drawing the straight line that sits closest to the data points, so you can read off a guess for any new input.",
   "read_aloud": "y hat equals w times x, plus b. The predicted y is the slope w times the input x, plus the intercept b.",
   "symbols": [
    {
     "latex": "\\hat{y}",
     "meaning": "The **predicted** output, the number the line gives for a chosen input $x$. The hat over the $y$ marks it as a guess, not a measured value."
    },
    {
     "latex": "x",
     "meaning": "The **input**, a number you already know, such as hours of study. It has whatever unit the input is measured in."
    },
    {
     "latex": "w",
     "meaning": "The **slope** (also called the weight): how much the prediction changes when $x$ goes up by one unit. A slope of 0.7 means the prediction rises by 0.7 for each extra unit of $x$."
    },
    {
     "latex": "b",
     "meaning": "The **intercept** (also called the bias): the prediction when $x$ is 0. It sets the height where the line crosses the vertical axis."
    }
   ],
   "worked_example": {
    "title": "Predicting a quiz score from hours of study",
    "setup": "Four students report their study hours $x$ and get a quiz score $y$ out of 10. The data are $x = (1, 2, 3, 4)$ hours and $y = (2, 4, 5, 4)$ points. Find the best line and predict the score for a student who studies 5 hours.",
    "steps": [
     "Find the averages: $\\bar{x} = \\frac{1 + 2 + 3 + 4}{4} = 2.5$ hours and $\\bar{y} = \\frac{2 + 4 + 5 + 4}{4} = 3.75$ points.",
     "Find the top of the slope formula, the sum of $(x_i - \\bar{x})(y_i - \\bar{y})$: $(-1.5)(-1.75) + (-0.5)(0.25) + (0.5)(1.25) + (1.5)(0.25) = 3.5$.",
     "Find the bottom, the sum of $(x_i - \\bar{x})^2$: $2.25 + 0.25 + 0.25 + 2.25 = 5.0$.",
     "Divide for the slope: $w = \\frac{3.5}{5.0} = 0.7$ points per hour.",
     "Find the intercept: $b = \\bar{y} - w \\bar{x} = 3.75 - 0.7 \\times 2.5 = 2.0$ points.",
     "Predict for 5 hours: $\\hat{y} = 0.7 \\times 5 + 2.0 = 5.5$ points."
    ],
    "answer": "The best line is $\\hat{y} = 0.7x + 2.0$. A student who studies 5 hours is predicted to score about **5.5 points** out of 10. Each extra hour adds about 0.7 points to the prediction. Four data points is far too few for a real study, so treat this as a demonstration of the method."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/mean-squared-error/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/gradient-descent/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/logistic-regression/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/l2-regularization/"
   ],
   "sources": [
    {
     "title": "Linear regression, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Linear_regression"
    },
    {
     "title": "Least squares, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Least_squares"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/logistic-regression",
   "title": "Logistic Regression",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/logistic-regression/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/logistic-regression.md",
   "latex": "p = \\sigma(w x + b) = \\frac{1}{1 + e^{-(w x + b)}}",
   "one_liner": "Logistic regression takes the same weighted sum as a straight line, then squeezes it through an S-shaped curve so the result is a probability between 0 and 1.",
   "read_aloud": "p equals sigma of w x plus b, which equals one over one plus e to the power of minus the quantity w x plus b.",
   "symbols": [
    {
     "latex": "p",
     "meaning": "The **probability** that the outcome is class 1, for example that a student passes. It is always between 0 and 1. Multiply by 100 to read it as a percentage."
    },
    {
     "latex": "\\sigma",
     "meaning": "The **sigmoid** (logistic) function. It takes any real number and returns a value between 0 and 1."
    },
    {
     "latex": "w",
     "meaning": "The **weight**, how strongly the input pushes the probability up or down. A positive weight means a larger $x$ gives a higher probability."
    },
    {
     "latex": "x",
     "meaning": "The **input**, such as hours of study. Its unit depends on what you measure."
    },
    {
     "latex": "b",
     "meaning": "The **bias** (intercept): it shifts the whole curve left or right. It sets the input where the probability crosses 0.5."
    },
    {
     "latex": "e",
     "meaning": "Euler's number, about 2.718. It appears because the sigmoid is built from exponentials."
    }
   ],
   "worked_example": {
    "title": "Will a student pass a test after studying?",
    "setup": "A model uses hours studied $x$. It has learned the weight $w = 0.8$ per hour and the bias $b = -3$. Find the probability of passing for a student who studies 5 hours and for one who studies 2 hours. Use a threshold of 0.5.",
    "steps": [
     "Compute the weighted sum for 5 hours: $z = 0.8 \\times 5 - 3 = 1.0$.",
     "Apply the sigmoid: $p = \\frac{1}{1 + e^{-1.0}} = \\frac{1}{1 + 0.3679} \\approx 0.731$.",
     "Compare with the threshold: $0.731 \\ge 0.5$, so the model predicts **pass**.",
     "Repeat for 2 hours: $z = 0.8 \\times 2 - 3 = -1.4$, so $p = \\frac{1}{1 + e^{1.4}} = \\frac{1}{1 + 4.055} \\approx 0.198$. That is below 0.5, so the model predicts **fail**."
    ],
    "answer": "A student who studies 5 hours has about a **73.1%** chance of passing, so the model predicts pass. A student who studies 2 hours has about **19.8%**, so the model predicts fail. The 0.5 boundary falls at 3.75 hours of study, where $z = 0$."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/sigmoid-function/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/cross-entropy-loss/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/linear-regression/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/softmax/"
   ],
   "sources": [
    {
     "title": "Logistic regression, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Logistic_regression"
    },
    {
     "title": "Logistic function, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Logistic_function"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/relu-activation",
   "title": "ReLU Activation",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/relu-activation/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/relu-activation.md",
   "latex": "\\text{ReLU}(z) = \\max(0, z)",
   "one_liner": "ReLU passes positive numbers through unchanged and replaces every negative number with zero, like a switch that is on for positive input and off otherwise.",
   "read_aloud": "ReLU of z equals the larger of zero and z.",
   "symbols": [
    {
     "latex": "\\text{ReLU}(z)",
     "meaning": "The **rectified linear unit** output: the value the neuron passes on to the next layer."
    },
    {
     "latex": "z",
     "meaning": "The **input** to the activation, usually the weighted sum of a neuron's inputs plus its bias. It can be any real number, positive or negative."
    },
    {
     "latex": "\\max(0, z)",
     "meaning": "The larger of the two numbers 0 and $z$. If $z$ is positive, the result is $z$. If $z$ is negative, the result is 0."
    }
   ],
   "worked_example": {
    "title": "One neuron with two inputs",
    "setup": "A neuron has inputs $x_1 = 3$ and $x_2 = 1$, weights $w_1 = 0.5$ and $w_2 = -2$, and bias $b = 0.25$. Find its output with ReLU. Then change the second input to $x_2 = 0.5$ and find the output again.",
    "steps": [
     "Compute the weighted sum: $z = 0.5 \\times 3 + (-2) \\times 1 + 0.25 = 1.5 - 2 + 0.25 = -0.25$.",
     "Apply ReLU: $\\text{ReLU}(-0.25) = \\max(0, -0.25) = 0$.",
     "Change the second input to $x_2 = 0.5$: $z = 0.5 \\times 3 + (-2) \\times 0.5 + 0.25 = 1.5 - 1 + 0.25 = 0.75$.",
     "Apply ReLU again: $\\text{ReLU}(0.75) = \\max(0, 0.75) = 0.75$."
    ],
    "answer": "With $x_2 = 1$ the neuron is switched off and outputs **0**. With $x_2 = 0.5$ the weighted sum is positive, so the neuron passes on **0.75** unchanged."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/tanh-activation/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/sigmoid-function/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/artificial-neuron/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/backpropagation-chain-rule/"
   ],
   "sources": [
    {
     "title": "Rectifier (neural networks), Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Rectifier_%28neural_networks%29"
    },
    {
     "title": "Activation function, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Activation_function"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/tanh-activation",
   "title": "Tanh Activation",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/tanh-activation/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/tanh-activation.md",
   "latex": "\\tanh(z) = \\frac{e^{z} - e^{-z}}{e^{z} + e^{-z}}",
   "one_liner": "Tanh squashes any input into a number between minus 1 and plus 1, with zero at the center, so a negative input gives a negative output.",
   "read_aloud": "tanh of z equals e to the power of z, minus e to the power of minus z, all divided by e to the power of z, plus e to the power of minus z.",
   "symbols": [
    {
     "latex": "\\tanh(z)",
     "meaning": "The **hyperbolic tangent** of $z$. Its value always lies strictly between $-1$ and $1$."
    },
    {
     "latex": "z",
     "meaning": "The **input**, usually a weighted sum inside a neuron. It can be any real number, positive or negative."
    },
    {
     "latex": "e",
     "meaning": "Euler's number, about 2.718. Raising $e$ to the power $z$ gives a positive number for any $z$."
    }
   ],
   "worked_example": {
    "title": "Tanh of a neuron's weighted sum",
    "setup": "A neuron has the weighted sum $z = 0.5$. Find $\\tanh(0.5)$ from the exponential formula, then check the answer with the sigmoid relation $\\tanh(z) = 2\\sigma(2z) - 1$.",
    "steps": [
     "Find the exponentials: $e^{0.5} \\approx 1.6487$ and $e^{-0.5} \\approx 0.6065$.",
     "Numerator: $1.6487 - 0.6065 = 1.0422$. Denominator: $1.6487 + 0.6065 = 2.2552$.",
     "Divide: $\\tanh(0.5) = \\frac{1.0422}{2.2552} \\approx 0.4621$.",
     "Check with the sigmoid: $\\sigma(1) = \\frac{1}{1 + e^{-1}} \\approx 0.7311$, so $2 \\times 0.7311 - 1 = 0.4621$."
    ],
    "answer": "$\\tanh(0.5) \\approx 0.462$. The output is positive because the input is positive, and it sits well inside the range from $-1$ to $1$. The sigmoid check gives the same value, which confirms $\\tanh(z) = 2\\sigma(2z) - 1$."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/sigmoid-function/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/relu-activation/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/artificial-neuron/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/logistic-regression/"
   ],
   "sources": [
    {
     "title": "Hyperbolic functions, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Hyperbolic_functions"
    },
    {
     "title": "Activation function, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Activation_function"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/mean-absolute-error",
   "title": "Mean Absolute Error (MAE)",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/mean-absolute-error/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/mean-absolute-error.md",
   "latex": "\\mathrm{MAE} = \\frac{1}{n}\\sum_{i=1}^{n} |y_i - \\hat{y}_i|",
   "one_liner": "Mean absolute error measures how far off a model's guesses are on average, counting each miss by its size only, so one wild miss does not dominate the score.",
   "read_aloud": "M A E equals one over n, times the sum, for i from 1 to n, of the absolute value of y i minus y hat i.",
   "symbols": [
    {
     "latex": "\\mathrm{MAE}",
     "meaning": "The mean absolute error: one number that sums up how far off the predictions are, on average. It is in the same units as the data."
    },
    {
     "latex": "n",
     "meaning": "How many predictions you are scoring."
    },
    {
     "latex": "i",
     "meaning": "The position of one prediction in the list, counting from 1 up to $n$."
    },
    {
     "latex": "\\sum_{i=1}^{n}",
     "meaning": "\"Add up for every $i$ from 1 to $n$\": go through all the predictions and total the results."
    },
    {
     "latex": "y_i",
     "meaning": "The true value for case $i$, the answer you know is correct."
    },
    {
     "latex": "\\hat{y}_i",
     "meaning": "The predicted value for case $i$, the model's guess. The hat over the $y$ is the usual sign for a prediction."
    },
    {
     "latex": "|y_i - \\hat{y}_i|",
     "meaning": "The **absolute value** of the miss: its size with the sign removed. For example, $|-2| = 2$ and $|2| = 2$."
    }
   ],
   "worked_example": {
    "title": "The same temperatures as the MSE example",
    "setup": "Use the same three predictions as the mean squared error example. The true temperatures are $y = (3, 5, 2)$ and the predictions are $\\hat{y} = (2, 6, 4)$, in degrees Celsius. Find the MAE, then see what a larger miss does to it.",
    "steps": [
     "Find each miss and its absolute value: $|3 - 2| = 1$, $|5 - 6| = 1$ and $|2 - 4| = 2$.",
     "Add them: $1 + 1 + 2 = 4$.",
     "Divide by $n = 3$: $\\mathrm{MAE} = \\frac{4}{3} \\approx 1.33$.",
     "Now suppose the third miss had been 10 degrees instead of 2. The absolute misses are $1$, $1$ and $10$, which total 12, so $\\mathrm{MAE} = \\frac{12}{3} = 4.0$."
    ],
    "answer": "The MAE is about **1.33 degrees Celsius**, so the average prediction is off by about 1.3 degrees. The MSE for the same data was 2.0 square degrees. If the third miss grows to 10 degrees, the MAE rises to 4.0 while the MSE jumps to 34, so the squared score reacts much more strongly to one large error."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/mean-squared-error/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/huber-loss/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/gradient-descent/"
   ],
   "sources": [
    {
     "title": "Mean absolute error, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Mean_absolute_error"
    },
    {
     "title": "Mean squared error, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Mean_squared_error"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/huber-loss",
   "title": "Huber Loss",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/huber-loss/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/huber-loss.md",
   "latex": "L_{\\delta}(a) = \\begin{cases} \\frac{1}{2} a^{2} & \\text{if } |a| \\le \\delta \\\\ \\delta \\left(|a| - \\frac{1}{2}\\delta\\right) & \\text{otherwise} \\end{cases}",
   "one_liner": "Huber loss scores small misses by squaring them, as mean squared error does, and large misses with a straight-line penalty, so outliers cannot take over the score.",
   "read_aloud": "L sub delta of a equals one half a squared if the size of a is at most delta. Otherwise it equals delta times the size of a, minus one half of delta.",
   "symbols": [
    {
     "latex": "L_{\\delta}(a)",
     "meaning": "The **Huber loss** for one miss $a$: the penalty the model pays. It is in squared units of the data, the same kind of unit as mean squared error."
    },
    {
     "latex": "a",
     "meaning": "The **residual** (miss): the true value minus the prediction, $a = y - \\hat{y}$. It is in the units of the data."
    },
    {
     "latex": "\\delta",
     "meaning": "The **threshold** (the Greek letter delta), a positive number you choose. Misses no bigger than $\\delta$ get the squared treatment, and bigger misses get the linear one. It is in the same units as $a$."
    },
    {
     "latex": "|a|",
     "meaning": "The **absolute value** of the miss: its size with the sign removed."
    }
   ],
   "worked_example": {
    "title": "Two misses with a threshold of 1",
    "setup": "A model's misses are $a = 0.5$ for one case and $a = 4$ for another, in the units of the data. Use $\\delta = 1$ in the same units. Find the Huber loss for each miss and then the average.",
    "steps": [
     "Small miss: $|0.5| = 0.5 \\le 1$, so use the squared piece. $\\frac{1}{2}(0.5)^{2} = 0.125$.",
     "Large miss: $|4| = 4 > 1$, so use the linear piece. $1 \\times \\left(4 - \\frac{1}{2} \\times 1\\right) = 3.5$.",
     "Average the two losses: $\\frac{0.125 + 3.5}{2} = 1.8125$.",
     "For comparison, pure squared error with the same $\\frac{1}{2}$ factor would charge $\\frac{1}{2}(4)^{2} = 8$ for the large miss."
    ],
    "answer": "The average Huber loss is **1.8125**. The large miss costs 3.5 here instead of 8, so one outlier does not take over the score. The small miss is still scored smoothly as a squared error."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/mean-absolute-error/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/mean-squared-error/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/gradient-descent/"
   ],
   "sources": [
    {
     "title": "Huber loss, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Huber_loss"
    },
    {
     "title": "Loss function, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Loss_function"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/hinge-loss",
   "title": "Hinge Loss",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/hinge-loss/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/hinge-loss.md",
   "latex": "L = \\max(0,\\ 1 - y\\, f(x))",
   "one_liner": "Hinge loss gives no penalty to an answer that is correct with room to spare, and a growing penalty as an answer gets wrong or too close to the boundary.",
   "read_aloud": "L equals the larger of zero and one minus y times f of x.",
   "symbols": [
    {
     "latex": "L",
     "meaning": "The **hinge loss** for one example: the penalty, which is never below zero. It is zero when the example is correct and far enough from the boundary."
    },
    {
     "latex": "y",
     "meaning": "The **true label**, either $+1$ or $-1$. Those two values name the two classes."
    },
    {
     "latex": "f(x)",
     "meaning": "The model's **raw score** for the input $x$. Its sign gives the predicted class: positive means $+1$, negative means $-1$. Its size shows how confident the model is."
    },
    {
     "latex": "1",
     "meaning": "The **margin**: a correct point should have a score of at least 1 in the right direction, not merely a positive one."
    },
    {
     "latex": "\\max",
     "meaning": "Takes the larger of the numbers inside the brackets, so any negative result is cut off to 0."
    }
   ],
   "worked_example": {
    "title": "Three points near an SVM boundary",
    "setup": "An SVM gives raw scores to three points. Their true labels are $y = +1$, $y = +1$ and $y = -1$, and their scores are $f(x) = 2.0$, $f(x) = 0.3$ and $f(x) = 0.5$. Find the hinge loss of each point and then the average.",
    "steps": [
     "Point 1: $y f(x) = (+1)(2.0) = 2.0$, so $1 - 2.0 = -1.0$ and $\\max(0, -1.0) = 0$. It is correct and beyond the margin, so there is no penalty.",
     "Point 2: $y f(x) = (+1)(0.3) = 0.3$, so $1 - 0.3 = 0.7$ and $\\max(0, 0.7) = 0.7$. It is on the correct side but inside the margin.",
     "Point 3: $y f(x) = (-1)(0.5) = -0.5$, so $1 - (-0.5) = 1.5$ and $\\max(0, 1.5) = 1.5$. It is on the wrong side of the boundary.",
     "Average the three losses: $\\frac{0 + 0.7 + 1.5}{3} \\approx 0.733$."
    ],
    "answer": "The average hinge loss is about **0.733**. The first point costs nothing. The second is on the correct side but too close, so it costs 0.7. The third is on the wrong side and costs 1.5, the largest penalty of the three."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/cross-entropy-loss/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/logistic-regression/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/gradient-descent/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/l2-regularization/"
   ],
   "sources": [
    {
     "title": "Hinge loss, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Hinge_loss"
    },
    {
     "title": "Support vector machine, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Support_vector_machine"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/l2-regularization",
   "title": "L2 Regularization",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/l2-regularization/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/l2-regularization.md",
   "latex": "J(w) = L(w) + \\lambda \\sum_{j} w_j^{2}",
   "one_liner": "L2 regularization adds a penalty for large weights, so the model prefers small, gentle weights that tend to generalize better to new data.",
   "read_aloud": "J of w equals L of w, plus lambda times the sum, over j, of w j squared.",
   "symbols": [
    {
     "latex": "J(w)",
     "meaning": "The **total cost** that training tries to make small: the data loss plus the penalty."
    },
    {
     "latex": "L(w)",
     "meaning": "The **data loss**: how wrong the model is on the training examples. It can be any loss, such as squared error or cross-entropy."
    },
    {
     "latex": "\\lambda",
     "meaning": "The **regularization strength** (the Greek letter lambda), a number you choose that is zero or more. Zero means no penalty, and a bigger value pulls the weights harder toward zero."
    },
    {
     "latex": "\\sum_{j}",
     "meaning": "\"Add up for every weight $j$\": the sum runs over all the weights in the model."
    },
    {
     "latex": "w_j",
     "meaning": "One weight in the model, the number that scales input number $j$."
    },
    {
     "latex": "w",
     "meaning": "The whole list of weights, $w = (w_1, w_2, \\ldots)$."
    }
   ],
   "worked_example": {
    "title": "Comparing two models with an L2 penalty",
    "setup": "Model A has weights $w = (2, -0.5)$ and data loss $L = 0.30$. Model B has weights $w = (1, -0.5)$ and data loss $L = 0.35$. Use $\\lambda = 0.1$. Which model has the lower total cost $J(w)$?",
    "steps": [
     "Model A: the sum of squared weights is $2^{2} + (-0.5)^{2} = 4.25$.",
     "Model A penalty: $0.1 \\times 4.25 = 0.425$, so $J = 0.30 + 0.425 = 0.725$.",
     "Model B: the sum of squared weights is $1^{2} + (-0.5)^{2} = 1.25$.",
     "Model B penalty: $0.1 \\times 1.25 = 0.125$, so $J = 0.35 + 0.125 = 0.475$."
    ],
    "answer": "Model B has the lower total cost, **0.475** against **0.725**. Model A fits the training data slightly better, but its large weight costs more than the extra fit is worth, so the penalty prefers the smaller weights of Model B."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/l1-regularization/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/linear-regression/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/gradient-descent/"
   ],
   "sources": [
    {
     "title": "Tikhonov regularization, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Tikhonov_regularization"
    },
    {
     "title": "Ridge regression, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Ridge_regression"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/l1-regularization",
   "title": "L1 Regularization",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/l1-regularization/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/l1-regularization.md",
   "latex": "J(w) = L(w) + \\lambda \\sum_{j} |w_j|",
   "one_liner": "L1 regularization adds a penalty proportional to each weight's size, which encourages the model to drop unneeded inputs by setting their weights to exactly zero.",
   "read_aloud": "J of w equals L of w, plus lambda times the sum, over j, of the absolute value of w j.",
   "symbols": [
    {
     "latex": "J(w)",
     "meaning": "The **total cost** that training tries to make small: the data loss plus the penalty."
    },
    {
     "latex": "L(w)",
     "meaning": "The **data loss**: how wrong the model is on the training examples. It can be any loss, such as squared error or cross-entropy."
    },
    {
     "latex": "\\lambda",
     "meaning": "The **regularization strength** (the Greek letter lambda), a number you choose that is zero or more. Zero means no penalty, and a bigger value pulls the weights harder toward zero."
    },
    {
     "latex": "\\sum_{j}",
     "meaning": "\"Add up for every weight $j$\": the sum runs over all the weights in the model."
    },
    {
     "latex": "|w_j|",
     "meaning": "The **absolute value** of weight number $j$: its size with the sign removed. For example, $|-0.5| = 0.5$ and $|2| = 2$."
    },
    {
     "latex": "w",
     "meaning": "The whole list of weights, $w = (w_1, w_2, \\ldots)$."
    }
   ],
   "worked_example": {
    "title": "The same two models with an L1 penalty",
    "setup": "Use the same two models as the L2 example. Model A has $w = (2, -0.5)$ and data loss $L = 0.30$. Model B has $w = (1, -0.5)$ and data loss $L = 0.35$. Use $\\lambda = 0.1$ and compare the total cost with the L1 penalty.",
    "steps": [
     "Model A: the sum of absolute weights is $|2| + |-0.5| = 2.5$.",
     "Model A penalty: $0.1 \\times 2.5 = 0.25$, so $J = 0.30 + 0.25 = 0.55$.",
     "Model B: the sum of absolute weights is $|1| + |-0.5| = 1.5$.",
     "Model B penalty: $0.1 \\times 1.5 = 0.15$, so $J = 0.35 + 0.15 = 0.50$."
    ],
    "answer": "Model B has the lower total cost, **0.50** against **0.55**. The L1 penalty charges a flat rate per unit of weight, so the gap between the two models is smaller than it was with the squared penalty of L2."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/l2-regularization/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/linear-regression/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/gradient-descent/"
   ],
   "sources": [
    {
     "title": "Lasso (statistics), Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Lasso_%28statistics%29"
    },
    {
     "title": "Regularization (mathematics), Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Regularization_%28mathematics%29"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/momentum-optimizer",
   "title": "Momentum Optimizer",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/momentum-optimizer/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/momentum-optimizer.md",
   "latex": "v_t = \\beta \\, v_{t-1} + \\nabla L(\\theta_{t-1}) \\qquad \\theta_t = \\theta_{t-1} - \\eta \\, v_t",
   "one_liner": "Momentum lets gradient descent remember its recent steps, so it speeds up where the slope keeps pointing the same way and wobbles less where it flips.",
   "read_aloud": "v sub t equals beta times v sub t minus 1, plus the gradient of L at theta sub t minus 1. Then theta sub t equals theta sub t minus 1, minus eta times v sub t.",
   "symbols": [
    {
     "latex": "\\theta",
     "meaning": "The settings the model learns, such as its weights and biases. Training adjusts them."
    },
    {
     "latex": "\\theta_{t-1}",
     "meaning": "The settings before step $t$. The slope is measured here."
    },
    {
     "latex": "\\theta_t",
     "meaning": "The settings after step $t$."
    },
    {
     "latex": "L",
     "meaning": "The loss function, which scores how wrong the model is at a given set of settings. Lower is better."
    },
    {
     "latex": "\\nabla L(\\theta_{t-1})",
     "meaning": "The gradient of the loss at the settings before step $t$: the slope, which points the way the loss rises fastest."
    },
    {
     "latex": "\\eta",
     "meaning": "The learning rate, a small positive number that sets how far the settings move for each unit of velocity."
    },
    {
     "latex": "\\beta",
     "meaning": "The momentum coefficient, a number from 0 to 1 that sets how much of the old velocity is kept. A common starting value is 0.9."
    },
    {
     "latex": "v_t",
     "meaning": "The velocity after step $t$: a running total of recent gradients, with newer gradients counting most. It has the same units as the gradient."
    },
    {
     "latex": "v_{t-1}",
     "meaning": "The velocity before step $t$. It starts at zero."
    }
   ],
   "worked_example": {
    "title": "Two steps on a bowl with momentum",
    "setup": "Use the loss $L(\\theta) = (\\theta - 3)^2$ from the gradient descent page, so the gradient is $\\nabla L(\\theta) = 2(\\theta - 3)$. Start at $\\theta_0 = 0$ with velocity $v_0 = 0$, momentum $\\beta = 0.9$ and learning rate $\\eta = 0.1$. All values are unitless.",
    "steps": [
     "Step 1: the gradient at $\\theta_0 = 0$ is $2(0 - 3) = -6$. The velocity is $v_1 = 0.9 \\times 0 + (-6) = -6$. The settings move to $\\theta_1 = 0 - 0.1 \\times (-6) = 0.6$.",
     "Step 2: the gradient at $\\theta_1 = 0.6$ is $2(0.6 - 3) = -4.8$. The velocity is $v_2 = 0.9 \\times (-6) + (-4.8) = -10.2$. The settings move to $\\theta_2 = 0.6 - 0.1 \\times (-10.2) = 1.62$.",
     "Step 3: the gradient at $\\theta_2 = 1.62$ is $2(1.62 - 3) = -2.76$. The velocity is $v_3 = 0.9 \\times (-10.2) + (-2.76) = -11.94$. The settings move to $\\theta_3 = 1.62 - 0.1 \\times (-11.94) = 2.814$."
    ],
    "answer": "After two steps the settings are at $\\theta_2 = 1.62$. Plain gradient descent with the same learning rate reached $1.08$ in two steps, so momentum is ahead. After three steps the settings are at $2.814$, close to the lowest point at 3. The velocity grows because each gradient points the same way."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/gradient-descent/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/adam-optimizer/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/backpropagation-chain-rule/"
   ],
   "sources": [
    {
     "title": "Why Momentum Really Works, Distill (2017)",
     "url": "https://distill.pub/2017/momentum/"
    },
    {
     "title": "Stochastic gradient descent, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Stochastic_gradient_descent"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/adam-optimizer",
   "title": "Adam Optimizer",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/adam-optimizer/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/adam-optimizer.md",
   "latex": "\\theta_t = \\theta_{t-1} - \\eta \\, \\frac{\\hat m_t}{\\sqrt{\\hat v_t} + \\epsilon}",
   "one_liner": "Adam keeps a running average of each setting's slope and of how big those slopes have been, then uses both to choose a step size for every setting.",
   "read_aloud": "Theta sub t equals theta sub t minus 1, minus eta times m-hat sub t, divided by the square root of v-hat sub t, plus epsilon.",
   "symbols": [
    {
     "latex": "\\theta_t",
     "meaning": "The settings of the model after step $t$. The step counter $t$ starts at 1."
    },
    {
     "latex": "\\theta_{t-1}",
     "meaning": "The settings before step $t$."
    },
    {
     "latex": "\\eta",
     "meaning": "The learning rate, the base size of each step. The Adam paper suggests 0.001 as a starting value."
    },
    {
     "latex": "\\hat m_t",
     "meaning": "The bias-corrected average of the gradient, a running average that shows the direction the slope has been pointing."
    },
    {
     "latex": "\\hat v_t",
     "meaning": "The bias-corrected average of the squared gradient, a running average that shows how large the slopes have been."
    },
    {
     "latex": "\\epsilon",
     "meaning": "A tiny positive number, about $10^{-8}$, added to the denominator so the step never divides by zero."
    },
    {
     "latex": "m_t",
     "meaning": "The running average of the gradient, before bias correction. It is also written with $\\beta_1$ and $g_t$ in the explanation below."
    },
    {
     "latex": "v_t",
     "meaning": "The running average of the squared gradient, before bias correction."
    },
    {
     "latex": "g_t",
     "meaning": "The gradient at step $t$, the slope of the loss at the settings $\\theta_{t-1}$."
    },
    {
     "latex": "\\beta_1",
     "meaning": "The decay rate for the gradient average, usually 0.9."
    },
    {
     "latex": "\\beta_2",
     "meaning": "The decay rate for the squared-gradient average, usually 0.999."
    }
   ],
   "worked_example": {
    "title": "Two steps on one setting",
    "setup": "Use the loss $L(\\theta) = (\\theta - 3)^2$ again, so $g = 2(\\theta - 3)$. Start at $\\theta_0 = 0$ with $m_0 = 0$ and $v_0 = 0$. Use the defaults $\\beta_1 = 0.9$, $\\beta_2 = 0.999$ and $\\epsilon = 10^{-8}$, and a learning rate $\\eta = 0.1$ so the numbers stay easy to follow. All values are unitless.",
    "steps": [
     "Step 1: the gradient at $\\theta_0 = 0$ is $g_1 = 2(0 - 3) = -6$. The averages are $m_1 = 0.9 \\times 0 + 0.1 \\times (-6) = -0.6$ and $v_1 = 0.999 \\times 0 + 0.001 \\times 36 = 0.036$.",
     "Bias correction for step 1: $\\hat m_1 = -0.6 / (1 - 0.9) = -6$ and $\\hat v_1 = 0.036 / (1 - 0.999) = 36$.",
     "Update for step 1: $\\theta_1 = 0 - 0.1 \\times (-6) / (\\sqrt{36} + 10^{-8}) \\approx 0.1$. The first step moves by almost exactly the learning rate, because $\\hat m_1 / \\sqrt{\\hat v_1} = -1$.",
     "Step 2: the gradient at $\\theta_1 = 0.1$ is $g_2 = 2(0.1 - 3) = -5.8$. The averages are $m_2 = 0.9 \\times (-0.6) + 0.1 \\times (-5.8) = -1.12$ and $v_2 = 0.999 \\times 0.036 + 0.001 \\times 33.64 = 0.069604$.",
     "Bias correction for step 2: $\\hat m_2 = -1.12 / (1 - 0.81) \\approx -5.8947$ and $\\hat v_2 = 0.069604 / (1 - 0.998001) \\approx 34.8194$.",
     "Update for step 2: $\\theta_2 = 0.1 - 0.1 \\times (-5.8947) / (\\sqrt{34.8194} + 10^{-8}) \\approx 0.1 + 0.0999 = 0.1999$."
    ],
    "answer": "After two steps the setting is $\\theta_2 \\approx 0.1999$. Both steps are about the size of $\\eta = 0.1$, even though the raw gradient was 6 at step 1 and 5.8 at step 2. Adam sets the size from the ratio of the averaged gradient to its typical size, not from the raw gradient alone."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/momentum-optimizer/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/gradient-descent/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/backpropagation-chain-rule/"
   ],
   "sources": [
    {
     "title": "Adam: A Method for Stochastic Optimization, Kingma and Ba (arXiv:1412.6980)",
     "url": "https://arxiv.org/abs/1412.6980"
    },
    {
     "title": "Stochastic gradient descent, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Stochastic_gradient_descent"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/backpropagation-chain-rule",
   "title": "Backpropagation and the Chain Rule",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/backpropagation-chain-rule/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/backpropagation-chain-rule.md",
   "latex": "\\frac{\\partial L}{\\partial w} = \\frac{\\partial L}{\\partial \\hat y} \\, \\frac{\\partial \\hat y}{\\partial z} \\, \\frac{\\partial z}{\\partial w}",
   "one_liner": "Backpropagation finds how much each weight affects the error by multiplying the small slopes along the chain from the weight to the loss.",
   "read_aloud": "The partial derivative of L with respect to w equals the partial derivative of L with respect to y-hat, times the partial derivative of y-hat with respect to z, times the partial derivative of z with respect to w.",
   "symbols": [
    {
     "latex": "L",
     "meaning": "The loss, a single number that scores how wrong the prediction is. Lower is better."
    },
    {
     "latex": "\\frac{\\partial L}{\\partial w}",
     "meaning": "How much the loss changes when $w$ changes a little, with every other setting held fixed. Gradient descent uses this slope to update $w$."
    },
    {
     "latex": "x",
     "meaning": "The input to the neuron, a number that is given to it."
    },
    {
     "latex": "w",
     "meaning": "The weight, a setting of the neuron that training adjusts."
    },
    {
     "latex": "b",
     "meaning": "The bias, a second setting that is added to the weighted input."
    },
    {
     "latex": "z",
     "meaning": "The weighted sum before the activation, $z = wx + b$. It is also called the pre-activation."
    },
    {
     "latex": "\\hat y",
     "meaning": "The prediction, the neuron's output after the sigmoid: $\\hat y = \\sigma(z)$. It is a number between 0 and 1."
    },
    {
     "latex": "y",
     "meaning": "The target, the correct answer the neuron should output. The example uses $y = 1$."
    },
    {
     "latex": "\\sigma",
     "meaning": "The sigmoid function, $\\sigma(z) = 1 / (1 + e^{-z})$. Its slope is $\\sigma(z)(1 - \\sigma(z))$."
    },
    {
     "latex": "\\frac{\\partial \\hat y}{\\partial z}",
     "meaning": "How much the prediction changes when the weighted sum changes a little."
    },
    {
     "latex": "\\frac{\\partial z}{\\partial w}",
     "meaning": "How much the weighted sum changes when the weight changes a little. For $z = wx + b$ it equals the input $x$."
    }
   ],
   "worked_example": {
    "title": "One sigmoid neuron with squared error",
    "setup": "Input $x = 2$, weight $w = 0.5$, bias $b = -0.5$, target $y = 1$. The neuron computes $z = wx + b$ and $\\hat y = \\sigma(z)$, and the loss is $L = (\\hat y - y)^2$. Use a learning rate of $0.1$. Everything is unitless.",
    "steps": [
     "Forward pass: $z = 0.5 \\times 2 + (-0.5) = 0.5$. Then $\\hat y = \\sigma(0.5) = 1 / (1 + e^{-0.5}) \\approx 0.6225$. The loss is $L = (0.6225 - 1)^2 \\approx 0.1425$.",
     "First factor: $\\frac{\\partial L}{\\partial \\hat y} = 2(\\hat y - y) = 2(0.6225 - 1) \\approx -0.7551$.",
     "Second factor: $\\frac{\\partial \\hat y}{\\partial z} = \\hat y (1 - \\hat y) = 0.6225 \\times 0.3775 \\approx 0.2350$.",
     "Third factor: $\\frac{\\partial z}{\\partial w} = x = 2$.",
     "Multiply the three: $\\frac{\\partial L}{\\partial w} = (-0.7551) \\times 0.2350 \\times 2 \\approx -0.3549$.",
     "One gradient descent update: $w_{\\text{new}} = 0.5 - 0.1 \\times (-0.3549) \\approx 0.5355$. With the new weight the loss is about $0.1303$, lower than $0.1425$."
    ],
    "answer": "The gradient is negative, so increasing $w$ lowers the loss. The update raises the weight from 0.5 to about 0.5355 and the loss falls from about 0.1425 to 0.1303. Raising $w$ raises $z$, which moves $\\hat y$ closer to the target 1."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/gradient-descent/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/sigmoid-function/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/artificial-neuron/"
   ],
   "sources": [
    {
     "title": "Backpropagation, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Backpropagation"
    },
    {
     "title": "Chain rule, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Chain_rule"
    },
    {
     "title": "Sigmoid function, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Sigmoid_function"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/batch-normalization",
   "title": "Batch Normalization",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/batch-normalization/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/batch-normalization.md",
   "latex": "\\hat x_i = \\frac{x_i - \\mu_B}{\\sqrt{\\sigma_B^2 + \\epsilon}} \\qquad y_i = \\gamma \\, \\hat x_i + \\beta",
   "one_liner": "Batch normalization rescales the values in a group of examples so they are centered near zero with a steady spread, then lets the network choose its own scale and offset.",
   "read_aloud": "x-hat sub i equals x sub i minus mu sub B, divided by the square root of sigma sub B squared plus epsilon. Then y sub i equals gamma times x-hat sub i, plus beta.",
   "symbols": [
    {
     "latex": "x_i",
     "meaning": "One input value from the mini-batch, for example one neuron's value for one example in the batch."
    },
    {
     "latex": "\\mu_B",
     "meaning": "The mean of the values in the mini-batch $B$: their average, in the same units as $x_i$."
    },
    {
     "latex": "\\sigma_B^2",
     "meaning": "The variance of the values in the mini-batch: the average of the squared distances from the mean. It measures spread, in squared units."
    },
    {
     "latex": "\\epsilon",
     "meaning": "A tiny positive constant, often about $10^{-5}$, that keeps the division safe when the variance is very small."
    },
    {
     "latex": "\\hat x_i",
     "meaning": "The normalized value, which has mean 0 and variance close to 1 across the batch."
    },
    {
     "latex": "\\gamma",
     "meaning": "A learned scale factor. Training sets it, and it lets the layer choose its own spread."
    },
    {
     "latex": "\\beta",
     "meaning": "A learned shift. Training sets it, and it lets the layer choose its own center."
    },
    {
     "latex": "y_i",
     "meaning": "The output after the scale and shift. It is passed on to the next layer."
    }
   ],
   "worked_example": {
    "title": "Four values in one mini-batch",
    "setup": "A mini-batch of four values for one feature: $x = (2, 4, 6, 8)$. Use $\\epsilon = 0.001$ and the learned values $\\gamma = 2$ and $\\beta = 1$. The values are unitless.",
    "steps": [
     "Mean: $\\mu_B = (2 + 4 + 6 + 8) / 4 = 5$.",
     "Variance: the squared distances from the mean are $(-3)^2, (-1)^2, 1^2, 3^2 = 9, 1, 1, 9$, so $\\sigma_B^2 = (9 + 1 + 1 + 9) / 4 = 5$.",
     "Denominator: $\\sqrt{5 + 0.001} \\approx 2.2363$.",
     "Normalized values: $\\hat x = (-3, -1, 1, 3) / 2.2363 \\approx (-1.3415,\\ -0.4472,\\ 0.4472,\\ 1.3415)$.",
     "Scale and shift: $y_i = 2 \\hat x_i + 1$, which gives $y \\approx (-1.6833,\\ 0.1056,\\ 1.8944,\\ 3.6833)$.",
     "Mean of the outputs: $(-1.6833 + 0.1056 + 1.8944 + 3.6833) / 4 = 1.0$, which equals $\\beta$."
    ],
    "answer": "The four outputs have mean $\\beta = 1$ and a spread set by $\\gamma = 2$. The batch supplied the mean and variance, and the learned $\\gamma$ and $\\beta$ set the final scale and center."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/layer-normalization/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/dropout/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/artificial-neuron/"
   ],
   "sources": [
    {
     "title": "Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift, Ioffe and Szegedy (arXiv:1502.03167)",
     "url": "https://arxiv.org/abs/1502.03167"
    },
    {
     "title": "Batch normalization, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Batch_normalization"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/layer-normalization",
   "title": "Layer Normalization",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/layer-normalization/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/layer-normalization.md",
   "latex": "\\hat x_i = \\frac{x_i - \\mu}{\\sqrt{\\sigma^2 + \\epsilon}} \\qquad y_i = \\gamma_i \\, \\hat x_i + \\beta_i",
   "one_liner": "Layer normalization centers and scales the numbers that describe one example, so its values stay in a steady range no matter what other examples are in the batch.",
   "read_aloud": "x-hat sub i equals x sub i minus mu, divided by the square root of sigma squared plus epsilon. Then y sub i equals gamma sub i times x-hat sub i, plus beta sub i.",
   "symbols": [
    {
     "latex": "x_i",
     "meaning": "One feature of the example: one number in its vector of features, for example one entry of a word's vector."
    },
    {
     "latex": "\\mu",
     "meaning": "The mean of the features of this one example: their average, in the same units as $x_i$."
    },
    {
     "latex": "\\sigma^2",
     "meaning": "The variance of the features of this one example: the average of the squared distances from $\\mu$. It measures spread, in squared units."
    },
    {
     "latex": "\\epsilon",
     "meaning": "A tiny positive constant that keeps the division safe when the spread is very small."
    },
    {
     "latex": "\\hat x_i",
     "meaning": "The normalized feature, which has mean 0 and variance close to 1 across the features of the example."
    },
    {
     "latex": "\\gamma_i",
     "meaning": "A learned scale for feature $i$. Each feature has its own."
    },
    {
     "latex": "\\beta_i",
     "meaning": "A learned shift for feature $i$. Each feature has its own."
    },
    {
     "latex": "y_i",
     "meaning": "The output for feature $i$ after the scale and shift."
    }
   ],
   "worked_example": {
    "title": "One word vector with four features",
    "setup": "One example, a vector of four features $x = (2, 4, 6, 8)$, for example one word in a sentence. Use $\\epsilon = 0.001$, and the starting values $\\gamma_i = 1$ and $\\beta_i = 0$ for every feature. The values are unitless.",
    "steps": [
     "Mean over the features: $\\mu = (2 + 4 + 6 + 8) / 4 = 5$.",
     "Variance over the features: $\\sigma^2 = ((-3)^2 + (-1)^2 + 1^2 + 3^2) / 4 = 5$.",
     "Denominator: $\\sqrt{5 + 0.001} \\approx 2.2363$.",
     "Normalized vector: $\\hat x \\approx (-1.3415,\\ -0.4472,\\ 0.4472,\\ 1.3415)$. With $\\gamma_i = 1$ and $\\beta_i = 0$, the output equals these values."
    ],
    "answer": "The normalized vector has mean 0 and a variance of about 1. These are the same numbers as in the batch normalization example, but here they are four features of one example, so the statistics come from this vector alone. Adding other examples to a batch would not change the answer."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/batch-normalization/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/scaled-dot-product-attention/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/softmax/"
   ],
   "sources": [
    {
     "title": "Layer Normalization, Ba, Kiros and Hinton (arXiv:1607.06450)",
     "url": "https://arxiv.org/abs/1607.06450"
    },
    {
     "title": "Layer normalization, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Layer_normalization"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/dropout",
   "title": "Dropout",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/dropout/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/dropout.md",
   "latex": "\\tilde h_i = \\frac{m_i \\, h_i}{1 - p} \\qquad m_i \\sim \\text{Bernoulli}(1 - p)",
   "one_liner": "Dropout randomly switches off some neurons on each training pass, and scales up the ones that stay on, so the network learns patterns that do not rely on any single neuron.",
   "read_aloud": "h-tilde sub i equals m sub i times h sub i, divided by one minus p. Here m sub i is a random value that is 1 with probability one minus p, and 0 otherwise.",
   "symbols": [
    {
     "latex": "h_i",
     "meaning": "The activation of neuron $i$ before dropout: the number that neuron produces for the current input."
    },
    {
     "latex": "\\tilde h_i",
     "meaning": "The activation after dropout during training. It is either 0, or the original value scaled up."
    },
    {
     "latex": "m_i",
     "meaning": "A random mask for neuron $i$: 1 means keep it, 0 means drop it. Each neuron gets a fresh draw on every training pass."
    },
    {
     "latex": "p",
     "meaning": "The drop probability, a number from 0 to 1. For example, $p = 0.5$ drops about half the neurons. It has no unit."
    },
    {
     "latex": "1 - p",
     "meaning": "The keep probability: the chance that a neuron is kept on a given pass."
    },
    {
     "latex": "\\text{Bernoulli}(1 - p)",
     "meaning": "A random draw that gives 1 with probability $1 - p$ and 0 with probability $p$."
    }
   ],
   "worked_example": {
    "title": "Four activations with half of them dropped",
    "setup": "A layer outputs $h = (0.5,\\ 2.0,\\ 1.0,\\ 4.0)$. The drop probability is $p = 0.5$, so each neuron is kept with probability $0.5$. The random draw gives the mask $m = (1, 0, 1, 0)$, which keeps neurons 1 and 3 and drops neurons 2 and 4. The values are unitless.",
    "steps": [
     "Scale factor for kept neurons: $\\frac{1}{1 - p} = \\frac{1}{0.5} = 2$.",
     "Neuron 1 is kept: $\\tilde h_1 = 1 \\times 0.5 \\times 2 = 1.0$.",
     "Neuron 2 is dropped: $\\tilde h_2 = 0 \\times 2.0 \\times 2 = 0$.",
     "Neuron 3 is kept: $\\tilde h_3 = 1 \\times 1.0 \\times 2 = 2.0$.",
     "Neuron 4 is dropped: $\\tilde h_4 = 0 \\times 4.0 \\times 2 = 0$."
    ],
    "answer": "During this training pass the output is $(1.0,\\ 0,\\ 2.0,\\ 0)$. Two neurons were switched off and the kept ones were doubled. Over many random masks, each neuron's average output equals its original value, because it is kept half the time and doubled when kept. At prediction time the layer outputs $(0.5,\\ 2.0,\\ 1.0,\\ 4.0)$ unchanged."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/batch-normalization/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/artificial-neuron/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/cross-entropy-loss/"
   ],
   "sources": [
    {
     "title": "Dropout: A Simple Way to Prevent Neural Networks from Overfitting, Srivastava et al., JMLR 15 (2014)",
     "url": "https://jmlr.org/papers/v15/srivastava14a.html"
    },
    {
     "title": "Dilution (neural networks), Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Dilution_(neural_networks)"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/precision-and-recall",
   "title": "Precision and Recall",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/precision-and-recall/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/precision-and-recall.md",
   "latex": "\\text{Precision} = \\frac{TP}{TP + FP} \\qquad \\text{Recall} = \\frac{TP}{TP + FN}",
   "one_liner": "Precision asks how many of the items a model flagged were right, and recall asks how many of the real cases it managed to find.",
   "read_aloud": "Precision equals true positives divided by the sum of true positives and false positives. Recall equals true positives divided by the sum of true positives and false negatives.",
   "symbols": [
    {
     "latex": "\\text{Precision}",
     "meaning": "Of the items the model flagged as positive, the share that really are positive. It answers: when the model says yes, how often is it right?"
    },
    {
     "latex": "\\text{Recall}",
     "meaning": "Of all the real positive items, the share the model found. It answers: how many of the real cases did it catch?"
    },
    {
     "latex": "TP",
     "meaning": "True positives: items flagged as positive that really are positive. This is a count."
    },
    {
     "latex": "FP",
     "meaning": "False positives: items flagged as positive that are really negative. This is a count."
    },
    {
     "latex": "FN",
     "meaning": "False negatives: real positive items the model missed. This is a count."
    }
   ],
   "worked_example": {
    "title": "A spam filter on one day of email",
    "setup": "A spam filter flags 50 emails as spam. Of those, 40 really are spam, so $TP = 40$, and 10 are real emails, so $FP = 10$. It misses 20 spam emails that reached the inbox, so $FN = 20$. The counts are unitless.",
    "steps": [
     "Precision: $\\frac{40}{40 + 10} = \\frac{40}{50} = 0.80$. So 80% of the flagged emails were spam.",
     "Recall: $\\frac{40}{40 + 20} = \\frac{40}{60} \\approx 0.667$. So the filter found about 66.7% of all the spam.",
     "Both numbers use the same 40 correct catches. The difference is the denominator: flagged emails for precision, and all real spam for recall."
    ],
    "answer": "Precision is 80% and recall is about 66.7%. When the filter says spam, it is usually right, but about one spam email in three still reaches the inbox."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/f1-score/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/bayes-theorem/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/sigmoid-function/"
   ],
   "sources": [
    {
     "title": "Precision and recall, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Precision_and_recall"
    },
    {
     "title": "Confusion matrix, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Confusion_matrix"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/f1-score",
   "title": "F1 Score",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/f1-score/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/f1-score.md",
   "latex": "F_1 = \\frac{2 \\cdot P \\cdot R}{P + R}",
   "one_liner": "The F1 score is one number from 0 to 1 that stays low unless both precision and recall are reasonably high.",
   "read_aloud": "F sub 1 equals 2 times P times R, divided by P plus R. Here P is precision and R is recall.",
   "symbols": [
    {
     "latex": "F_1",
     "meaning": "The F1 score: one number from 0 to 1 that combines precision and recall. Higher is better, and 1 is perfect."
    },
    {
     "latex": "P",
     "meaning": "Precision: the share of flagged items that are correct, from 0 to 1."
    },
    {
     "latex": "R",
     "meaning": "Recall: the share of real positive items that were found, from 0 to 1."
    }
   ],
   "worked_example": {
    "title": "Combining the spam filter's precision and recall",
    "setup": "From the precision and recall example, the filter has $P = 0.80$ and $R = 40 / 60 \\approx 0.6667$. The counts are $TP = 40$, $FP = 10$ and $FN = 20$. The values are unitless.",
    "steps": [
     "Precision and recall form: $F_1 = \\frac{2 \\times 0.80 \\times 0.6667}{0.80 + 0.6667} = \\frac{1.0667}{1.4667} \\approx 0.7273$.",
     "Count form: $F_1 = \\frac{2 \\times 40}{2 \\times 40 + 10 + 20} = \\frac{80}{110} \\approx 0.7273$, the same answer.",
     "For comparison, the plain average is $(0.80 + 0.6667) / 2 \\approx 0.7333$. The F1 score is a little lower, because it is pulled toward the smaller value, recall."
    ],
    "answer": "The F1 score is about 0.727. It sits between the precision of 0.80 and the recall of 0.667, and it leans toward the lower of the two."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/precision-and-recall/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/cross-entropy-loss/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/bayes-theorem/"
   ],
   "sources": [
    {
     "title": "F-score, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/F-score"
    },
    {
     "title": "Precision and recall, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Precision_and_recall"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/classification-accuracy",
   "title": "Classification Accuracy",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/classification-accuracy/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/classification-accuracy.md",
   "latex": "\\text{Accuracy} = \\frac{TP + TN}{TP + TN + FP + FN}",
   "one_liner": "Accuracy is the share of a model's guesses that were right, out of all the guesses it made.",
   "read_aloud": "Accuracy equals true positives plus true negatives, divided by true positives plus true negatives plus false positives plus false negatives.",
   "symbols": [
    {
     "latex": "\\text{Accuracy}",
     "meaning": "The share of predictions that were correct. It is a number from 0 to 1, often written as a percentage. It has no unit."
    },
    {
     "latex": "TP",
     "meaning": "True positives: the model said positive and the answer really was positive, such as a spam email correctly flagged as spam. It is a count of examples."
    },
    {
     "latex": "TN",
     "meaning": "True negatives: the model said negative and the answer really was negative, such as a normal email correctly left in the inbox. It is a count of examples."
    },
    {
     "latex": "FP",
     "meaning": "False positives: the model said positive but the answer was negative, such as a normal email wrongly flagged as spam. Also called a false alarm. It is a count of examples."
    },
    {
     "latex": "FN",
     "meaning": "False negatives: the model said negative but the answer was positive, such as a spam email that got through. Also called a miss. It is a count of examples."
    }
   ],
   "worked_example": {
    "title": "A spam filter that checks 100 emails",
    "setup": "A made-up test set of 100 emails: 20 are spam and 80 are not spam. The filter catches $TP = 15$ spam emails, misses $FN = 5$ spam emails, keeps $TN = 75$ normal emails in the inbox and wrongly flags $FP = 5$ normal emails. All these numbers are invented for the example.",
    "steps": [
     "Count the correct predictions: $TP + TN = 15 + 75 = 90$.",
     "Count all the predictions: $TP + TN + FP + FN = 15 + 75 + 5 + 5 = 100$.",
     "Divide: $\\text{Accuracy} = \\frac{90}{100} = 0.90$, which is 90%.",
     "Compare with a model that always answers not spam. It gets all 80 normal emails right and all 20 spam emails wrong, so its accuracy is $\\frac{80}{100} = 0.80$. It catches zero spam."
    ],
    "answer": "The filter's accuracy is **90%**. That sounds strong, but a model that always answers not spam reaches 80% and catches no spam at all. When one class is much more common, accuracy alone can hide the errors that matter."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/precision-and-recall/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/f1-score/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/softmax/"
   ],
   "sources": [
    {
     "title": "Confusion matrix, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Confusion_matrix"
    },
    {
     "title": "Accuracy and precision, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Accuracy_and_precision"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/cosine-similarity",
   "title": "Cosine Similarity",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/cosine-similarity/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/cosine-similarity.md",
   "latex": "\\cos\\theta = \\frac{\\mathbf{A}\\cdot\\mathbf{B}}{\\|\\mathbf{A}\\|\\,\\|\\mathbf{B}\\|}",
   "one_liner": "Cosine similarity scores how closely two lists of numbers point the same way, from -1 for opposite directions to 1 for the same direction.",
   "read_aloud": "Cosine of theta equals the dot product of vector A and vector B, divided by the length of vector A times the length of vector B.",
   "symbols": [
    {
     "latex": "\\cos\\theta",
     "meaning": "The cosine similarity: a number from -1 to 1. It has no unit."
    },
    {
     "latex": "\\theta",
     "meaning": "The angle between the two vectors. $0^\\circ$ means they point the same way, $90^\\circ$ means they are unrelated, and $180^\\circ$ means they point opposite ways."
    },
    {
     "latex": "\\mathbf{A}",
     "meaning": "The first vector: a list of numbers, such as the embedding of one sentence. Each number is one component."
    },
    {
     "latex": "\\mathbf{B}",
     "meaning": "The second vector. It must have the same number of components as $\\mathbf{A}$."
    },
    {
     "latex": "\\mathbf{A}\\cdot\\mathbf{B}",
     "meaning": "The dot product: multiply the components in each position and add the results, $\\sum_i A_i B_i$. It is large when both vectors are long and point the same way."
    },
    {
     "latex": "\\|\\mathbf{A}\\|",
     "meaning": "The length (also called the norm or magnitude) of $\\mathbf{A}$: the square root of the sum of its squared components."
    },
    {
     "latex": "\\|\\mathbf{B}\\|",
     "meaning": "The length of $\\mathbf{B}$, found the same way."
    }
   ],
   "worked_example": {
    "title": "Two made-up 2-D vectors",
    "setup": "Two vectors $\\mathbf{A} = (3, 4)$ and $\\mathbf{B} = (4, 3)$. Each is a made-up two-number embedding for this example.",
    "steps": [
     "Dot product: $\\mathbf{A}\\cdot\\mathbf{B} = 3 \\times 4 + 4 \\times 3 = 12 + 12 = 24$.",
     "Lengths: $\\|\\mathbf{A}\\| = \\sqrt{3^2 + 4^2} = \\sqrt{25} = 5$ and $\\|\\mathbf{B}\\| = \\sqrt{4^2 + 3^2} = \\sqrt{25} = 5$.",
     "Divide: $\\cos\\theta = \\frac{24}{5 \\times 5} = \\frac{24}{25} = 0.96$.",
     "Length check: double every component of $\\mathbf{B}$ to get $(8, 6)$. The dot product becomes $3 \\times 8 + 4 \\times 6 = 48$ and the length becomes $\\sqrt{8^2 + 6^2} = 10$. The score is $\\frac{48}{5 \\times 10} = 0.96$ again, so making a vector longer without changing its direction does not change the score."
    ],
    "answer": "The cosine similarity is **0.96**, close to 1, so the two vectors point almost the same way. The angle between them is about 16.3 degrees. Doubling $\\mathbf{B}$ did not change the score."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/euclidean-distance/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/scaled-dot-product-attention/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/artificial-neuron/"
   ],
   "sources": [
    {
     "title": "Cosine similarity, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Cosine_similarity"
    },
    {
     "title": "Dot product, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Dot_product"
    },
    {
     "title": "Word embedding, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Word_embedding"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/euclidean-distance",
   "title": "Euclidean Distance",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/euclidean-distance/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/euclidean-distance.md",
   "latex": "d(\\mathbf{p}, \\mathbf{q}) = \\sqrt{\\sum_{i=1}^{n} (p_i - q_i)^2}",
   "one_liner": "Euclidean distance is the straight-line distance between two points, found by squaring the gaps, adding them up and taking the square root.",
   "read_aloud": "d of p and q equals the square root of the sum, for i from 1 to n, of p sub i minus q sub i, all squared.",
   "symbols": [
    {
     "latex": "d(\\mathbf{p}, \\mathbf{q})",
     "meaning": "The distance between points $\\mathbf{p}$ and $\\mathbf{q}$. It has the same unit as the features, such as metres for positions measured in metres."
    },
    {
     "latex": "\\mathbf{p}",
     "meaning": "The first point, written as a list of $n$ numbers, one for each feature."
    },
    {
     "latex": "\\mathbf{q}",
     "meaning": "The second point, with the same $n$ features."
    },
    {
     "latex": "n",
     "meaning": "The number of features, which is also the number of dimensions. Two features give a flat plane; three give ordinary 3-D space. It has no unit."
    },
    {
     "latex": "i",
     "meaning": "The position of one feature in the list, counting from 1 to $n$."
    },
    {
     "latex": "p_i",
     "meaning": "The value of point $\\mathbf{p}$ for feature number $i$."
    },
    {
     "latex": "q_i",
     "meaning": "The value of point $\\mathbf{q}$ for feature number $i$."
    },
    {
     "latex": "\\sum_{i=1}^{n}",
     "meaning": "Add up for every $i$ from 1 to $n$: total the squared gaps over all the features."
    }
   ],
   "worked_example": {
    "title": "Finding the nearest neighbor",
    "setup": "Three known points, each with a label: $\\mathbf{P}_1 = (4, 6)$ labeled *red*, $\\mathbf{P}_2 = (2, 3)$ labeled *blue* and $\\mathbf{P}_3 = (0, 0)$ labeled *red*. A new point $\\mathbf{q} = (1, 2)$ needs a label. Use the nearest neighbor rule: copy the label of the closest known point. All the numbers are invented for this example.",
    "steps": [
     "Distance to $\\mathbf{P}_1$: $\\sqrt{(1 - 4)^2 + (2 - 6)^2} = \\sqrt{9 + 16} = \\sqrt{25} = 5$.",
     "Distance to $\\mathbf{P}_2$: $\\sqrt{(1 - 2)^2 + (2 - 3)^2} = \\sqrt{1 + 1} = \\sqrt{2} \\approx 1.414$.",
     "Distance to $\\mathbf{P}_3$: $\\sqrt{(1 - 0)^2 + (2 - 0)^2} = \\sqrt{1 + 4} = \\sqrt{5} \\approx 2.236$.",
     "The smallest distance is about 1.414, to $\\mathbf{P}_2$, so $\\mathbf{q}$ takes the label *blue*."
    ],
    "answer": "The new point is labeled **blue**, because its nearest known point is $\\mathbf{P}_2$, at a distance of about 1.41. The two red points are farther away, at about 5 and 2.24."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/cosine-similarity/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/k-means-clustering/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/mean-squared-error/"
   ],
   "sources": [
    {
     "title": "Euclidean distance, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Euclidean_distance"
    },
    {
     "title": "K-nearest neighbors algorithm, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm"
    },
    {
     "title": "Pythagorean theorem, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Pythagorean_theorem"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/k-means-clustering",
   "title": "k-Means Clustering",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/k-means-clustering/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/k-means-clustering.md",
   "latex": "J = \\sum_{k=1}^{K} \\sum_{\\mathbf{x} \\in C_k} \\|\\mathbf{x} - \\boldsymbol{\\mu}_k\\|^2",
   "one_liner": "k-means clustering sorts points into K groups by moving each group's center to its middle and reassigning every point to its nearest center.",
   "read_aloud": "J equals the sum, for k from 1 to K, of the sum over every point x in cluster k of the squared distance from x to the center mu sub k.",
   "symbols": [
    {
     "latex": "J",
     "meaning": "The objective: the total of all squared distances from each point to its cluster center. Smaller means tighter clusters. Its unit is the square of the unit of the data."
    },
    {
     "latex": "K",
     "meaning": "The number of clusters. You choose it before the algorithm starts. It has no unit."
    },
    {
     "latex": "k",
     "meaning": "The number of one cluster, counting from 1 to $K$."
    },
    {
     "latex": "C_k",
     "meaning": "The set of points assigned to cluster $k$."
    },
    {
     "latex": "\\mathbf{x}",
     "meaning": "One data point, written as a list of numbers, such as a customer's total spending and number of visits."
    },
    {
     "latex": "\\boldsymbol{\\mu}_k",
     "meaning": "The center (centroid) of cluster $k$: the average of all the points in $C_k$, computed one feature at a time."
    },
    {
     "latex": "\\|\\mathbf{x} - \\boldsymbol{\\mu}_k\\|^2",
     "meaning": "The squared distance from point $\\mathbf{x}$ to the center of its own cluster."
    },
    {
     "latex": "\\sum_{\\mathbf{x} \\in C_k}",
     "meaning": "Add up over every point $\\mathbf{x}$ that belongs to cluster $k$."
    }
   ],
   "worked_example": {
    "title": "One iteration on four points on a line",
    "setup": "Four points on a line: $1, 2, 6, 8$. Use $K = 2$ and start with centers at $\\mu_1 = 0$ and $\\mu_2 = 5$, chosen by hand. The points are one-dimensional, so the squared distance is $(x - \\mu)^2$.",
    "steps": [
     "Assign each point to the nearest center. The point 1 is distance 1 from 0 and 4 from 5, so it joins cluster 1. The point 2 is distance 2 from 0 and 3 from 5, so it joins cluster 1. The point 6 is distance 6 from 0 and 1 from 5, so it joins cluster 2. The point 8 is distance 8 from 0 and 3 from 5, so it joins cluster 2.",
     "Compute $J$ with the starting centers: $J = (1-0)^2 + (2-0)^2 + (6-5)^2 + (8-5)^2 = 1 + 4 + 1 + 9 = 15$.",
     "Move each center to the mean of its cluster: $\\mu_1 = \\frac{1 + 2}{2} = 1.5$ and $\\mu_2 = \\frac{6 + 8}{2} = 7$.",
     "Compute $J$ with the new centers: $J = (1-1.5)^2 + (2-1.5)^2 + (6-7)^2 + (8-7)^2 = 0.25 + 0.25 + 1 + 1 = 2.5$.",
     "Assign again. Each point is still closest to the same center, so the clusters do not change and the algorithm stops."
    ],
    "answer": "One iteration cut $J$ from **15** to **2.5**. The clusters are $\\{1, 2\\}$ and $\\{6, 8\\}$, with centers at 1.5 and 7. Because the assignments no longer change, the algorithm has reached a local minimum."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/euclidean-distance/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/cosine-similarity/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/gradient-descent/"
   ],
   "sources": [
    {
     "title": "K-means clustering, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/K-means_clustering"
    },
    {
     "title": "Lloyd's algorithm, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Lloyd%27s_algorithm"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/kl-divergence",
   "title": "Kullback-Leibler Divergence",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/kl-divergence/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/kl-divergence.md",
   "latex": "D_{\\mathrm{KL}}(P \\,\\|\\, Q) = \\sum_x P(x) \\log \\frac{P(x)}{Q(x)}",
   "one_liner": "KL divergence measures how badly a set of guessed probabilities fits the real probabilities.",
   "read_aloud": "D K L of P and Q equals the sum, over every outcome x, of P of x times the log of P of x divided by Q of x.",
   "symbols": [
    {
     "latex": "D_{\\mathrm{KL}}(P \\,\\|\\, Q)",
     "meaning": "The Kullback-Leibler divergence of $Q$ from $P$. It is zero only when the two distributions are identical. Its unit is the nat when the natural log is used, and the bit when log base 2 is used."
    },
    {
     "latex": "P",
     "meaning": "The true or reference distribution: the probability of each outcome as it really happens."
    },
    {
     "latex": "Q",
     "meaning": "The approximating distribution: the probabilities a model or a guess assigns to the same outcomes."
    },
    {
     "latex": "x",
     "meaning": "One possible outcome, such as heads or tails."
    },
    {
     "latex": "P(x)",
     "meaning": "The probability of outcome $x$ under $P$: a number from 0 to 1."
    },
    {
     "latex": "Q(x)",
     "meaning": "The probability of outcome $x$ under $Q$. It must be greater than 0 wherever $P(x)$ is greater than 0."
    },
    {
     "latex": "\\log",
     "meaning": "The logarithm. This page uses the natural log, $\\ln$, which gives nats. A log base 2 gives bits instead."
    },
    {
     "latex": "\\sum_x",
     "meaning": "Add up over every possible outcome $x$."
    }
   ],
   "worked_example": {
    "title": "A fair coin and a biased guess",
    "setup": "The real coin is fair: $P(\\text{heads}) = 0.5$ and $P(\\text{tails}) = 0.5$. A model guesses $Q(\\text{heads}) = 0.9$ and $Q(\\text{tails}) = 0.1$. Use the natural log, so the answer is in nats.",
    "steps": [
     "Heads term: $P(\\text{heads}) \\ln \\frac{P(\\text{heads})}{Q(\\text{heads})} = 0.5 \\ln \\frac{0.5}{0.9} = 0.5 \\times (-0.5878) = -0.2939$.",
     "Tails term: $P(\\text{tails}) \\ln \\frac{P(\\text{tails})}{Q(\\text{tails})} = 0.5 \\ln \\frac{0.5}{0.1} = 0.5 \\times 1.6094 = 0.8047$.",
     "Add the terms: $D_{KL}(P \\| Q) = -0.2939 + 0.8047 = 0.5108$ nats, which is about $0.737$ bits.",
     "Swap the roles to check the asymmetry: $D_{KL}(Q \\| P) = 0.9 \\ln \\frac{0.9}{0.5} + 0.1 \\ln \\frac{0.1}{0.5} = 0.5290 - 0.1609 = 0.3681$ nats."
    ],
    "answer": "The divergence of the guess $Q$ from the truth $P$ is about **0.511 nats**. The reverse direction gives about **0.368 nats**. The two numbers differ, which is why KL divergence is not symmetric and not a distance."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/cross-entropy-loss/",
    "https://formulabro.yunusemrevurgun.com/computer-science/shannon-entropy/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/softmax/"
   ],
   "sources": [
    {
     "title": "Kullback-Leibler divergence, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence"
    },
    {
     "title": "Entropy (information theory), Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Entropy_(information_theory)"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/naive-bayes-classifier",
   "title": "Naive Bayes Classifier",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/naive-bayes-classifier/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/naive-bayes-classifier.md",
   "latex": "P(y \\mid x_1, \\dots, x_n) \\propto P(y) \\prod_{i=1}^{n} P(x_i \\mid y)",
   "one_liner": "Naive Bayes guesses the most likely class by multiplying how common the class is by how well each clue fits it.",
   "read_aloud": "The probability of class y, given features x 1 through x n, is proportional to the probability of y, times the product, for i from 1 to n, of the probability of x sub i given y.",
   "symbols": [
    {
     "latex": "P(y \\mid x_1, \\dots, x_n)",
     "meaning": "The probability of class $y$ after you see all the features. This is the score you care about. The features are the clues, such as the words in an email."
    },
    {
     "latex": "\\propto",
     "meaning": "Is proportional to. The two sides differ only by a constant factor that is the same for every class. Divide all the scores by their total to get real probabilities."
    },
    {
     "latex": "y",
     "meaning": "One class label, such as spam or not spam."
    },
    {
     "latex": "x_1, \\dots, x_n",
     "meaning": "The features: the $n$ clues observed for one example, such as whether the word *free* appears in an email."
    },
    {
     "latex": "n",
     "meaning": "The number of features. It has no unit."
    },
    {
     "latex": "P(y)",
     "meaning": "The prior: the share of training examples that belong to class $y$, before looking at the features."
    },
    {
     "latex": "\\prod_{i=1}^{n}",
     "meaning": "Multiply together, for every $i$ from 1 to $n$."
    },
    {
     "latex": "P(x_i \\mid y)",
     "meaning": "The likelihood: how often feature $x_i$ shows up among the examples of class $y$."
    }
   ],
   "worked_example": {
    "title": "Spam or not spam, with made-up word statistics",
    "setup": "All numbers here are made up for this example and are not measured from real email. Assume the training data is 40% spam and 60% not spam. Assume the email contains two words, *free* and *prize*, with these invented probabilities: $P(\\text{free} \\mid \\text{spam}) = 0.30$, $P(\\text{free} \\mid \\text{not spam}) = 0.02$, $P(\\text{prize} \\mid \\text{spam}) = 0.10$ and $P(\\text{prize} \\mid \\text{not spam}) = 0.01$.",
    "steps": [
     "Spam score: $P(\\text{spam}) \\times P(\\text{free} \\mid \\text{spam}) \\times P(\\text{prize} \\mid \\text{spam}) = 0.4 \\times 0.30 \\times 0.10 = 0.012$.",
     "Not spam score: $P(\\text{not spam}) \\times P(\\text{free} \\mid \\text{not spam}) \\times P(\\text{prize} \\mid \\text{not spam}) = 0.6 \\times 0.02 \\times 0.01 = 0.00012$.",
     "Add the scores: $0.012 + 0.00012 = 0.01212$.",
     "Divide each score by the total: $P(\\text{spam} \\mid \\text{words}) = \\frac{0.012}{0.01212} \\approx 0.990$, and $P(\\text{not spam} \\mid \\text{words}) \\approx 0.010$."
    ],
    "answer": "Under these invented numbers, the filter gives the email about a **99% chance** of being spam. Both words are far more common in the made-up spam examples, so the spam score wins easily, even though spam is the smaller class in the training data."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/bayes-theorem/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/cross-entropy-loss/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/softmax/"
   ],
   "sources": [
    {
     "title": "Naive Bayes classifier, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Naive_Bayes_classifier"
    },
    {
     "title": "Naive Bayes spam filtering, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Naive_Bayes_spam_filtering"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/gini-impurity",
   "title": "Gini Impurity",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/gini-impurity/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/gini-impurity.md",
   "latex": "G = 1 - \\sum_{k=1}^{K} p_k^2",
   "one_liner": "Gini impurity is a score for how mixed the classes are in a group: 0 means every item in the group belongs to the same class.",
   "read_aloud": "G equals 1 minus the sum, for k from 1 to K, of p sub k squared.",
   "symbols": [
    {
     "latex": "G",
     "meaning": "The Gini impurity of one node. It is 0 for a pure node and largest when all classes are equally common. It has no unit."
    },
    {
     "latex": "K",
     "meaning": "The number of classes, such as red and blue, or cat, dog and bird."
    },
    {
     "latex": "k",
     "meaning": "The number of one class, counting from 1 to $K$."
    },
    {
     "latex": "p_k",
     "meaning": "The share of examples in the node that belong to class $k$. It is a number from 0 to 1, and all the shares add up to 1."
    },
    {
     "latex": "\\sum_{k=1}^{K}",
     "meaning": "Add up for every class $k$ from 1 to $K$."
    }
   ],
   "worked_example": {
    "title": "A split that separates the colors",
    "setup": "A node holds 10 examples: 6 red and 4 blue. A question splits them into a left child with 5 red and 0 blue, and a right child with 1 red and 4 blue.",
    "steps": [
     "Parent node: $p_{\\text{red}} = 0.6$ and $p_{\\text{blue}} = 0.4$, so $G = 1 - (0.6^2 + 0.4^2) = 1 - (0.36 + 0.16) = 0.48$.",
     "Left child: 5 red and 0 blue, so $p_{\\text{red}} = 1$ and $G = 1 - 1^2 = 0$. It is pure.",
     "Right child: 1 red and 4 blue out of 5, so $p_{\\text{red}} = 0.2$ and $p_{\\text{blue}} = 0.8$. Then $G = 1 - (0.2^2 + 0.8^2) = 1 - (0.04 + 0.64) = 0.32$.",
     "Weighted average of the children: each child holds 5 of the 10 examples, so the average is $\\frac{5}{10} \\times 0 + \\frac{5}{10} \\times 0.32 = 0.16$.",
     "Impurity drop: $0.48 - 0.16 = 0.32$."
    ],
    "answer": "The split lowers the Gini impurity from **0.48** to **0.16**, a drop of **0.32**. The left child is pure and the right child is mostly blue. Among candidate splits, a tree would prefer the one with the lowest weighted Gini."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/information-gain/",
    "https://formulabro.yunusemrevurgun.com/computer-science/shannon-entropy/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/classification-accuracy/"
   ],
   "sources": [
    {
     "title": "Decision tree learning, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Decision_tree_learning"
    },
    {
     "title": "Decision Trees, scikit-learn user guide",
     "url": "https://scikit-learn.org/stable/modules/tree.html"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/information-gain",
   "title": "Information Gain",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/information-gain/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/information-gain.md",
   "latex": "\\mathrm{IG} = H(\\text{parent}) - \\sum_{k} \\frac{n_k}{n}\\, H(\\text{child}_k)",
   "one_liner": "Information gain tells you how many bits of guessing a split removes, so a tree can ask the question that sorts the examples best.",
   "read_aloud": "Information gain equals the entropy of the parent node, minus the sum over every child k of n sub k over n, times the entropy of child k.",
   "symbols": [
    {
     "latex": "\\mathrm{IG}",
     "meaning": "Information gain: the drop in entropy caused by the split, measured in bits because entropy uses log base 2. For a split of this kind it is never negative."
    },
    {
     "latex": "H(\\text{parent})",
     "meaning": "The entropy of the node before the split, in bits."
    },
    {
     "latex": "H(\\text{child}_k)",
     "meaning": "The entropy of child node $k$ after the split, in bits."
    },
    {
     "latex": "H",
     "meaning": "Entropy in bits: $H = -\\sum_j p_j \\log_2 p_j$, where $p_j$ is the share of class $j$ in the node. A pure node has $H = 0$. An even split between two classes has $H = 1$ bit."
    },
    {
     "latex": "n",
     "meaning": "The number of examples in the parent node, before the split. It has no unit."
    },
    {
     "latex": "n_k",
     "meaning": "The number of examples the split sends to child $k$."
    },
    {
     "latex": "k",
     "meaning": "The index of a child node, counting from 1 to the number of children."
    },
    {
     "latex": "\\sum_{k}",
     "meaning": "Add up over every child $k$."
    }
   ],
   "worked_example": {
    "title": "One split of ten examples",
    "setup": "A node holds 10 examples: 6 red and 4 blue. A question sends 5 examples to the left child, all red, and the other 5 to the right child, which has 1 red and 4 blue.",
    "steps": [
     "Parent entropy: $H(\\text{parent}) = -(0.6 \\log_2 0.6 + 0.4 \\log_2 0.4) \\approx 0.971$ bits.",
     "Left child, 5 red and 0 blue: it is pure, so $H = 0$. Its weight is $\\frac{5}{10} = 0.5$.",
     "Right child, 1 red and 4 blue: $H = -(0.2 \\log_2 0.2 + 0.8 \\log_2 0.8) \\approx 0.722$ bits. Its weight is $\\frac{5}{10} = 0.5$.",
     "Weighted average of the children: $0.5 \\times 0 + 0.5 \\times 0.722 \\approx 0.361$ bits.",
     "Information gain: $\\mathrm{IG} = 0.971 - 0.361 \\approx 0.610$ bits."
    ],
    "answer": "The split removes about **0.61 bits** of uncertainty about the color. The left branch is pure, and the right branch still has some mixing. A decision tree would compare this gain with the gain of every other candidate question and keep the largest."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/gini-impurity/",
    "https://formulabro.yunusemrevurgun.com/computer-science/shannon-entropy/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/kl-divergence/"
   ],
   "sources": [
    {
     "title": "Decision tree learning, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Decision_tree_learning"
    },
    {
     "title": "Entropy (information theory), Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Entropy_(information_theory)"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/softmax-temperature",
   "title": "Softmax Temperature",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/softmax-temperature/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/softmax-temperature.md",
   "latex": "p_i = \\frac{e^{z_i / T}}{\\sum_{j=1}^{K} e^{z_j / T}}",
   "one_liner": "Temperature is a dial that makes a model's choices more focused when it is low and more varied when it is high.",
   "read_aloud": "The probability p sub i equals e to the power of z sub i divided by T, all divided by the sum, over every score j, of e to the power of z sub j divided by T.",
   "symbols": [
    {
     "latex": "p_i",
     "meaning": "The probability of answer number $i$ after the temperature is applied. It is a number between 0 and 1, and all the probabilities add up to 1."
    },
    {
     "latex": "z_i",
     "meaning": "The raw score (logit) for answer number $i$. It can be any real number, even a negative one."
    },
    {
     "latex": "T",
     "meaning": "The **temperature**, a positive number with no unit. $T = 1$ gives the ordinary softmax. A smaller $T$ sharpens the output, and a larger $T$ flattens it."
    },
    {
     "latex": "K",
     "meaning": "How many answers there are, so how many scores are in the list."
    },
    {
     "latex": "\\sum_{j=1}^{K}",
     "meaning": "\"Add up for every $j$ from 1 to $K$\": the total over all the scaled scores, used as the bottom of the fraction."
    },
    {
     "latex": "e",
     "meaning": "Euler's number, about 2.718. Raising it to a power keeps every result positive."
    }
   ],
   "worked_example": {
    "title": "Choosing the next word at two temperatures",
    "setup": "A language model scores three possible next words, *cat*, *dog* and *bird*, with raw scores $z = (2.0,\\ 1.0,\\ 0.1)$. At the usual $T = 1$, the probability of *cat* is 65.9%. Now try $T = 0.5$ and $T = 2$.",
    "steps": [
     "For $T = 0.5$, divide each score by $0.5$: $z / T = (4.0,\\ 2.0,\\ 0.2)$.",
     "Raise $e$ to each new score: $e^{4.0} \\approx 54.598$, $e^{2.0} \\approx 7.389$ and $e^{0.2} \\approx 1.221$. Their total is $63.209$.",
     "Divide each one by the total: $\\frac{54.598}{63.209} \\approx 0.864$ for *cat*, $\\frac{7.389}{63.209} \\approx 0.117$ for *dog* and $\\frac{1.221}{63.209} \\approx 0.019$ for *bird*. Check: $0.864 + 0.117 + 0.019 = 1.000$.",
     "For $T = 2$, divide by $2$ instead: $z / T = (1.0,\\ 0.5,\\ 0.05)$. Raising $e$ to these gives about $2.718$, $1.649$ and $1.051$, with a total of $5.418$. Dividing gives *cat* $\\approx 0.502$, *dog* $\\approx 0.304$ and *bird* $\\approx 0.194$."
    ],
    "answer": "At $T = 0.5$, *cat* rises to about **86.4%** and *bird* falls to 1.9%. At $T = 2$, *cat* drops to about **50.2%** and *bird* rises to 19.4%. *Cat* is the top answer at both temperatures; only the spread changes."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/softmax/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/cross-entropy-loss/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/perplexity/"
   ],
   "sources": [
    {
     "title": "Softmax function, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Softmax_function"
    },
    {
     "title": "Knowledge distillation, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Knowledge_distillation"
    },
    {
     "title": "Hinton, Vinyals and Dean, Distilling the Knowledge in a Neural Network (arXiv:1503.02531)",
     "url": "https://arxiv.org/abs/1503.02531"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/perplexity",
   "title": "Perplexity",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/perplexity/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/perplexity.md",
   "latex": "\\text{PPL} = \\exp\\left(-\\frac{1}{N}\\sum_{i=1}^{N} \\ln p(w_i \\mid w_{<i})\\right)",
   "one_liner": "Perplexity counts how many words a language model is, on average, torn between each time it guesses the next word. Lower is better.",
   "read_aloud": "PPL equals e to the power of the negative average, over the N tokens, of the natural log of the probability the model gives to each token, given the tokens before it.",
   "symbols": [
    {
     "latex": "\\text{PPL}",
     "meaning": "**Perplexity**, a plain number with no unit. Lower values mean the model predicted the text better. A perplexity of $k$ means the model was, on average, as unsure as if it had chosen evenly among $k$ words."
    },
    {
     "latex": "N",
     "meaning": "The number of tokens (words or word pieces) in the test text. Counted in tokens, with no unit."
    },
    {
     "latex": "i",
     "meaning": "The position of one token in the text, running from 1 to $N$."
    },
    {
     "latex": "w_i",
     "meaning": "The token at position $i$, the word the model should have predicted."
    },
    {
     "latex": "w_{<i}",
     "meaning": "All the tokens that come before position $i$."
    },
    {
     "latex": "p(w_i \\mid w_{<i})",
     "meaning": "The probability the model gives to the actual token $w_i$, given the tokens before it. A number between 0 and 1."
    },
    {
     "latex": "\\ln",
     "meaning": "The natural logarithm, base $e$. A probability below 1 has a negative log."
    },
    {
     "latex": "\\exp",
     "meaning": "The exponential function, $\\exp(x) = e^{x}$. It turns the average back into a count-like number."
    }
   ],
   "worked_example": {
    "title": "A four-token test text with mixed confidence",
    "setup": "A model reads a four-token test text. It gives the actual next token these probabilities: $0.2$, $0.5$, $0.25$ and $0.1$.",
    "steps": [
     "Take the natural log of each probability: $\\ln 0.2 \\approx -1.6094$, $\\ln 0.5 \\approx -0.6931$, $\\ln 0.25 \\approx -1.3863$ and $\\ln 0.1 \\approx -2.3026$. Their sum is about $-5.9915$.",
     "Average over $N = 4$ and flip the sign to get the cross-entropy: $-\\frac{-5.9915}{4} \\approx 1.4979$ nats.",
     "Exponentiate the cross-entropy: $\\text{PPL} = e^{1.4979} \\approx 4.472$.",
     "Check with the product of the probabilities: $0.2 \\times 0.5 \\times 0.25 \\times 0.1 = 0.0025$, and $0.0025^{-1/4} = 400^{1/4} \\approx 4.472$."
    ],
    "answer": "The perplexity is about **4.47**. On average, the model was as unsure as if it had to choose among roughly four and a half equally likely words at each step. The product check gives the same number, which shows what the average means."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/cross-entropy-loss/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/softmax/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/softmax-temperature/"
   ],
   "sources": [
    {
     "title": "Perplexity, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Perplexity"
    },
    {
     "title": "Cross-entropy, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Cross-entropy"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/positional-encoding",
   "title": "Positional Encoding",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/positional-encoding/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/positional-encoding.md",
   "latex": "\\text{PE}_{(pos,\\,2i)} = \\sin\\left(\\frac{pos}{10000^{2i/d}}\\right) \\qquad \\text{PE}_{(pos,\\,2i+1)} = \\cos\\left(\\frac{pos}{10000^{2i/d}}\\right)",
   "one_liner": "Positional encoding stamps each word with a pattern of waves that says where it sits in the sentence.",
   "read_aloud": "PE at position pos, index 2i, equals the sine of pos divided by 10000 to the power 2i over d. PE at index 2i plus 1 equals the cosine of the same angle.",
   "symbols": [
    {
     "latex": "\\text{PE}_{(pos,\\,2i)}",
     "meaning": "The encoding value at position $pos$ in an even dimension, $2i$. It is a plain number with no unit, and it is added to the word embedding."
    },
    {
     "latex": "\\text{PE}_{(pos,\\,2i+1)}",
     "meaning": "The encoding value at the same position in the next, odd dimension. Each even and odd pair shares the same frequency."
    },
    {
     "latex": "pos",
     "meaning": "The position of the word in the sequence, starting from 0 for the first word."
    },
    {
     "latex": "i",
     "meaning": "The index of a pair of dimensions, running from 0 up to $d/2 - 1$. A small $i$ gives a fast wave, and a large $i$ gives a slow wave."
    },
    {
     "latex": "d",
     "meaning": "The size of the encoding, the same number of dimensions as the word embedding. It is an even number, such as 512 in the base model of the original paper."
    },
    {
     "latex": "10000",
     "meaning": "A fixed constant from the original paper. It sets how long the slowest wave is. It has no unit."
    }
   ],
   "worked_example": {
    "title": "Encoding position 2 in a four-number vector",
    "setup": "Use $d = 4$, so each position gets four numbers in two pairs. Find the encoding for position $pos = 2$.",
    "steps": [
     "Work out each pair's divisor. For $i = 0$: $10000^{0/4} = 1$. For $i = 1$: $10000^{2/4} = 100$.",
     "Pair 0 (dimensions 0 and 1) uses the angle $2 / 1 = 2$ radians. So $\\text{PE}_{(2,0)} = \\sin(2) \\approx 0.9093$ and $\\text{PE}_{(2,1)} = \\cos(2) \\approx -0.4161$.",
     "Pair 1 (dimensions 2 and 3) uses the angle $2 / 100 = 0.02$ radians. So $\\text{PE}_{(2,2)} = \\sin(0.02) \\approx 0.0200$ and $\\text{PE}_{(2,3)} = \\cos(0.02) \\approx 0.9998$.",
     "Stack the four values. The encoding for position 2 is $(0.9093,\\ -0.4161,\\ 0.0200,\\ 0.9998)$, and it is added to the embedding of the word at position 2."
    ],
    "answer": "The position vector for position 2 is **(0.9093, -0.4161, 0.0200, 0.9998)**. The first pair changes quickly from one position to the next, so it separates neighboring words. The second pair changes slowly, so it carries a longer-range signal."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/scaled-dot-product-attention/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/softmax/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/perplexity/"
   ],
   "sources": [
    {
     "title": "Vaswani et al., Attention Is All You Need (arXiv:1706.03762)",
     "url": "https://arxiv.org/abs/1706.03762"
    },
    {
     "title": "Transformer (deep learning), Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Transformer_(deep_learning)"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/convolution-output-size",
   "title": "Convolution Output Size",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/convolution-output-size/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/convolution-output-size.md",
   "latex": "O = \\left\\lfloor \\frac{W - K + 2P}{S} \\right\\rfloor + 1",
   "one_liner": "This formula counts how many spots a small sliding window can land on across an image, so you know how big a convolution layer's output will be.",
   "read_aloud": "O equals the floor of W minus K plus 2 P, all divided by S, then plus 1. The floor means round down to a whole number.",
   "symbols": [
    {
     "latex": "O",
     "meaning": "The **output size**: how many values the layer produces along one side, such as its width. A whole number of pixels."
    },
    {
     "latex": "W",
     "meaning": "The **input size** along the same side, such as the width of the image in pixels."
    },
    {
     "latex": "K",
     "meaning": "The **kernel size**, the width of the sliding window, in pixels."
    },
    {
     "latex": "P",
     "meaning": "The **padding**, the number of extra pixels added on each side of the input, in pixels."
    },
    {
     "latex": "S",
     "meaning": "The **stride**, how many pixels the window jumps between positions, in pixels."
    },
    {
     "latex": "\\left\\lfloor x \\right\\rfloor",
     "meaning": "The **floor** of $x$: the largest whole number that is not greater than $x$. It rounds down, so $15.5$ becomes $15$."
    }
   ],
   "worked_example": {
    "title": "Output width of a 3 by 3 convolution on a 32-pixel image",
    "setup": "The input is $W = 32$ pixels wide. The kernel is $K = 3$ pixels wide, the padding is $P = 1$ pixel on each side and the stride is $S = 2$ pixels.",
    "steps": [
     "Subtract the kernel and add the padding on both sides: $W - K + 2P = 32 - 3 + 2 \\times 1 = 31$.",
     "Divide by the stride: $\\frac{31}{2} = 15.5$.",
     "Round down with the floor: $\\lfloor 15.5 \\rfloor = 15$.",
     "Add 1: $O = 15 + 1 = 16$."
    ],
    "answer": "The output is **16 pixels** wide. The stride of 2 roughly halves the width. For comparison, with stride 1 and the same padding, the output would be 32 pixels wide, the same as the input."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/artificial-neuron/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/sigmoid-function/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/gradient-descent/"
   ],
   "sources": [
    {
     "title": "Convolutional neural network, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Convolutional_neural_network"
    },
    {
     "title": "Stanford CS231n, Convolutional Neural Networks notes",
     "url": "https://cs231n.github.io/convolutional-networks/"
    },
    {
     "title": "Dumoulin and Visin, A guide to convolution arithmetic for deep learning (arXiv:1603.07285)",
     "url": "https://arxiv.org/abs/1603.07285"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/r-squared",
   "title": "R-Squared",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/r-squared/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/r-squared.md",
   "latex": "R^2 = 1 - \\frac{SS_{res}}{SS_{tot}}",
   "one_liner": "R-squared is a score that says how much of the ups and downs in the data a model predicts correctly. A perfect model scores 1.",
   "read_aloud": "R squared equals 1 minus the ratio of SS res to SS tot. SS res is the sum of the squared gaps between each actual value and its prediction. SS tot is the sum of the squared gaps between each actual value and the mean.",
   "symbols": [
    {
     "latex": "R^2",
     "meaning": "**R-squared**, the coefficient of determination. A plain number with no unit. 1 means perfect predictions, and 0 means no better than always guessing the average."
    },
    {
     "latex": "SS_{res}",
     "meaning": "The **residual sum of squares**, $\\sum_i (y_i - \\hat y_i)^2$: the total squared miss of the model's predictions. Its unit is the square of the output's unit."
    },
    {
     "latex": "SS_{tot}",
     "meaning": "The **total sum of squares**, $\\sum_i (y_i - \\bar y)^2$: the total squared distance of the actual values from their mean. Its unit is the square of the output's unit."
    },
    {
     "latex": "y_i",
     "meaning": "The actual value for data point number $i$, such as a quiz score in points."
    },
    {
     "latex": "\\hat y_i",
     "meaning": "The model's predicted value for data point $i$, read as y hat. Same unit as $y_i$."
    },
    {
     "latex": "\\bar y",
     "meaning": "The mean (average) of all the actual values $y_i$. Same unit as $y_i$."
    },
    {
     "latex": "\\sum_i",
     "meaning": "\"Add up for every data point $i$\": the total over all the points."
    }
   ],
   "worked_example": {
    "title": "Predicting four quiz scores",
    "setup": "Four students scored $y = (3,\\ 5,\\ 7,\\ 9)$ points on a quiz. A model predicted $\\hat y = (2.5,\\ 5.5,\\ 7,\\ 9.5)$. How well does it explain the scores?",
    "steps": [
     "Find the average of the actual scores: $\\bar y = \\frac{3 + 5 + 7 + 9}{4} = 6$ points.",
     "Find the total spread around that average: $SS_{tot} = (3 - 6)^2 + (5 - 6)^2 + (7 - 6)^2 + (9 - 6)^2 = 9 + 1 + 1 + 9 = 20$.",
     "Find the model's squared misses. The errors are $0.5$, $-0.5$, $0$ and $-0.5$, so $SS_{res} = 0.25 + 0.25 + 0 + 0.25 = 0.75$.",
     "Put them together: $R^2 = 1 - \\frac{0.75}{20} = 1 - 0.0375 = 0.9625$."
    ],
    "answer": "**R-squared is 0.9625**, about 0.96. The model explains about 96% of the spread in the scores. It still misses a little, but almost all of the variation is captured."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/mean-squared-error/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/gradient-descent/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/z-score-standardization/"
   ],
   "sources": [
    {
     "title": "Coefficient of determination, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Coefficient_of_determination"
    },
    {
     "title": "Linear regression, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Linear_regression"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/q-learning-update",
   "title": "Q-Learning Update",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/q-learning-update/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/q-learning-update.md",
   "latex": "Q(s,a) \\leftarrow Q(s,a) + \\alpha\\left[r + \\gamma \\max_{a'} Q(s',a') - Q(s,a)\\right]",
   "one_liner": "Q-learning lets an agent improve its guess about how good an action is, a little at a time, using the reward it received on the latest step.",
   "read_aloud": "Q of s, a becomes Q of s, a plus alpha times a bracket. Inside the bracket: the reward r, plus gamma times the largest Q of s prime and a prime, minus Q of s, a.",
   "symbols": [
    {
     "latex": "Q(s,a)",
     "meaning": "The agent's current estimate of how good it is to take action $a$ in state $s$: the total future reward it expects. It has no unit and is measured in reward points."
    },
    {
     "latex": "s",
     "meaning": "The **state**, the situation the agent is in now, such as a square in a maze."
    },
    {
     "latex": "a",
     "meaning": "The **action** the agent takes in state $s$, such as moving right."
    },
    {
     "latex": "r",
     "meaning": "The **reward** received right after taking action $a$, in reward points."
    },
    {
     "latex": "s'",
     "meaning": "The **next state**, where the agent ends up after the action. The prime mark means next."
    },
    {
     "latex": "\\max_{a'} Q(s',a')",
     "meaning": "The best value available from the next state: the largest $Q$ over all the actions $a'$ the agent could take there."
    },
    {
     "latex": "\\alpha",
     "meaning": "The **learning rate**, between 0 and 1. It sets how big a step each update takes. No unit."
    },
    {
     "latex": "\\gamma",
     "meaning": "The **discount factor**, between 0 and 1. It sets how much future reward counts compared with reward now. No unit."
    }
   ],
   "worked_example": {
    "title": "One update in a grid world",
    "setup": "The agent is in state $s$ and takes action $a$. Its current estimate is $Q(s,a) = 2.0$. The action gives reward $r = 1.0$ and leads to state $s'$, where the best action has value $\\max_{a'} Q(s',a') = 4.0$. Use $\\alpha = 0.5$ and $\\gamma = 0.9$.",
    "steps": [
     "Discount the best future value: $\\gamma \\max_{a'} Q(s',a') = 0.9 \\times 4.0 = 3.6$.",
     "Add the reward to get the target: $r + \\gamma \\max_{a'} Q(s',a') = 1.0 + 3.6 = 4.6$.",
     "Find the TD error: $4.6 - 2.0 = 2.6$.",
     "Update the estimate: $Q(s,a) \\leftarrow 2.0 + 0.5 \\times 2.6 = 3.3$."
    ],
    "answer": "The new estimate is **$Q(s,a) = 3.3$**. It moved halfway from 2.0 toward the target of 4.6, because $\\alpha = 0.5$. The next time the agent visits this pair, the estimate will be a little closer to the target again."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/discounted-return/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/softmax-temperature/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/gradient-descent/"
   ],
   "sources": [
    {
     "title": "Q-learning, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Q-learning"
    },
    {
     "title": "Reinforcement learning, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Reinforcement_learning"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/discounted-return",
   "title": "Discounted Return",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/discounted-return/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/discounted-return.md",
   "latex": "G_t = \\sum_{k=0}^{\\infty} \\gamma^{k} r_{t+k+1}",
   "one_liner": "The discounted return is the total reward an agent can expect from now on, where rewards that arrive later count for a little less.",
   "read_aloud": "G sub t equals the sum, for k from 0 to infinity, of gamma to the power k, times the reward r at time t plus k plus 1.",
   "symbols": [
    {
     "latex": "G_t",
     "meaning": "The **return** at time $t$: the total discounted reward from that moment onward. Measured in reward points."
    },
    {
     "latex": "\\sum_{k=0}^{\\infty}",
     "meaning": "\"Add up for every $k$ from 0 to infinity\": the sum runs over all the future steps. In practice it stops when the rewards run out."
    },
    {
     "latex": "k",
     "meaning": "How many steps after time $t$ a reward arrives. $k = 0$ is the very next step."
    },
    {
     "latex": "\\gamma",
     "meaning": "The **discount factor**, with $0 \\le \\gamma < 1$. It sets how much less a reward counts for each step it is delayed. No unit."
    },
    {
     "latex": "r_{t+k+1}",
     "meaning": "The reward received after the step taken at time $t+k$, measured in reward points."
    }
   ],
   "worked_example": {
    "title": "A robot's rewards over four steps",
    "setup": "A robot receives these rewards after each of its next four steps: 1, 0, 2 and 5 points, and nothing after that. Use $\\gamma = 0.9$ and time $t = 0$.",
    "steps": [
     "Multiply each reward by its discount: $1 \\times 0.9^0 = 1$, $0 \\times 0.9^1 = 0$, $2 \\times 0.9^2 = 1.62$ and $5 \\times 0.9^3 = 3.645$.",
     "Add the four values: $G_0 = 1 + 0 + 1.62 + 3.645 = 6.265$.",
     "Check with the shortcut, starting from the last reward: $G_3 = 5$, then $G_2 = 2 + 0.9 \\times 5 = 6.5$, then $G_1 = 0 + 0.9 \\times 6.5 = 5.85$, and finally $G_0 = 1 + 0.9 \\times 5.85 = 6.265$."
    ],
    "answer": "The discounted return is **6.265 points**. The 5-point reward arrives three steps after the first one, so it is multiplied by $0.9^3 = 0.729$ and counts for 3.645 points. The shortcut gives the same total."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/q-learning-update/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/softmax-temperature/"
   ],
   "sources": [
    {
     "title": "Reinforcement learning, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Reinforcement_learning"
    },
    {
     "title": "Markov decision process, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Markov_decision_process"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "ai-ml/z-score-standardization",
   "title": "Z-Score Standardization",
   "category": "ai-ml",
   "url": "https://formulabro.yunusemrevurgun.com/ai-ml/z-score-standardization/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/ai-ml/z-score-standardization.md",
   "latex": "z = \\frac{x - \\mu}{\\sigma}",
   "one_liner": "A z-score says how far a number is from the average, measured in typical steps of spread, so different features can be compared fairly.",
   "read_aloud": "z equals x minus mu, all divided by sigma. The z-score of x is its distance from the mean, divided by the standard deviation.",
   "symbols": [
    {
     "latex": "z",
     "meaning": "The **z-score**, the new value after standardization. It is a plain number with no unit: how many standard deviations $x$ sits from the mean."
    },
    {
     "latex": "x",
     "meaning": "The original value of one feature, in its own units, such as hours or dollars."
    },
    {
     "latex": "\\mu",
     "meaning": "The **mean** of the feature, the average over the training data, in the same units as $x$."
    },
    {
     "latex": "\\sigma",
     "meaning": "The **standard deviation**, the typical distance of the values from the mean, in the same units as $x$. It must be greater than zero."
    }
   ],
   "worked_example": {
    "title": "Standardizing weekly study hours",
    "setup": "Five students study these hours per week: $7$, $9$, $10$, $11$ and $13$. Standardize the value $x = 13$.",
    "steps": [
     "Find the mean: $\\mu = \\frac{7 + 9 + 10 + 11 + 13}{5} = 10$ hours.",
     "Find the squared deviations: $(7 - 10)^2 = 9$, $(9 - 10)^2 = 1$, $(10 - 10)^2 = 0$, $(11 - 10)^2 = 1$ and $(13 - 10)^2 = 9$. Their average is $\\frac{20}{5} = 4$, so $\\sigma = \\sqrt{4} = 2$ hours.",
     "Standardize the value: $z = \\frac{13 - 10}{2} = 1.5$.",
     "Check the whole set: the five z-scores are $-1.5$, $-0.5$, $0$, $0.5$ and $1.5$. They add up to 0, and their squares average to 1."
    ],
    "answer": "The z-score of 13 hours is **1.5**. That student studies 1.5 standard deviations above the group average. After standardizing, the whole set has mean 0 and standard deviation 1."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/mean-squared-error/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/r-squared/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/gradient-descent/"
   ],
   "sources": [
    {
     "title": "Standard score, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Standard_score"
    },
    {
     "title": "Feature scaling, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Feature_scaling"
    },
    {
     "title": "scikit-learn, StandardScaler documentation",
     "url": "https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.StandardScaler.html"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/binary-number-value",
   "title": "Binary Number Value",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/binary-number-value/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/binary-number-value.md",
   "latex": "N = \\sum_{i=0}^{n-1} b_i \\cdot 2^{i}",
   "one_liner": "Binary uses only the digits 0 and 1, and this formula turns a row of those digits into the ordinary number they stand for.",
   "read_aloud": "N equals the sum, for every position i from 0 up to n minus 1, of bit b sub i times 2 to the power of i.",
   "symbols": [
    {
     "latex": "N",
     "meaning": "The ordinary (decimal) number that the bits stand for."
    },
    {
     "latex": "n",
     "meaning": "How many bits the number has. An 8-bit number has $n = 8$."
    },
    {
     "latex": "i",
     "meaning": "The position of a bit, counted from the right and starting at 0. Position 0 is the rightmost bit."
    },
    {
     "latex": "b_i",
     "meaning": "The bit at position $i$. It is always either 0 or 1."
    },
    {
     "latex": "2^{i}",
     "meaning": "The place value of position $i$: 1, 2, 4, 8, 16 and so on. Each place is worth twice the place on its right."
    },
    {
     "latex": "\\sum_{i=0}^{n-1}",
     "meaning": "\"Add up the terms for every position $i$ from 0 to $n - 1$\": go through all the bits and total their values."
    }
   ],
   "worked_example": {
    "title": "Reading the binary number 1011",
    "setup": "The bits are $1011$, read from left to right. That is 4 bits, so $n = 4$. The place values from left to right are $8$, $4$, $2$ and $1$.",
    "steps": [
     "Write the place values from left to right: $2^{3} = 8$, $2^{2} = 4$, $2^{1} = 2$, $2^{0} = 1$.",
     "Pair each bit with its place: the 1 sits in the 8 place, the 0 in the 4 place, the 1 in the 2 place and the 1 in the 1 place.",
     "Multiply each bit by its place value and add: $1 \\cdot 8 + 0 \\cdot 4 + 1 \\cdot 2 + 1 \\cdot 1 = 8 + 0 + 2 + 1$.",
     "Total: $8 + 0 + 2 + 1 = 11$.",
     "A byte is 8 bits. Its places run from $2^{7}$ down to $2^{0}$, and setting all eight bits to 1 gives the largest value, $2^{8} - 1 = 255$. Zero is the smallest, so one byte holds 256 different values."
    ],
    "answer": "The binary number $1011$ is the ordinary number **11**. One byte can hold the whole numbers from **0 to 255**, which is 256 values in all."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/binary-search-steps/",
    "https://formulabro.yunusemrevurgun.com/computer-science/de-morgans-laws/",
    "https://formulabro.yunusemrevurgun.com/computer-science/shannon-entropy/"
   ],
   "sources": [
    {
     "title": "Binary number, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Binary_number"
    },
    {
     "title": "Byte, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Byte"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/binary-search-steps",
   "title": "Binary Search Steps",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/binary-search-steps/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/binary-search-steps.md",
   "latex": "\\text{steps} = \\lceil \\log_2 (n + 1) \\rceil",
   "one_liner": "Binary search finds an item in a sorted list by checking the middle and throwing away half, and this formula counts how many checks that takes at most.",
   "read_aloud": "The number of steps equals the ceiling of the base-2 logarithm of n plus 1. The ceiling means round up to the next whole number.",
   "symbols": [
    {
     "latex": "\\text{steps}",
     "meaning": "The worst-case number of comparisons: how many checks you might need before you know whether the item is in the list."
    },
    {
     "latex": "n",
     "meaning": "How many items are in the sorted list."
    },
    {
     "latex": "\\log_2 x",
     "meaning": "The base-2 logarithm: how many times you must halve $x$ to get down to 1. For powers of 2 it is exact, so $\\log_2 8 = 3$ because $8 \\to 4 \\to 2 \\to 1$ takes 3 halvings."
    },
    {
     "latex": "\\lceil x \\rceil",
     "meaning": "The ceiling of $x$: round $x$ up to the next whole number. For example $\\lceil 19.93 \\rceil = 20$."
    }
   ],
   "worked_example": {
    "title": "Finding one name among 1000000 sorted items",
    "setup": "A sorted list has $n = 1000000$ items. We want the worst-case number of comparisons for binary search, and we compare it with a plain linear scan that checks one item at a time.",
    "steps": [
     "Add 1: $n + 1 = 1000001$.",
     "Take the base-2 logarithm: $\\log_2 1000001 \\approx 19.93$. So you need about 20 halvings to get down to one item.",
     "Round up with the ceiling: $\\lceil 19.93 \\rceil = 20$ steps.",
     "A linear scan may check all $1000000$ items in the worst case. The ratio is $\\frac{1000000}{20} = 50000$, so binary search does about 50,000 times fewer checks here."
    ],
    "answer": "In the worst case, binary search needs **20 comparisons** to find an item in a sorted list of one million items. A linear scan may need up to **1,000,000**. The gap grows fast as the list grows."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/binary-number-value/",
    "https://formulabro.yunusemrevurgun.com/computer-science/littles-law/",
    "https://formulabro.yunusemrevurgun.com/computer-science/amdahls-law/"
   ],
   "sources": [
    {
     "title": "Binary search algorithm, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Binary_search_algorithm"
    },
    {
     "title": "Logarithm, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Logarithm"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/shannon-entropy",
   "title": "Shannon Entropy",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/shannon-entropy/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/shannon-entropy.md",
   "latex": "H = -\\sum_{i=1}^{n} p_i \\log_2 p_i",
   "one_liner": "Shannon entropy is one number, in bits, that says how unpredictable a source is. The more predictable it is, the less space its messages need.",
   "read_aloud": "H equals minus the sum, for every outcome i from 1 to n, of p sub i times the base-2 logarithm of p sub i. The answer is measured in bits.",
   "symbols": [
    {
     "latex": "H",
     "meaning": "The entropy of the source, in **bits**. One bit is the information in one fair yes-or-no answer."
    },
    {
     "latex": "n",
     "meaning": "How many different possible outcomes there are, such as 2 for a coin or 6 for a die."
    },
    {
     "latex": "i",
     "meaning": "Which outcome we are looking at, counted from 1 to $n$."
    },
    {
     "latex": "p_i",
     "meaning": "The probability of outcome $i$: a number from 0 to 1. All the $p_i$ together add up to 1."
    },
    {
     "latex": "\\log_2 p_i",
     "meaning": "The base-2 logarithm of the probability. It is zero or negative for any probability at most 1, which is why the formula has a minus sign in front."
    },
    {
     "latex": "-\\sum_{i=1}^{n}",
     "meaning": "\"Add up the terms for every outcome, then flip the sign.\" Flipping the sign makes the final answer zero or positive."
    }
   ],
   "worked_example": {
    "title": "Entropy of a fair coin, a biased coin and a die",
    "setup": "Three sources, each described by its outcome probabilities. We work out the entropy of each one in bits.",
    "steps": [
     "Fair coin: $p = (0.5,\\ 0.5)$. Each term is $0.5 \\cdot \\log_2 0.5 = 0.5 \\cdot (-1) = -0.5$. Adding the two terms gives $-1$, and flipping the sign gives $H = 1$ bit.",
     "Biased coin: $p = (0.9,\\ 0.1)$. The terms are $0.9 \\cdot \\log_2 0.9 \\approx 0.9 \\cdot (-0.152) = -0.137$ and $0.1 \\cdot \\log_2 0.1 \\approx 0.1 \\cdot (-3.322) = -0.332$. Their sum is $-0.469$, so $H = 0.469$ bits.",
     "Fair six-sided die: six outcomes, each with $p = \\frac{1}{6}$. The six equal terms add up to $6 \\cdot \\frac{1}{6} \\log_2 \\frac{1}{6} = -\\log_2 6$, so $H = \\log_2 6 \\approx 2.585$ bits.",
     "Biased coin over 1000 flips: $1000 \\cdot 0.469 = 469$ bits, instead of 1000 bits for a fair coin."
    ],
    "answer": "A fair coin carries **1 bit** of surprise per flip. The biased coin carries only **0.469 bits**, because it is usually heads. A fair die carries **2.585 bits**, a little more than 2, because six equal outcomes need a little more than two yes-or-no questions. A good code can average about 0.469 bits per flip for the biased coin, which is why predictable data compresses so well."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/ai-ml/cross-entropy-loss/",
    "https://formulabro.yunusemrevurgun.com/ai-ml/softmax/",
    "https://formulabro.yunusemrevurgun.com/computer-science/binary-number-value/"
   ],
   "sources": [
    {
     "title": "Entropy (information theory), Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Entropy_(information_theory)"
    },
    {
     "title": "A Mathematical Theory of Communication, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/A_Mathematical_Theory_of_Communication"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/amdahls-law",
   "title": "Amdahl's Law",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/amdahls-law/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/amdahls-law.md",
   "latex": "S = \\frac{1}{(1 - p) + \\frac{p}{s}}",
   "one_liner": "Amdahl's law tells you how much faster a whole program gets when you speed up only part of its work, and why the part you leave alone caps the gain.",
   "read_aloud": "S equals one divided by the quantity one minus p, plus p divided by s.",
   "symbols": [
    {
     "latex": "S",
     "meaning": "The overall speedup: how many times faster the whole job runs. A value of 1 means no change and a value of 2 means twice as fast."
    },
    {
     "latex": "p",
     "meaning": "The fraction of the work that can be sped up, from 0 to 1. For example $p = 0.9$ means 90% of the job."
    },
    {
     "latex": "s",
     "meaning": "The speedup of that part alone. With 8 cores on a perfectly split job, $s = 8$."
    },
    {
     "latex": "1 - p",
     "meaning": "The fraction of the work that stays the same, the part that cannot be sped up."
    },
    {
     "latex": "\\frac{p}{s}",
     "meaning": "The time the sped-up part now takes, as a fraction of the original total time."
    }
   ],
   "worked_example": {
    "title": "A program that is 90% parallel on 8 cores",
    "setup": "A program spends 90% of its time on work that can be split across cores, so $p = 0.9$. That part runs $s = 8$ times faster on 8 cores. The other 10% is serial and stays the same.",
    "steps": [
     "Serial part: $1 - p = 1 - 0.9 = 0.1$ of the original time.",
     "Parallel part on 8 cores: $\\frac{p}{s} = \\frac{0.9}{8} = 0.1125$ of the original time.",
     "New total time: $0.1 + 0.1125 = 0.2125$, compared with 1 before.",
     "Speedup on 8 cores: $S = \\frac{1}{0.2125} \\approx 4.71$.",
     "Limit with unlimited cores: the parallel part takes almost no time, so the total time is close to $0.1$ and $S = \\frac{1}{0.1} = 10$."
    ],
    "answer": "On 8 cores the program runs about **4.71 times faster**, not 8 times faster. Even with unlimited cores it can never get more than **10 times** faster, because the 10% serial part still takes its full time."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/littles-law/",
    "https://formulabro.yunusemrevurgun.com/computer-science/binary-search-steps/"
   ],
   "sources": [
    {
     "title": "Amdahl's law, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Amdahl%27s_law"
    },
    {
     "title": "Parallel computing, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Parallel_computing"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/de-morgans-laws",
   "title": "De Morgan's Laws",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/de-morgans-laws/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/de-morgans-laws.md",
   "latex": "\\neg(A \\land B) = \\neg A \\lor \\neg B \\qquad \\neg(A \\lor B) = \\neg A \\land \\neg B",
   "one_liner": "De Morgan's laws say that a NOT in front of a group of AND or OR conditions flips the group: AND becomes OR, and OR becomes AND.",
   "read_aloud": "Not, open bracket, A and B, close bracket, equals not A or not B. And not, open bracket, A or B, close bracket, equals not A and not B.",
   "symbols": [
    {
     "latex": "A",
     "meaning": "A statement that is either true or false, such as \"it is raining\"."
    },
    {
     "latex": "B",
     "meaning": "A second statement that is either true or false, such as \"it is cold\"."
    },
    {
     "latex": "\\neg",
     "meaning": "NOT. It flips a statement: true becomes false and false becomes true."
    },
    {
     "latex": "\\land",
     "meaning": "AND. The result is true only when both statements are true."
    },
    {
     "latex": "\\lor",
     "meaning": "OR. The result is true when at least one of the statements is true."
    }
   ],
   "worked_example": {
    "title": "Rewriting a rain-and-cold rule in code",
    "setup": "A park app runs a walking tour when $\\neg(A \\land B)$ is true. Here $A$ means it is raining and $B$ means it is cold. So the tour runs unless it is both raining and cold.",
    "steps": [
     "Apply the first law: $\\neg(A \\land B) = \\neg A \\lor \\neg B$. In words, the tour runs when it is not raining, or it is not cold.",
     "In code, `if not (raining and cold):` becomes `if (not raining) or (not cold):`. Both lines give the same answer every time.",
     "Row 1, not raining and not cold ($A$ false, $B$ false): left side $\\neg(F \\land F) = \\neg F = T$. Right side $\\neg F \\lor \\neg F = T \\lor T = T$. They match.",
     "Row 2, not raining and cold ($A$ false, $B$ true): left side $\\neg(F \\land T) = \\neg F = T$. Right side $\\neg F \\lor \\neg T = T \\lor F = T$. They match.",
     "Row 3, raining and not cold ($A$ true, $B$ false): left side $\\neg(T \\land F) = \\neg F = T$. Right side $\\neg T \\lor \\neg F = F \\lor T = T$. They match.",
     "Row 4, raining and cold ($A$ true, $B$ true): left side $\\neg(T \\land T) = \\neg T = F$. Right side $\\neg T \\lor \\neg T = F \\lor F = F$. They match."
    ],
    "answer": "The two forms are the same rule. The tour runs in three of the four weather cases and is off only when it is both raining and cold. Both versions of the code give that same result in all four cases, so you can pick whichever one reads more clearly."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/binary-number-value/",
    "https://formulabro.yunusemrevurgun.com/computer-science/binary-search-steps/"
   ],
   "sources": [
    {
     "title": "De Morgan's laws, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/De_Morgan%27s_laws"
    },
    {
     "title": "Truth table, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Truth_table"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/littles-law",
   "title": "Little's Law",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/littles-law/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/littles-law.md",
   "latex": "L = \\lambda W",
   "one_liner": "Little's law says the number of things inside a system equals how fast they arrive, multiplied by how long each one stays.",
   "read_aloud": "L equals lambda times W. The average number of items in the system equals the arrival rate times the average time each item spends in it.",
   "symbols": [
    {
     "latex": "L",
     "meaning": "The average number of items inside the system at any moment, such as customers in a shop or requests in a server."
    },
    {
     "latex": "\\lambda",
     "meaning": "The arrival rate: how many items enter the system per unit of time, such as customers per hour."
    },
    {
     "latex": "W",
     "meaning": "The average time one item spends in the system, from arrival to departure. Use the same time unit as $\\lambda$, for example hours."
    }
   ],
   "worked_example": {
    "title": "Customers in a coffee shop",
    "setup": "A coffee shop gets $\\lambda = 30$ customers per hour. Each customer stays $W = 6$ minutes on average. We need the same time unit as the rate, so we use hours.",
    "steps": [
     "Convert the time: $6$ minutes $= \\frac{6}{60}$ hours $= 0.1$ hours.",
     "Apply the law: $L = \\lambda W = 30 \\cdot 0.1 = 3$ customers.",
     "Second case, a web server: $\\lambda = 200$ requests per second and $W = 0.05$ seconds. So $L = 200 \\cdot 0.05 = 10$ requests in flight."
    ],
    "answer": "On average **3 customers** are inside the coffee shop at any moment. The same rule says a web server that gets 200 requests per second, each taking 0.05 seconds, has about **10 requests** in progress at once. Both results are averages, not exact counts."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/amdahls-law/",
    "https://formulabro.yunusemrevurgun.com/computer-science/binary-search-steps/"
   ],
   "sources": [
    {
     "title": "Little's law, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Little%27s_law"
    },
    {
     "title": "Queueing theory, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Queueing_theory"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/hexadecimal-number-value",
   "title": "Hexadecimal Number Value",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/hexadecimal-number-value/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/hexadecimal-number-value.md",
   "latex": "N = \\sum_{i=0}^{n-1} d_i \\cdot 16^{i}",
   "one_liner": "Hexadecimal counts in sixteens using the digits 0 to 9 and A to F, and this formula turns a hex number into the ordinary number it stands for.",
   "read_aloud": "N equals the sum, for every position i from 0 up to n minus 1, of digit d sub i times 16 to the power of i.",
   "symbols": [
    {
     "latex": "N",
     "meaning": "The ordinary (decimal) number that the hex digits stand for."
    },
    {
     "latex": "n",
     "meaning": "How many hex digits the number has. The number 2F has $n = 2$."
    },
    {
     "latex": "i",
     "meaning": "The position of a digit, counted from the right and starting at 0. Position 0 is the rightmost digit."
    },
    {
     "latex": "d_i",
     "meaning": "The digit at position $i$. Hex digits run from 0 to 15: the digits 0 to 9 are worth 0 to 9, and A, B, C, D, E and F are worth 10, 11, 12, 13, 14 and 15."
    },
    {
     "latex": "16^{i}",
     "meaning": "The place value of position $i$: 1, 16, 256, 4096 and so on. Each place is worth sixteen times the place on its right."
    },
    {
     "latex": "\\sum_{i=0}^{n-1}",
     "meaning": "\\\"Add up the terms for every position $i$ from 0 to $n - 1$\\\": go through all the digits and total their values."
    }
   ],
   "worked_example": {
    "title": "Reading the hex number 2F",
    "setup": "The hex number is $2F$, with two digits, so $n = 2$. The digit $2$ sits in the sixteens place, and the digit $F$ sits in the ones place. $F$ means 15 in decimal.",
    "steps": [
     "Write the place values from right to left: $16^{0} = 1$ and $16^{1} = 16$.",
     "Convert each digit to decimal: $2$ stays $2$, and $F$ becomes $15$.",
     "Multiply each digit by its place value and add: $2 \\cdot 16 + 15 \\cdot 1 = 32 + 15$.",
     "Total: $32 + 15 = 47$.",
     "Check in binary: $2$ is $0010$ and $F$ is $1111$, so $2F$ is $00101111$. Reading that as binary gives $32 + 8 + 4 + 2 + 1 = 47$, the same number."
    ],
    "answer": "The hex number **2F** is the ordinary number **47**. The largest two-digit hex number is **FF**, which is $15 \\cdot 16 + 15 = 255$, so two hex digits can name any of the 256 values in one byte."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/binary-number-value/",
    "https://formulabro.yunusemrevurgun.com/computer-science/twos-complement/",
    "https://formulabro.yunusemrevurgun.com/computer-science/floating-point-value/",
    "https://formulabro.yunusemrevurgun.com/computer-science/bits-needed/"
   ],
   "sources": [
    {
     "title": "Hexadecimal, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Hexadecimal"
    },
    {
     "title": "Positional notation, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Positional_notation"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/twos-complement",
   "title": "Two's Complement",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/twos-complement/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/twos-complement.md",
   "latex": "N = -b_{n-1} \\cdot 2^{n-1} + \\sum_{i=0}^{n-2} b_i \\cdot 2^{i}",
   "one_liner": "Two's complement is the usual way computers write negative whole numbers in binary, and this formula reads a bit pattern as a positive or negative number.",
   "read_aloud": "N equals minus b sub n minus 1, times 2 to the power of n minus 1, plus the sum, for every position i from 0 up to n minus 2, of b sub i times 2 to the power of i.",
   "symbols": [
    {
     "latex": "N",
     "meaning": "The signed whole number that the bit pattern stands for. It can be negative."
    },
    {
     "latex": "n",
     "meaning": "How many bits the pattern has. An 8-bit pattern has $n = 8$."
    },
    {
     "latex": "b_{n-1}",
     "meaning": "The leftmost bit, called the sign bit. If it is 1, the number is negative."
    },
    {
     "latex": "2^{n-1}",
     "meaning": "The place value of the sign bit. For 8 bits it is $2^{7} = 128$, but the sign bit counts as minus this value."
    },
    {
     "latex": "i",
     "meaning": "The position of a bit, counted from the right and starting at 0."
    },
    {
     "latex": "b_i",
     "meaning": "The bit at position $i$, which is either 0 or 1."
    },
    {
     "latex": "2^{i}",
     "meaning": "The place value of position $i$: 1, 2, 4, 8 and so on."
    },
    {
     "latex": "\\sum_{i=0}^{n-2}",
     "meaning": "\\\"Add up the terms for every position $i$ from 0 to $n - 2$\\\": the sum covers all bits except the sign bit."
    }
   ],
   "worked_example": {
    "title": "Storing -5 in 8 bits",
    "setup": "Write $-5$ as an 8-bit two's complement pattern. Start with $+5$, which is $00000101$ in 8 bits, because $4 + 1 = 5$.",
    "steps": [
     "Write $+5$ in 8 bits: $00000101$, which is $4 + 1 = 5$.",
     "Invert every bit: $00000101$ becomes $11111010$.",
     "Add 1: $11111010 + 1 = 11111011$. This pattern stands for $-5$.",
     "Check with the formula. The sign bit $b_{7} = 1$ gives $-1 \\cdot 2^{7} = -128$. The other seven bits, $1111011$, give $64 + 32 + 16 + 8 + 0 + 2 + 1 = 123$. The total is $-128 + 123 = -5$.",
     "The same pattern read without a sign is $251$. The two's complement reading uses $-128$ for the leftmost bit instead of $+128$."
    ],
    "answer": "The 8-bit two's complement pattern for **-5** is **11111011**. Read without a sign, the same bits mean 251. The 8-bit range is **-128 to 127**."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/binary-number-value/",
    "https://formulabro.yunusemrevurgun.com/computer-science/hexadecimal-number-value/",
    "https://formulabro.yunusemrevurgun.com/computer-science/floating-point-value/",
    "https://formulabro.yunusemrevurgun.com/computer-science/bits-needed/"
   ],
   "sources": [
    {
     "title": "Two's complement, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Two%27s_complement"
    },
    {
     "title": "Signed number representations, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Signed_number_representations"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/floating-point-value",
   "title": "Floating-Point Value",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/floating-point-value/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/floating-point-value.md",
   "latex": "x = (-1)^{s} \\times 1.f \\times 2^{e - 127}",
   "one_liner": "A floating-point number stores a value as a sign, a power of two and a binary fraction, and this formula turns those three parts back into the number.",
   "read_aloud": "x equals negative one to the power of s, times 1 point f, times 2 to the power of e minus 127. This form covers normal single-precision numbers.",
   "symbols": [
    {
     "latex": "x",
     "meaning": "The number that the 32 bits stand for."
    },
    {
     "latex": "(-1)^{s}",
     "meaning": "The sign factor: $+1$ when $s = 0$ and $-1$ when $s = 1$."
    },
    {
     "latex": "s",
     "meaning": "The sign bit. It is 0 for a positive number and 1 for a negative number."
    },
    {
     "latex": "1.f",
     "meaning": "The significand. The leading 1 is implied and is not stored. The 23 stored fraction bits $f$ come after it, so $1.f$ is a binary number from 1 up to nearly 2."
    },
    {
     "latex": "f",
     "meaning": "The 23 stored fraction bits. Bit by bit, they are worth $\\frac{1}{2}$, $\\frac{1}{4}$, $\\frac{1}{8}$ and so on."
    },
    {
     "latex": "e",
     "meaning": "The exponent field: 8 stored bits read as a whole number from 0 to 255. The real power of two is $e - 127$, because of the bias 127."
    },
    {
     "latex": "2^{e - 127}",
     "meaning": "The scale factor. A stored exponent of 130 gives $2^{3} = 8$."
    }
   ],
   "worked_example": {
    "title": "Decoding a 32-bit float",
    "setup": "The 32 bits are $0\\ 10000001\\ 10000000000000000000000$: sign, exponent and fraction, in that order, with 23 fraction bits. So $s = 0$, the stored exponent is $e = 129$, and the fraction bits are $0.1000\\ldots$ in binary, which is one half.",
    "steps": [
     "Sign: $s = 0$, so $(-1)^{0} = 1$ and the number is positive.",
     "Exponent: $10000001$ is $129$. The real power is $129 - 127 = 2$, so the scale is $2^{2} = 4$.",
     "Significand: the fraction bits give $0.5$, so $1.f = 1 + 0.5 = 1.5$.",
     "Multiply: $x = 1 \\cdot 1.5 \\cdot 4 = 6$."
    ],
    "answer": "The 32 bits store exactly **6**. Most decimal values, such as 0.1, have no exact binary form, so they are stored as the nearest pattern instead."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/binary-number-value/",
    "https://formulabro.yunusemrevurgun.com/computer-science/twos-complement/",
    "https://formulabro.yunusemrevurgun.com/computer-science/hexadecimal-number-value/",
    "https://formulabro.yunusemrevurgun.com/computer-science/bits-needed/"
   ],
   "sources": [
    {
     "title": "IEEE 754, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/IEEE_754"
    },
    {
     "title": "Single-precision floating-point format, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Single-precision_floating-point_format"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/bits-needed",
   "title": "Bits Needed",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/bits-needed/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/bits-needed.md",
   "latex": "b = \\lceil \\log_2 N \\rceil",
   "one_liner": "This formula counts the fewest bits you need to give each of N items its own binary code.",
   "read_aloud": "b equals the ceiling of the base-2 logarithm of N. The ceiling means round up to the next whole number.",
   "symbols": [
    {
     "latex": "b",
     "meaning": "The number of bits needed. It is always a whole number."
    },
    {
     "latex": "N",
     "meaning": "How many different items need their own code."
    },
    {
     "latex": "\\log_2 N",
     "meaning": "The base-2 logarithm: the power you raise 2 to in order to get $N$. For example, $\\log_2 8 = 3$ because $2^{3} = 8$."
    },
    {
     "latex": "\\lceil x \\rceil",
     "meaning": "The ceiling of $x$: round $x$ up to the next whole number. For example, $\\lceil 9.97 \\rceil = 10$."
    }
   ],
   "worked_example": {
    "title": "Coding 1000 products",
    "setup": "A shop has $N = 1000$ different products, and each product needs its own binary code. We want the fewest bits per code.",
    "steps": [
     "Take the base-2 logarithm: $\\log_2 1000 \\approx 9.966$.",
     "Round up with the ceiling: $\\lceil 9.966 \\rceil = 10$ bits.",
     "Check 9 bits: $2^{9} = 512$, which is less than 1000, so 9 bits are not enough.",
     "Check 10 bits: $2^{10} = 1024$, which is at least 1000. Ten bits give every product its own code, with 24 codes left over."
    ],
    "answer": "Each product needs **10 bits**. Ten bits give **1024** codes, which covers the **1000** products with 24 codes to spare."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/binary-number-value/",
    "https://formulabro.yunusemrevurgun.com/computer-science/shannon-entropy/",
    "https://formulabro.yunusemrevurgun.com/computer-science/twos-complement/",
    "https://formulabro.yunusemrevurgun.com/computer-science/hexadecimal-number-value/"
   ],
   "sources": [
    {
     "title": "Binary logarithm, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Binary_logarithm"
    },
    {
     "title": "Floor and ceiling functions, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Floor_and_ceiling_functions"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/big-o-notation",
   "title": "Big O Notation",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/big-o-notation/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/big-o-notation.md",
   "latex": "f(n) = O(g(n)) \\iff \\exists\\, c > 0,\\ n_0 \\text{ such that } 0 \\le f(n) \\le c\\, g(n) \\text{ for all } n \\ge n_0",
   "one_liner": "Big O notation says that one function never grows faster than a fixed multiple of another, once the inputs are large enough.",
   "read_aloud": "f of n is big O of g of n if and only if there exist a positive constant c and a starting point n sub 0 such that, for every n at least n sub 0, zero is at most f of n, and f of n is at most c times g of n.",
   "symbols": [
    {
     "latex": "f(n)",
     "meaning": "The function you want to bound, such as the number of steps an algorithm takes on an input of size $n$."
    },
    {
     "latex": "g(n)",
     "meaning": "The simpler reference function, such as $n$, $n^{2}$ or $\\log n$."
    },
    {
     "latex": "O(g(n))",
     "meaning": "\\\"Big O of $g(n)$\\\": the set of functions that grow no faster than a fixed multiple of $g(n)$."
    },
    {
     "latex": "n",
     "meaning": "The size of the input, a whole number that can grow without limit."
    },
    {
     "latex": "c",
     "meaning": "A positive constant that scales $g(n)$ up. It is fixed and does not depend on $n$."
    },
    {
     "latex": "n_0",
     "meaning": "A starting point. The bound only has to hold for $n$ at or beyond $n_0$, so small inputs can be ignored."
    },
    {
     "latex": "\\iff",
     "meaning": "\\\"If and only if\\\": the statement on the left holds exactly when the statement on the right holds."
    },
    {
     "latex": "\\exists",
     "meaning": "\\\"There exists\\\": at least one choice of $c$ and $n_0$ works."
    }
   ],
   "worked_example": {
    "title": "Showing 3n + 5 is O(n)",
    "setup": "Let $f(n) = 3n + 5$ and $g(n) = n$. We need a constant $c$ and a starting point $n_0$ so that $0 \\le 3n + 5 \\le c \\cdot n$ for every $n \\ge n_0$.",
    "steps": [
     "Pick $c = 4$. We need $3n + 5 \\le 4n$. Subtract $3n$ from both sides to get $5 \\le n$.",
     "So $n_0 = 5$ works. For every $n \\ge 5$, we have $5 \\le n$, so $3n + 5 \\le 4n$.",
     "Check the starting point. At $n = 5$, $3 \\cdot 5 + 5 = 20$ and $4 \\cdot 5 = 20$. The two sides are equal, which the definition allows.",
     "Check a larger value. At $n = 10$, $3 \\cdot 10 + 5 = 35$ and $4 \\cdot 10 = 40$, so $35 \\le 40$.",
     "The lower bound $0 \\le 3n + 5$ holds for every $n \\ge 0$, so both parts of the definition are met."
    ],
    "answer": "With $c = 4$ and $n_0 = 5$, the definition holds, so $3n + 5$ is **O(n)**. The $+5$ and the factor 3 do not change the shape of the growth. The work is a straight line in $n$."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/master-theorem/",
    "https://formulabro.yunusemrevurgun.com/computer-science/sum-of-first-n-integers/",
    "https://formulabro.yunusemrevurgun.com/computer-science/geometric-series/",
    "https://formulabro.yunusemrevurgun.com/computer-science/binary-search-steps/"
   ],
   "sources": [
    {
     "title": "Big O notation, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Big_O_notation"
    },
    {
     "title": "Time complexity, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Time_complexity"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/master-theorem",
   "title": "Master Theorem",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/master-theorem/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/master-theorem.md",
   "latex": "T(n) = a\\, T(n/b) + f(n)",
   "one_liner": "The master theorem gives the running time of a divide-and-conquer algorithm by comparing the work at each split with the work at the bottom of the recursion.",
   "read_aloud": "T of n equals a times T of n divided by b, plus f of n. Here a is the number of smaller pieces, and b is how much smaller each piece is.",
   "symbols": [
    {
     "latex": "T(n)",
     "meaning": "The running time of the algorithm on an input of size $n$, counted in basic steps."
    },
    {
     "latex": "n",
     "meaning": "The size of the input."
    },
    {
     "latex": "a",
     "meaning": "The number of smaller subproblems made at each step. It is a whole number, at least 1."
    },
    {
     "latex": "b",
     "meaning": "The factor by which the input shrinks for each subproblem. Each subproblem has size $n/b$, and $b > 1$."
    },
    {
     "latex": "T(n/b)",
     "meaning": "The running time of one subproblem, which has size $n/b$."
    },
    {
     "latex": "f(n)",
     "meaning": "The extra work at one level, outside the recursive calls: splitting the input and combining the answers."
    }
   ],
   "worked_example": {
    "title": "Merge sort: T(n) = 2T(n/2) + n",
    "setup": "Merge sort splits a list of $n$ numbers into 2 halves, sorts each half, and merges the two sorted halves in time proportional to $n$. So $a = 2$, $b = 2$ and $f(n) = n$, which gives $T(n) = 2\\,T(n/2) + n$.",
    "steps": [
     "Find the bottom exponent: $\\log_b a = \\log_2 2 = 1$, so $n^{\\log_b a} = n^{1} = n$.",
     "Compare: $f(n) = n$ and $n^{\\log_b a} = n$ grow at exactly the same rate. This is the middle case.",
     "Apply the middle case: $T(n) = \\Theta(n^{\\log_b a} \\log n) = \\Theta(n \\log n)$.",
     "Check with $n = 1024$. There are $\\log_2 1024 = 10$ levels, and each level does about $1024$ units of merging work, so the total is about $10 \\cdot 1024 = 10{,}240$ units.",
     "For comparison, $1024^{2} = 1{,}048{,}576$, which is about 100 times more work than $10{,}240$."
    ],
    "answer": "Merge sort takes $\\Theta(n \\log n)$ time. For 1024 items that is about **10,240** units of work, not the **1,048,576** units that $n^{2}$ would need."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/big-o-notation/",
    "https://formulabro.yunusemrevurgun.com/computer-science/sum-of-first-n-integers/",
    "https://formulabro.yunusemrevurgun.com/computer-science/geometric-series/",
    "https://formulabro.yunusemrevurgun.com/computer-science/binary-search-steps/"
   ],
   "sources": [
    {
     "title": "Master theorem (analysis of algorithms), Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Master_theorem_(analysis_of_algorithms)"
    },
    {
     "title": "Merge sort, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Merge_sort"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/sum-of-first-n-integers",
   "title": "Sum of the First n Integers",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/sum-of-first-n-integers/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/sum-of-first-n-integers.md",
   "latex": "\\sum_{i=1}^{n} i = \\frac{n(n+1)}{2}",
   "one_liner": "This formula adds the counting numbers from 1 to n in one step, so you never have to add them one at a time.",
   "read_aloud": "The sum, for every whole number i from 1 up to n, of i equals n times n plus 1, divided by 2.",
   "symbols": [
    {
     "latex": "\\sum_{i=1}^{n} i",
     "meaning": "The total of all the whole numbers from 1 up to $n$: $1 + 2 + \\cdots + n$."
    },
    {
     "latex": "i",
     "meaning": "The counter. It takes each whole number from 1 to $n$ in turn."
    },
    {
     "latex": "n",
     "meaning": "The last number in the list, a whole number that is 0 or more."
    },
    {
     "latex": "\\frac{n(n+1)}{2}",
     "meaning": "The closed form: multiply $n$ by the next number, $n + 1$, then divide by 2."
    }
   ],
   "worked_example": {
    "title": "Adding 1 to 100",
    "setup": "Add the whole numbers from 1 to $n = 100$. Then count the steps of a nested loop that uses the same total.",
    "steps": [
     "Find the next number: $n + 1 = 101$.",
     "Multiply: $n(n + 1) = 100 \\cdot 101 = 10{,}100$.",
     "Divide by 2: $\\frac{10{,}100}{2} = 5{,}050$. So $1 + 2 + \\cdots + 100 = 5{,}050$.",
     "Nested loop: an outer loop runs $i$ from 1 to 100, and the inner loop runs $i$ times for each $i$. The inner body runs $1 + 2 + \\cdots + 100 = 5{,}050$ times in total.",
     "Compare with $n^{2} = 10{,}000$. The nested loop does about half that work, so it is still $O(n^{2})$."
    ],
    "answer": "The sum of the whole numbers from 1 to 100 is **5,050**. A nested loop whose inner body runs $i$ times for each $i$ up to 100 does **5,050** steps, which is about half of $100^{2}$."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/big-o-notation/",
    "https://formulabro.yunusemrevurgun.com/computer-science/geometric-series/",
    "https://formulabro.yunusemrevurgun.com/computer-science/master-theorem/"
   ],
   "sources": [
    {
     "title": "Triangular number, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Triangular_number"
    },
    {
     "title": "Summation, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Summation"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/geometric-series",
   "title": "Geometric Series",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/geometric-series/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/geometric-series.md",
   "latex": "\\sum_{k=0}^{n-1} r^{k} = \\frac{1 - r^{n}}{1 - r} \\quad (r \\neq 1)",
   "one_liner": "A geometric series adds terms where each one is the last one times a fixed ratio, and this formula adds them all in one step.",
   "read_aloud": "The sum, for k from 0 up to n minus 1, of r to the power of k, equals one minus r to the power of n, divided by one minus r. This works when r is not equal to 1.",
   "symbols": [
    {
     "latex": "\\sum_{k=0}^{n-1}",
     "meaning": "\\\"Add up the terms for every $k$ from 0 to $n - 1$\\\". That is $n$ terms in all."
    },
    {
     "latex": "k",
     "meaning": "The step counter, starting at 0. The first term is $r^{0} = 1$."
    },
    {
     "latex": "r^{k}",
     "meaning": "The term at step $k$: $r$ multiplied by itself $k$ times."
    },
    {
     "latex": "r",
     "meaning": "The common ratio. Each term is the one before it times $r$. The formula needs $r \\neq 1$."
    },
    {
     "latex": "n",
     "meaning": "The number of terms in the series."
    },
    {
     "latex": "\\frac{1 - r^{n}}{1 - r}",
     "meaning": "The closed form for the sum. The division by $1 - r$ is why $r = 1$ is excluded."
    }
   ],
   "worked_example": {
    "title": "Copies in a doubling array",
    "setup": "A dynamic array starts with room for 1 item. When it is full and a new item arrives, it builds a new array with twice the room and copies every item across. We add $n = 10$ items and count the copies.",
    "steps": [
     "Each resize happens when the array is full. Adding item 2 copies 1 item into a room of 2. Adding item 3 copies 2 items into a room of 4. Adding item 5 copies 4 items into a room of 8. Adding item 9 copies 8 items into a room of 16.",
     "The copies form a geometric series with $r = 2$: $1 + 2 + 4 + 8$. That is 4 terms.",
     "Apply the formula with $r = 2$ and 4 terms: $\\frac{1 - 2^{4}}{1 - 2} = \\frac{1 - 16}{-1} = 15$ copies.",
     "Compare with the list size: $2 \\cdot 10 = 20$, and $15 < 20$. The copies stay below twice the number of items."
    ],
    "answer": "Inserting 10 items causes **15** copies in total, which is less than $2 \\cdot 10 = 20$. In general, doubling keeps the total copying below twice the number of items, so each insert costs about 2 copies or fewer on average."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/sum-of-first-n-integers/",
    "https://formulabro.yunusemrevurgun.com/computer-science/big-o-notation/",
    "https://formulabro.yunusemrevurgun.com/computer-science/binary-number-value/"
   ],
   "sources": [
    {
     "title": "Geometric series, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Geometric_series"
    },
    {
     "title": "Dynamic array, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Dynamic_array"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/permutations",
   "title": "Permutations",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/permutations/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/permutations.md",
   "latex": "P(n, k) = \\frac{n!}{(n-k)!}",
   "one_liner": "A permutation is an ordered arrangement, and this formula counts how many ways you can pick k items from n and line them up.",
   "read_aloud": "P of n, k, equals n factorial, divided by n minus k factorial.",
   "symbols": [
    {
     "latex": "P(n, k)",
     "meaning": "The number of permutations: the ordered ways to choose and arrange $k$ items out of $n$ different items."
    },
    {
     "latex": "n",
     "meaning": "How many different items are available."
    },
    {
     "latex": "k",
     "meaning": "How many items you pick and arrange. When items cannot repeat, $k$ cannot be larger than $n$."
    },
    {
     "latex": "n!",
     "meaning": "The factorial of $n$: $n \\cdot (n-1) \\cdots 2 \\cdot 1$. For example, $4! = 24$. By convention, $0! = 1$."
    },
    {
     "latex": "(n-k)!",
     "meaning": "The factorial of the number of items left out. Dividing by it cancels the orderings of the leftover part."
    }
   ],
   "worked_example": {
    "title": "Podium places in an 8-runner race",
    "setup": "Eight runners race, and the top three finishers take gold, silver and bronze. Those are different places, so order matters. Here $n = 8$ runners and $k = 3$ podium places.",
    "steps": [
     "Write the formula: $P(8, 3) = \\frac{8!}{(8-3)!} = \\frac{8!}{5!}$.",
     "Compute the factorials: $8! = 40{,}320$ and $5! = 120$.",
     "Divide: $\\frac{40{,}320}{120} = 336$.",
     "Check by filling the spots: gold has 8 choices, silver has 7 and bronze has 6, so $8 \\cdot 7 \\cdot 6 = 336$."
    ],
    "answer": "There are **336** different ways to fill gold, silver and bronze from 8 runners. Each different order of the top three is a different result."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/big-o-notation/",
    "https://formulabro.yunusemrevurgun.com/computer-science/bits-needed/",
    "https://formulabro.yunusemrevurgun.com/computer-science/sum-of-first-n-integers/"
   ],
   "sources": [
    {
     "title": "Permutation, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Permutation"
    },
    {
     "title": "Factorial, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Factorial"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/combinations",
   "title": "Combinations",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/combinations/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/combinations.md",
   "latex": "C(n,k) = \\binom{n}{k} = \\frac{n!}{k!\\,(n-k)!}",
   "one_liner": "A combination counts how many different groups you can pick from a set of items when the order of the picks does not matter.",
   "read_aloud": "C of n, k, equals n choose k, which equals n factorial divided by k factorial times n minus k factorial. The order of the picks does not matter.",
   "symbols": [
    {
     "latex": "C(n,k)",
     "meaning": "The number of **combinations**, read as 'n choose k'. It counts groups, so it has no unit. The same number is also written $\\binom{n}{k}$."
    },
    {
     "latex": "n",
     "meaning": "The total number of items to pick from. It is a whole number, 0 or more."
    },
    {
     "latex": "k",
     "meaning": "How many items you pick. It is a whole number from 0 to $n$."
    },
    {
     "latex": "n!",
     "meaning": "The **factorial** of $n$: $n \\times (n-1) \\times \\cdots \\times 2 \\times 1$. For example $4! = 24$. By convention, $0! = 1$."
    }
   ],
   "worked_example": {
    "title": "Picking a team of 3 from 5 friends",
    "setup": "You have 5 friends and want a team of 3 for a board game. The order you pick them in does not matter, so we need the number of combinations $C(5,3)$.",
    "steps": [
     "Count the ordered picks. The first pick has 5 choices, the second has 4 and the third has 3, so there are $5 \\cdot 4 \\cdot 3 = 60$ ordered picks.",
     "Count the orders inside one team. A team of 3 can be lined up in $3! = 3 \\cdot 2 \\cdot 1 = 6$ ways, so each team shows up 6 times among the 60.",
     "Divide out the repeats: $C(5,3) = \\frac{60}{6} = 10$.",
     "Check with the formula: $C(5,3) = \\frac{5!}{3!\\,2!} = \\frac{120}{6 \\cdot 2} = \\frac{120}{12} = 10$."
    ],
    "answer": "There are **10 different teams** of 3 friends. The ordered count of 60 is six times too big, because each team appears in six different orders."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/permutations/",
    "https://formulabro.yunusemrevurgun.com/computer-science/inclusion-exclusion-principle/",
    "https://formulabro.yunusemrevurgun.com/computer-science/pigeonhole-principle/"
   ],
   "sources": [
    {
     "title": "Combination, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Combination"
    },
    {
     "title": "Binomial coefficient, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Binomial_coefficient"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/pigeonhole-principle",
   "title": "Pigeonhole Principle",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/pigeonhole-principle/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/pigeonhole-principle.md",
   "latex": "\\max_{j}\\, b_j \\ge \\left\\lceil \\frac{n}{m} \\right\\rceil",
   "one_liner": "If you put more things than boxes into the boxes, at least one box must hold two or more things.",
   "read_aloud": "The largest number of items in any box is at least the ceiling of n over m. The ceiling means n divided by m, rounded up to the next whole number.",
   "symbols": [
    {
     "latex": "\\max_{j}\\, b_j",
     "meaning": "The number of items in the **fullest box**. The letter $j$ names a box, and $b_j$ is how many items box $j$ holds."
    },
    {
     "latex": "n",
     "meaning": "The number of items being placed into the boxes. It is a whole number."
    },
    {
     "latex": "m",
     "meaning": "The number of boxes. It is a whole number, at least 1."
    },
    {
     "latex": "\\left\\lceil x \\right\\rceil",
     "meaning": "The **ceiling** of $x$: $x$ rounded up to the next whole number. For example $\\lceil 2.08 \\rceil = 3$ and $\\lceil 4 \\rceil = 4$."
    }
   ],
   "worked_example": {
    "title": "Birthday months in a club",
    "setup": "A club has 25 members, and each one has a birthday in one of 12 months. The months are the boxes and the members are the items. What is the least number of members that the fullest month must hold?",
    "steps": [
     "Divide the members by the months: $\\frac{25}{12} \\approx 2.08$.",
     "Round up to the next whole number: $\\left\\lceil 2.08 \\right\\rceil = 3$.",
     "Check the reasoning. If every month held at most 2 members, the total would be at most $12 \\cdot 2 = 24$. But there are 25 members, so at least one month must hold 3."
    ],
    "answer": "The fullest month holds **at least 3 members**. The principle proves this for any club of 25 people, without knowing a single birthday."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/hash-table-load-factor/",
    "https://formulabro.yunusemrevurgun.com/computer-science/birthday-problem/",
    "https://formulabro.yunusemrevurgun.com/computer-science/combinations/"
   ],
   "sources": [
    {
     "title": "Pigeonhole principle, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Pigeonhole_principle"
    },
    {
     "title": "Floor and ceiling functions, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Floor_and_ceiling_functions"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/inclusion-exclusion-principle",
   "title": "Inclusion-Exclusion Principle",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/inclusion-exclusion-principle/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/inclusion-exclusion-principle.md",
   "latex": "|A \\cup B| = |A| + |B| - |A \\cap B|",
   "one_liner": "Inclusion-exclusion counts how many items belong to at least one group by adding the groups and then removing the overlaps that were counted twice.",
   "read_aloud": "The size of A union B equals the size of A, plus the size of B, minus the size of A intersect B.",
   "symbols": [
    {
     "latex": "|A \\cup B|",
     "meaning": "The number of items in **either** set $A$ or set $B$, or in both, with each item counted once. The vertical bars mean the size, or count, of a set."
    },
    {
     "latex": "|A|",
     "meaning": "The number of items in set $A$."
    },
    {
     "latex": "|B|",
     "meaning": "The number of items in set $B$."
    },
    {
     "latex": "|A \\cap B|",
     "meaning": "The number of items in **both** $A$ and $B$. Those items were counted in $|A|$ and again in $|B|$, so they are subtracted once."
    }
   ],
   "worked_example": {
    "title": "Students in three school activities",
    "setup": "A school has 60 students. Let $A$ be the chess club (30 students), $B$ the choir (25 students) and $C$ the robotics team (20 students). Overlaps: 10 students are in $A$ and $B$, 8 are in $A$ and $C$, 6 are in $B$ and $C$, and 4 are in all three. How many students are in at least one activity, and how many are in none?",
    "steps": [
     "Add the three single counts: $|A| + |B| + |C| = 30 + 25 + 20 = 75$.",
     "Subtract the three pairwise overlaps: $10 + 8 + 6 = 24$, so $75 - 24 = 51$.",
     "Add back the triple overlap: $51 + 4 = 55$. So $|A \\cup B \\cup C| = 55$.",
     "Students in no activity: $60 - 55 = 5$."
    ],
    "answer": "**55 students** are in at least one activity, and **5 students** are in none. The 4 students in all three activities are counted exactly once in the final total."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/de-morgans-laws/",
    "https://formulabro.yunusemrevurgun.com/computer-science/combinations/",
    "https://formulabro.yunusemrevurgun.com/computer-science/pigeonhole-principle/"
   ],
   "sources": [
    {
     "title": "Inclusion-exclusion principle, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Inclusion%E2%80%93exclusion_principle"
    },
    {
     "title": "Union (set theory), Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Union_(set_theory)"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/hash-table-load-factor",
   "title": "Hash Table Load Factor",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/hash-table-load-factor/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/hash-table-load-factor.md",
   "latex": "\\alpha = \\frac{n}{m}",
   "one_liner": "The load factor is how full a hash table is on average: the number of keys divided by the number of buckets.",
   "read_aloud": "alpha equals n over m. The load factor equals the number of keys divided by the number of buckets.",
   "symbols": [
    {
     "latex": "\\alpha",
     "meaning": "The **load factor**, a plain number with no unit. It says how many keys there are, on average, for each bucket."
    },
    {
     "latex": "n",
     "meaning": "The number of keys stored in the table."
    },
    {
     "latex": "m",
     "meaning": "The number of **buckets**, the slots that keys are sorted into by the hash function."
    }
   ],
   "worked_example": {
    "title": "A table with 80 keys",
    "setup": "A hash table has $m = 100$ buckets and stores $n = 80$ keys. It resizes when the load factor passes 0.75. We find the load factor now, and then the load factor after the table doubles.",
    "steps": [
     "Load factor now: $\\alpha = \\frac{80}{100} = 0.8$. That is above 0.75, so the table must resize.",
     "Average chain length with chaining: about 0.8 keys per bucket. An unsuccessful lookup checks about 0.8 keys on average.",
     "Double the buckets to $m = 200$. The load factor becomes $\\alpha = \\frac{80}{200} = 0.4$."
    ],
    "answer": "The load factor is **0.8**, which passes the 0.75 threshold, so the table doubles to 200 buckets. The load factor then drops to **0.4**, and a lookup checks about 0.4 keys on average."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/birthday-problem/",
    "https://formulabro.yunusemrevurgun.com/computer-science/pigeonhole-principle/",
    "https://formulabro.yunusemrevurgun.com/computer-science/bloom-filter-false-positive-rate/"
   ],
   "sources": [
    {
     "title": "Hash table, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Hash_table"
    },
    {
     "title": "HashMap (Java SE 21 documentation)",
     "url": "https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/HashMap.html"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/birthday-problem",
   "title": "Birthday Problem",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/birthday-problem/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/birthday-problem.md",
   "latex": "P(\\text{no collision}) = \\prod_{k=0}^{n-1}\\left(1 - \\frac{k}{N}\\right) \\approx e^{-n(n-1)/(2N)}",
   "one_liner": "The birthday problem asks how likely it is that some pair of items in a random group matches, and the answer rises faster than most people expect.",
   "read_aloud": "The chance of no collision equals the product, for k from 0 to n minus 1, of one minus k over N. That is roughly e to the power of minus n times n minus 1, over 2 N.",
   "symbols": [
    {
     "latex": "P(\\text{no collision})",
     "meaning": "The probability that every item gets a different value, so no two match. It is a number from 0 to 1. For birthdays, a collision is a shared birthday."
    },
    {
     "latex": "n",
     "meaning": "The number of items drawn at random, such as the number of people in a room."
    },
    {
     "latex": "N",
     "meaning": "The number of equally likely values, such as 365 birthdays in a year, or $2^{32}$ possible 32-bit hash values."
    },
    {
     "latex": "k",
     "meaning": "The counter in the product, running from 0 to $n-1$. The factor $1 - \\frac{k}{N}$ is the chance that the next item avoids the $k$ values already taken."
    },
    {
     "latex": "\\prod",
     "meaning": "Multiply together the factors for every $k$ from 0 to $n-1$."
    },
    {
     "latex": "e",
     "meaning": "Euler's number, about 2.718, the base of the natural logarithm."
    }
   ],
   "worked_example": {
    "title": "A shared birthday in a group of 23",
    "setup": "A group of $n = 23$ people is picked at random. Each birthday is one of $N = 365$ equally likely days, and leap years are ignored. What is the chance that at least two people share a birthday?",
    "steps": [
     "Chance that no two share a birthday: $P(\\text{no collision}) = \\prod_{k=0}^{22}\\left(1 - \\frac{k}{365}\\right) \\approx 0.4927$.",
     "Chance of at least one shared birthday: $1 - 0.4927 = 0.5073$, which is about **50.7%**.",
     "Shortcut: $e^{-23 \\cdot 22 / (2 \\cdot 365)} = e^{-0.6932} \\approx 0.5000$, which gives 50.0%. That is close to the exact value."
    ],
    "answer": "With only **23 people**, the chance of a shared birthday is about **50.7%**, which is more than even odds. With 50 people the chance rises to about 97%."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/pigeonhole-principle/",
    "https://formulabro.yunusemrevurgun.com/computer-science/hash-table-load-factor/",
    "https://formulabro.yunusemrevurgun.com/computer-science/bloom-filter-false-positive-rate/"
   ],
   "sources": [
    {
     "title": "Birthday problem, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Birthday_problem"
    },
    {
     "title": "Birthday attack, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Birthday_attack"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/bloom-filter-false-positive-rate",
   "title": "Bloom Filter False Positive Rate",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/bloom-filter-false-positive-rate/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/bloom-filter-false-positive-rate.md",
   "latex": "p \\approx \\left(1 - e^{-kn/m}\\right)^{k}",
   "one_liner": "The false positive rate of a Bloom filter is the chance that it wrongly says an item is present, and it depends on the bits, the items and the hash functions.",
   "read_aloud": "p is about one minus e to the power of minus k n over m, all raised to the power k. The best number of hash functions is m over n times the natural log of 2.",
   "symbols": [
    {
     "latex": "p",
     "meaning": "The **false positive rate**: the chance that the filter says an item is present when it was never added. It is a number from 0 to 1."
    },
    {
     "latex": "m",
     "meaning": "The number of bits in the filter's bit array."
    },
    {
     "latex": "n",
     "meaning": "The number of items added to the filter."
    },
    {
     "latex": "k",
     "meaning": "The number of hash functions. Each added item sets $k$ bits in the array."
    },
    {
     "latex": "e",
     "meaning": "Euler's number, about 2.718."
    },
    {
     "latex": "\\ln 2",
     "meaning": "The natural logarithm of 2, about 0.693. It sets the best number of hash functions, $k = \\frac{m}{n}\\ln 2$."
    }
   ],
   "worked_example": {
    "title": "A filter with 10,000 bits and 1,000 items",
    "setup": "A Bloom filter has $m = 10000$ bits and holds $n = 1000$ items. The best number of hash functions is $k = \\frac{m}{n}\\ln 2$, rounded to a whole number. We find $k$ and then the false positive rate $p$.",
    "steps": [
     "Best number of hash functions: $\\frac{10000}{1000} \\cdot \\ln 2 = 10 \\cdot 0.6931 \\approx 6.93$. Rounded to a whole number, $k = 7$.",
     "Fraction of bits set to 1 with $k = 7$: $1 - e^{-7 \\cdot 1000 / 10000} = 1 - e^{-0.7} \\approx 1 - 0.4966 = 0.5034$.",
     "False positive rate: $p \\approx (0.5034)^{7} \\approx 0.00819$, which is about 0.82%."
    ],
    "answer": "With 7 hash functions, about **0.82%** of items that were never added are reported as present. That is about 1 false alarm in every 122 checks."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/hash-table-load-factor/",
    "https://formulabro.yunusemrevurgun.com/computer-science/birthday-problem/",
    "https://formulabro.yunusemrevurgun.com/computer-science/modulo-operation/"
   ],
   "sources": [
    {
     "title": "Bloom filter, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Bloom_filter"
    },
    {
     "title": "Hash table, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Hash_table"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/modulo-operation",
   "title": "Modulo Operation",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/modulo-operation/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/modulo-operation.md",
   "latex": "a \\bmod n = a - n \\left\\lfloor \\frac{a}{n} \\right\\rfloor",
   "one_liner": "The modulo operation gives the leftover amount after you divide one whole number by another as many full times as you can.",
   "read_aloud": "a mod n equals a minus n times the floor of a over n. The floor means rounding down to the nearest whole number.",
   "symbols": [
    {
     "latex": "a \\bmod n",
     "meaning": "The **modulo**: the remainder after dividing $a$ by $n$. It has no unit. For a positive $n$, it is always between 0 and $n-1$."
    },
    {
     "latex": "a",
     "meaning": "The number being divided. It can be negative."
    },
    {
     "latex": "n",
     "meaning": "The divisor, a positive whole number."
    },
    {
     "latex": "\\left\\lfloor x \\right\\rfloor",
     "meaning": "The **floor** of $x$: the largest whole number less than or equal to $x$. The floor of $-2.33$ is $-3$."
    }
   ],
   "worked_example": {
    "title": "Days of the week and negative remainders",
    "setup": "Monday is day 0, Tuesday is day 1, and so on up to Sunday, which is day 6. We want the weekday 40 days after a Monday. We also check $-7 \\bmod 3$ to see how negative numbers behave.",
    "steps": [
     "Divide 40 by 7 and round down: $\\left\\lfloor \\frac{40}{7} \\right\\rfloor = 5$, since $\\frac{40}{7} \\approx 5.71$.",
     "Find the remainder: $40 \\bmod 7 = 40 - 7 \\cdot 5 = 5$.",
     "Count 5 days after Monday, which is day 0: Tuesday is 1, Wednesday 2, Thursday 3, Friday 4 and Saturday 5. So the answer is Saturday.",
     "Negative case with $n = 3$: $-7 \\bmod 3 = -7 - 3 \\cdot \\left\\lfloor \\frac{-7}{3} \\right\\rfloor = -7 - 3 \\cdot (-3) = 2$."
    ],
    "answer": "40 days after a Monday is a **Saturday**, since $40 \\bmod 7 = 5$. With the floored rule, $-7 \\bmod 3 = 2$, which lies between 0 and 2 as the rule promises."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/euclidean-algorithm-gcd/",
    "https://formulabro.yunusemrevurgun.com/computer-science/hash-table-load-factor/",
    "https://formulabro.yunusemrevurgun.com/computer-science/rsa-encryption/"
   ],
   "sources": [
    {
     "title": "Modulo, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Modulo"
    },
    {
     "title": "Floor and ceiling functions, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Floor_and_ceiling_functions"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/euclidean-algorithm-gcd",
   "title": "Euclidean Algorithm",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/euclidean-algorithm-gcd/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/euclidean-algorithm-gcd.md",
   "latex": "\\gcd(a, b) = \\gcd(b,\\ a \\bmod b), \\qquad \\gcd(a, 0) = a",
   "one_liner": "The Euclidean algorithm finds the largest number that divides two numbers evenly, by replacing the pair with a smaller pair again and again.",
   "read_aloud": "The greatest common divisor of a and b equals the greatest common divisor of b and a mod b. The greatest common divisor of a and zero is a.",
   "symbols": [
    {
     "latex": "\\gcd(a, b)",
     "meaning": "The **greatest common divisor**: the largest whole number that divides both $a$ and $b$ with no remainder. It has no unit."
    },
    {
     "latex": "a",
     "meaning": "A whole number, 0 or more. It is the first number in the pair."
    },
    {
     "latex": "b",
     "meaning": "A whole number, 0 or more. The rule replaces the pair $(a, b)$ with the smaller pair $(b, a \\bmod b)$."
    },
    {
     "latex": "a \\bmod b",
     "meaning": "The remainder when $a$ is divided by $b$. It is always less than $b$, which is why the numbers keep shrinking."
    }
   ],
   "worked_example": {
    "title": "GCD of 48 and 18",
    "setup": "We want the greatest common divisor of $a = 48$ and $b = 18$. The algorithm repeats the rule until the remainder is 0.",
    "steps": [
     "Divide 48 by 18: $48 = 2 \\cdot 18 + 12$, so $48 \\bmod 18 = 12$. Then $\\gcd(48, 18) = \\gcd(18, 12)$.",
     "Divide 18 by 12: $18 = 1 \\cdot 12 + 6$, so $18 \\bmod 12 = 6$. Then $\\gcd(18, 12) = \\gcd(12, 6)$.",
     "Divide 12 by 6: $12 = 2 \\cdot 6 + 0$, so $12 \\bmod 6 = 0$. Then $\\gcd(12, 6) = \\gcd(6, 0)$.",
     "Use $\\gcd(a, 0) = a$: $\\gcd(6, 0) = 6$."
    ],
    "answer": "The greatest common divisor of 48 and 18 is **6**. The algorithm needed 3 division steps, and it never listed a single divisor."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/modulo-operation/",
    "https://formulabro.yunusemrevurgun.com/computer-science/rsa-encryption/"
   ],
   "sources": [
    {
     "title": "Euclidean algorithm, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Euclidean_algorithm"
    },
    {
     "title": "Euclid's Elements, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Euclid%27s_Elements"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/rsa-encryption",
   "title": "RSA Encryption",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/rsa-encryption/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/rsa-encryption.md",
   "latex": "c = m^{e} \\bmod n, \\qquad m = c^{d} \\bmod n",
   "one_liner": "RSA lets anyone lock a message with a public key while only the owner can unlock it with a private key, because undoing a product of two secret primes is very hard.",
   "read_aloud": "c equals m to the power e, mod n. To decrypt, m equals c to the power d, mod n. Here n is p times q, and e times d is one more than a multiple of phi of n.",
   "symbols": [
    {
     "latex": "c",
     "meaning": "The **ciphertext**, the scrambled whole number that is sent. It is between 0 and $n-1$."
    },
    {
     "latex": "m",
     "meaning": "The **message**, written as a whole number between 0 and $n-1$. Text must be turned into numbers before it is encrypted."
    },
    {
     "latex": "e",
     "meaning": "The **public exponent**, shared with everyone. Real systems often use 65537, and the toy example below uses 17."
    },
    {
     "latex": "d",
     "meaning": "The **private exponent**, kept secret. It is the inverse of $e$ modulo $\\varphi(n)$."
    },
    {
     "latex": "n",
     "meaning": "The **modulus**, the product $n = pq$ of two secret primes. The public key is the pair $(n, e)$."
    },
    {
     "latex": "\\bmod n",
     "meaning": "Take the remainder after dividing by $n$. Every power in RSA is reduced mod $n$."
    },
    {
     "latex": "p, q",
     "meaning": "Two different secret prime numbers. Their product is $n$."
    },
    {
     "latex": "\\varphi(n)",
     "meaning": "**Euler's totient** of $n$. For $n = pq$ with primes $p$ and $q$, it equals $(p-1)(q-1)$."
    }
   ],
   "worked_example": {
    "title": "Toy RSA with p = 61 and q = 53",
    "setup": "Use two small primes, $p = 61$ and $q = 53$. The public key is $(n, e) = (3233, 17)$ and the private exponent is $d = 2753$. Encrypt the message $m = 65$ and then decrypt the result.",
    "steps": [
     "Modulus and totient: $n = pq = 61 \\cdot 53 = 3233$ and $\\varphi(n) = (61 - 1)(53 - 1) = 60 \\cdot 52 = 3120$.",
     "Check the exponents: $e \\cdot d = 17 \\cdot 2753 = 46801$, and $46801 = 15 \\cdot 3120 + 1$. So $ed \\equiv 1 \\pmod{3120}$.",
     "Encrypt: $c = 65^{17} \\bmod 3233 = 2790$. The computer reduces mod 3233 along the way, so the huge power is never written out in full.",
     "Decrypt: $m = 2790^{2753} \\bmod 3233 = 65$, which is the original message."
    ],
    "answer": "The ciphertext is **2790**. Decrypting it with $d = 2753$ returns the original message **65**. These numbers are tiny, so anyone who can factor 3233 can break this key, which is why real keys are far larger."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/modulo-operation/",
    "https://formulabro.yunusemrevurgun.com/computer-science/euclidean-algorithm-gcd/",
    "https://formulabro.yunusemrevurgun.com/computer-science/password-entropy/"
   ],
   "sources": [
    {
     "title": "RSA cryptosystem, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/RSA_cryptosystem"
    },
    {
     "title": "Euler's totient function, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Euler%27s_totient_function"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/hamming-distance",
   "title": "Hamming Distance",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/hamming-distance/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/hamming-distance.md",
   "latex": "d(x, y) = \\sum_{i=1}^{n} [x_i \\ne y_i]",
   "one_liner": "Hamming distance counts how many positions two equal-length codes differ in, and that count tells you how many errors a code can catch.",
   "read_aloud": "d of x, y equals the sum, for i from 1 to n, of one if x sub i is not equal to y sub i, and zero if they are equal.",
   "symbols": [
    {
     "latex": "d(x, y)",
     "meaning": "The Hamming distance between the strings $x$ and $y$: the number of positions where they differ. It has no unit."
    },
    {
     "latex": "x",
     "meaning": "The first string, a list of $n$ symbols such as bits (0 or 1)."
    },
    {
     "latex": "y",
     "meaning": "The second string. It must have the same length as $x$."
    },
    {
     "latex": "n",
     "meaning": "The length of both strings, which is the number of positions compared."
    },
    {
     "latex": "i",
     "meaning": "The position being checked, counted from 1 to $n$."
    },
    {
     "latex": "x_i",
     "meaning": "The symbol in position $i$ of $x$, such as the bit 0 or 1."
    },
    {
     "latex": "y_i",
     "meaning": "The symbol in position $i$ of $y$."
    },
    {
     "latex": "[x_i \\ne y_i]",
     "meaning": "The Iverson bracket. It is 1 when the two symbols differ and 0 when they match."
    },
    {
     "latex": "\\sum_{i=1}^{n}",
     "meaning": "Add up the values for every position from 1 to $n$."
    }
   ],
   "worked_example": {
    "title": "Distance between two 7-bit codewords",
    "setup": "Compare the binary words $x = 1011101$ and $y = 1001001$. Both have $n = 7$ positions.",
    "steps": [
     "Line them up position by position: 1 vs 1, 0 vs 0, 1 vs 0, 1 vs 1, 1 vs 0, 0 vs 0, 1 vs 1.",
     "Only positions 3 and 5 differ, so $[x_3 \\ne y_3] = 1$ and $[x_5 \\ne y_5] = 1$, and every other term is 0.",
     "Add the terms: $d(x, y) = 0 + 0 + 1 + 0 + 1 + 0 + 0 = 2$.",
     "Check with XOR, which gives 1 exactly where the bits differ: $1011101 \\oplus 1001001 = 0010100$. That binary value is 20 in decimal and has two 1 bits."
    ],
    "answer": "The two words differ in **2 positions**, so $d(x, y) = 2$. A code with minimum distance 2 can detect a single flipped bit, but it cannot correct it."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/binary-number-value/",
    "https://formulabro.yunusemrevurgun.com/computer-science/shannon-entropy/",
    "https://formulabro.yunusemrevurgun.com/computer-science/shannon-hartley-theorem/"
   ],
   "sources": [
    {
     "title": "Hamming distance, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Hamming_distance"
    },
    {
     "title": "Error detection and correction, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Error_detection_and_correction"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/password-entropy",
   "title": "Password Entropy",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/password-entropy/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/password-entropy.md",
   "latex": "H = L \\log_2 N",
   "one_liner": "Password entropy is a number of bits that measures how many possible passwords a random generator could have produced, and so how hard guessing one is.",
   "read_aloud": "H equals L times the base-2 logarithm of N. H is measured in bits.",
   "symbols": [
    {
     "latex": "H",
     "meaning": "The password entropy, in **bits**. Each extra bit doubles the number of possible passwords."
    },
    {
     "latex": "L",
     "meaning": "The length of the password: how many characters it has. Every character is chosen at random."
    },
    {
     "latex": "N",
     "meaning": "The number of symbols each character is picked from, such as 62 for lowercase letters, uppercase letters and digits together."
    },
    {
     "latex": "\\log_2",
     "meaning": "The base-2 logarithm. It turns a count of choices into a number of bits."
    }
   ],
   "worked_example": {
    "title": "An 8-character random password, then 12 characters",
    "setup": "Each character is picked at random from $N = 62$ symbols: 26 lowercase letters, 26 uppercase letters and 10 digits.",
    "steps": [
     "Bits per character: $\\log_2 62 \\approx 5.954$ bits.",
     "Eight characters: $H = 8 \\times 5.954 \\approx 47.63$ bits.",
     "Twelve characters: $H = 12 \\times 5.954 \\approx 71.45$ bits."
    ],
    "answer": "An 8-character random password has about **47.6 bits** of entropy. Four more random characters raise it to about **71.45 bits**, because each character adds about 5.95 bits."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/shannon-entropy/",
    "https://formulabro.yunusemrevurgun.com/computer-science/binary-number-value/",
    "https://formulabro.yunusemrevurgun.com/computer-science/hamming-distance/"
   ],
   "sources": [
    {
     "title": "Password strength, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Password_strength"
    },
    {
     "title": "Entropy (information theory), Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Entropy_(information_theory)"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/data-transfer-time",
   "title": "Data Transfer Time",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/data-transfer-time/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/data-transfer-time.md",
   "latex": "t = \\frac{S}{B}",
   "one_liner": "Data transfer time tells you how long a file takes to send: divide its size by the link's speed, using units that match.",
   "read_aloud": "t equals S divided by B. The time in seconds is the size of the data divided by the bandwidth, using matching units.",
   "symbols": [
    {
     "latex": "t",
     "meaning": "The transfer time, in **seconds**."
    },
    {
     "latex": "S",
     "meaning": "The size of the data, in **bits** or bytes. Use bits when $B$ is in bits per second."
    },
    {
     "latex": "B",
     "meaning": "The bandwidth: the rate the link can carry, in **bits per second**. Network speeds such as 100 Mbps are given in bits per second."
    }
   ],
   "worked_example": {
    "title": "Downloading a 500 MB file on a 100 Mbps link",
    "setup": "A 500 MB file is sent over a link that carries 100 megabits per second (100 Mbps). Ignore latency and protocol overhead.",
    "steps": [
     "Convert the size to bits: $500 \\text{ MB} \\times 8 = 4000 \\text{ Mb}$.",
     "Divide by the bandwidth: $t = \\frac{4000 \\text{ Mb}}{100 \\text{ Mb/s}} = 40 \\text{ s}$.",
     "Mixing units gives $\\frac{500}{100} = 5$ s, which is wrong by a factor of 8. A 50 ms latency would add only 0.05 s to the 40 s here."
    ],
    "answer": "The download takes about **40 seconds**. Dividing 500 MB by 100 Mbps directly would give 5 seconds, which is off by a factor of 8, because the size is in bytes and the speed is in bits."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/bandwidth-delay-product/",
    "https://formulabro.yunusemrevurgun.com/computer-science/shannon-hartley-theorem/",
    "https://formulabro.yunusemrevurgun.com/computer-science/binary-number-value/"
   ],
   "sources": [
    {
     "title": "Bit rate, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Bit_rate"
    },
    {
     "title": "Byte, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Byte"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/bandwidth-delay-product",
   "title": "Bandwidth-Delay Product",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/bandwidth-delay-product/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/bandwidth-delay-product.md",
   "latex": "\\text{BDP} = B \\times \\text{RTT}",
   "one_liner": "The bandwidth-delay product tells you how much data must be in transit at once to keep a network link full.",
   "read_aloud": "BDP equals B times RTT. The result is the amount of data that fills the link, in bits, or in bytes after dividing by eight.",
   "symbols": [
    {
     "latex": "\\text{BDP}",
     "meaning": "The bandwidth-delay product: the amount of data that can be in transit on the link at one time. Measure it in **bits**, or in **bytes** after dividing by 8."
    },
    {
     "latex": "B",
     "meaning": "The bandwidth, the link's rate, in **bits per second**."
    },
    {
     "latex": "\\text{RTT}",
     "meaning": "The round-trip time, in **seconds**: the time for a message to reach the other end and a reply to come back."
    },
    {
     "latex": "\\times",
     "meaning": "Multiply the rate by the time."
    }
   ],
   "worked_example": {
    "title": "A 100 Mbps link with a 50 ms round trip",
    "setup": "A link carries $B = 100$ Mbps, and the round-trip time is 50 ms, which is $\\text{RTT} = 0.05$ s.",
    "steps": [
     "Bits in flight: $\\text{BDP} = 100 \\times 10^6 \\text{ bit/s} \\times 0.05 \\text{ s} = 5 \\times 10^6$ bits.",
     "Bytes in flight: $\\frac{5 \\times 10^6}{8} = 625{,}000$ bytes.",
     "Window limit: the TCP window field is 16 bits, so without window scaling the window tops out at 65,535 bytes. Over 0.05 s that allows $\\frac{65{,}535 \\times 8}{0.05} \\approx 10.49 \\times 10^6$ bit/s, about 10.49 Mbps, far below the link's 100 Mbps."
    ],
    "answer": "The link needs about **625,000 bytes** (5 megabits) in flight to stay full. A 65,535-byte window would cap throughput near **10.49 Mbps** on this path, so window scaling is needed to use the full link."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/data-transfer-time/",
    "https://formulabro.yunusemrevurgun.com/computer-science/littles-law/",
    "https://formulabro.yunusemrevurgun.com/computer-science/shannon-hartley-theorem/"
   ],
   "sources": [
    {
     "title": "Bandwidth-delay product, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Bandwidth-delay_product"
    },
    {
     "title": "Transmission Control Protocol, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Transmission_Control_Protocol"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/nyquist-sampling-theorem",
   "title": "Nyquist Sampling Theorem",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/nyquist-sampling-theorem/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/nyquist-sampling-theorem.md",
   "latex": "f_s > 2 f_{\\max}",
   "one_liner": "The Nyquist sampling theorem tells you how fast you must sample a signal, at more than twice its highest frequency, to capture it without distortion.",
   "read_aloud": "f sub s is greater than two times f sub max. The sampling rate must be more than twice the highest frequency in the signal.",
   "symbols": [
    {
     "latex": "f_s",
     "meaning": "The sampling rate: how many samples are taken each second, in **hertz** (Hz)."
    },
    {
     "latex": "f_{\\max}",
     "meaning": "The highest frequency present in the signal, in **hertz**. A 20 kHz tone has $f_{\\max} = 20$ kHz."
    },
    {
     "latex": "2",
     "meaning": "A fixed factor. The sampling rate must be more than twice the highest frequency, which gives at least two samples per cycle."
    }
   ],
   "worked_example": {
    "title": "Sampling a 30 kHz tone on a CD at 44.1 kHz",
    "setup": "Compact disc audio uses a sampling rate of $f_s = 44.1$ kHz. We ask three questions: the highest frequency it can represent, the rate needed for 20 kHz, and what happens to a 30 kHz tone that is not filtered out.",
    "steps": [
     "Highest frequency that can be represented: $f_{\\max} = \\frac{f_s}{2} = \\frac{44.1}{2} = 22.05$ kHz.",
     "Minimum rate for hearing up to 20 kHz: $2 \\times 20 = 40$ kHz. Since $44.1 > 40$, the rule holds with room to spare.",
     "Alias of a 30 kHz tone: $|30 - 44.1| = 14.1$ kHz. Without filtering, the 30 kHz tone appears in the recording as 14.1 kHz."
    ],
    "answer": "The sampling rate can represent frequencies up to **22.05 kHz**. A 30 kHz tone above that limit folds down into the audible range as **14.1 kHz**, which is why audio is filtered before it is sampled."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/shannon-hartley-theorem/",
    "https://formulabro.yunusemrevurgun.com/computer-science/shannon-entropy/",
    "https://formulabro.yunusemrevurgun.com/computer-science/data-transfer-time/"
   ],
   "sources": [
    {
     "title": "Nyquist-Shannon sampling theorem, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem"
    },
    {
     "title": "Aliasing, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Aliasing"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/shannon-hartley-theorem",
   "title": "Shannon-Hartley Theorem",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/shannon-hartley-theorem/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/shannon-hartley-theorem.md",
   "latex": "C = B \\log_2\\left(1 + \\frac{S}{N}\\right)",
   "one_liner": "The Shannon-Hartley theorem gives the highest error-free bit rate a noisy channel can carry, from its bandwidth and how strong the signal is compared with the noise.",
   "read_aloud": "C equals B times the base-2 logarithm of one plus S over N. C is the channel capacity in bits per second.",
   "symbols": [
    {
     "latex": "C",
     "meaning": "The channel capacity: the highest error-free bit rate the channel can carry, in **bits per second**."
    },
    {
     "latex": "B",
     "meaning": "The bandwidth of the channel, in **hertz** (Hz)."
    },
    {
     "latex": "S",
     "meaning": "The average power of the signal, in **watts**."
    },
    {
     "latex": "N",
     "meaning": "The average power of the noise, in **watts**."
    },
    {
     "latex": "\\frac{S}{N}",
     "meaning": "The signal-to-noise ratio, a plain number with no unit. Because it is a ratio of powers, 1000 means the signal is 1000 times as strong as the noise."
    },
    {
     "latex": "\\log_2",
     "meaning": "The base-2 logarithm. Using base 2 makes the answer count bits."
    }
   ],
   "worked_example": {
    "title": "A 3 kHz phone line with a 30 dB signal-to-noise ratio",
    "setup": "A voice channel has bandwidth $B = 3000$ Hz. Its signal-to-noise ratio is 30 dB.",
    "steps": [
     "Convert decibels to a plain ratio: $\\frac{S}{N} = 10^{30/10} = 10^{3} = 1000$.",
     "Compute the logarithm: $\\log_2(1 + 1000) = \\log_2 1001 \\approx 9.9672$.",
     "Multiply by the bandwidth: $C = 3000 \\times 9.9672 \\approx 29{,}902$ bits per second.",
     "Double the bandwidth to 6000 Hz: $C = 6000 \\times 9.9672 \\approx 59{,}803$ bits per second."
    ],
    "answer": "The channel can carry at most about **29.9 kilobits per second**. Doubling the bandwidth doubles that limit to about **59.8 kilobits per second**, if the signal-to-noise ratio stays the same."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/nyquist-sampling-theorem/",
    "https://formulabro.yunusemrevurgun.com/computer-science/shannon-entropy/",
    "https://formulabro.yunusemrevurgun.com/computer-science/bandwidth-delay-product/"
   ],
   "sources": [
    {
     "title": "Shannon-Hartley theorem, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Shannon%E2%80%93Hartley_theorem"
    },
    {
     "title": "Decibel, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Decibel"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/average-memory-access-time",
   "title": "Average Memory Access Time",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/average-memory-access-time/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/average-memory-access-time.md",
   "latex": "\\text{AMAT} = t_{\\text{hit}} + r_{\\text{miss}} \\times t_{\\text{penalty}}",
   "one_liner": "Average memory access time, or AMAT, is the average time one memory read takes, given how often the cache finds the data and how costly a miss is.",
   "read_aloud": "AMAT equals the hit time plus the miss rate times the miss penalty. Use the same time unit for both times.",
   "symbols": [
    {
     "latex": "\\text{AMAT}",
     "meaning": "The average time for one memory access, in the same unit as the times below, such as nanoseconds or clock cycles."
    },
    {
     "latex": "t_{\\text{hit}}",
     "meaning": "The time to read data that is already in the cache: the hit time."
    },
    {
     "latex": "r_{\\text{miss}}",
     "meaning": "The miss rate: the fraction of accesses that are not found in the cache. It is a number from 0 to 1, so 5% is 0.05."
    },
    {
     "latex": "t_{\\text{penalty}}",
     "meaning": "The miss penalty: the extra time to fetch the data from the next, slower level of memory after a miss."
    },
    {
     "latex": "\\times",
     "meaning": "Multiply the miss rate by the miss penalty."
    }
   ],
   "worked_example": {
    "title": "A cache with a 5% miss rate and a 100 ns penalty",
    "setup": "A cache has a hit time of $t_{\\text{hit}} = 1$ ns. Five percent of accesses miss, so $r_{\\text{miss}} = 0.05$. A miss costs $t_{\\text{penalty}} = 100$ ns to fetch from main memory.",
    "steps": [
     "Average cost of misses: $r_{\\text{miss}} \\times t_{\\text{penalty}} = 0.05 \\times 100 = 5$ ns.",
     "Add the hit time: $\\text{AMAT} = 1 + 5 = 6$ ns."
    ],
    "answer": "The average memory access takes **6 ns**, six times the 1 ns hit time. Only 5% of accesses miss, but those misses add 5 ns to the average."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/cpu-time-equation/",
    "https://formulabro.yunusemrevurgun.com/computer-science/amdahls-law/"
   ],
   "sources": [
    {
     "title": "Cache (computing), Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Cache_(computing)"
    },
    {
     "title": "CPU cache, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/CPU_cache"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/cpu-time-equation",
   "title": "CPU Time Equation",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/cpu-time-equation/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/cpu-time-equation.md",
   "latex": "T_{\\text{CPU}} = IC \\times CPI \\times t_{\\text{clock}} = \\frac{IC \\times CPI}{f}",
   "one_liner": "The CPU time equation tells you how long a program takes on a processor, from how many instructions it runs, how many cycles each one needs and how fast the clock ticks.",
   "read_aloud": "T CPU equals I C times C P I times t clock, which is the same as I C times C P I divided by f. The result is in seconds.",
   "symbols": [
    {
     "latex": "T_{\\text{CPU}}",
     "meaning": "The CPU time: the number of **seconds** the processor spends running the program."
    },
    {
     "latex": "IC",
     "meaning": "The instruction count: how many instructions the program executes. It is a count, with no unit."
    },
    {
     "latex": "CPI",
     "meaning": "Cycles per instruction: the average number of clock cycles one instruction takes in this program. It has no unit."
    },
    {
     "latex": "t_{\\text{clock}}",
     "meaning": "The clock period: the length of one clock cycle, in **seconds**. It equals $\\frac{1}{f}$."
    },
    {
     "latex": "f",
     "meaning": "The clock frequency, in **hertz** (cycles per second). A 2 GHz clock has $f = 2 \\times 10^9$ Hz."
    }
   ],
   "worked_example": {
    "title": "A program of 4 billion instructions on a 2 GHz processor",
    "setup": "A program runs $IC = 4 \\times 10^9$ instructions with an average $CPI = 1.2$ on a processor with a clock of $f = 2$ GHz, which is $2 \\times 10^9$ cycles per second.",
    "steps": [
     "Total cycles: $IC \\times CPI = 4 \\times 10^9 \\times 1.2 = 4.8 \\times 10^9$ cycles.",
     "Clock period: $t_{\\text{clock}} = \\frac{1}{2 \\times 10^9}$ s $= 0.5$ ns.",
     "CPU time: $T_{\\text{CPU}} = \\frac{4.8 \\times 10^9}{2 \\times 10^9} = 2.4$ s.",
     "The same program on a 4 GHz clock: $T_{\\text{CPU}} = \\frac{4.8 \\times 10^9}{4 \\times 10^9} = 1.2$ s."
    ],
    "answer": "The program takes **2.4 seconds** on the 2 GHz processor. Doubling the clock to 4 GHz halves the time to **1.2 seconds**, if the instruction count and CPI stay the same."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/amdahls-law/",
    "https://formulabro.yunusemrevurgun.com/computer-science/average-memory-access-time/",
    "https://formulabro.yunusemrevurgun.com/computer-science/littles-law/"
   ],
   "sources": [
    {
     "title": "Cycles per instruction, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Cycles_per_instruction"
    },
    {
     "title": "Iron law of processor performance, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Iron_law_of_processor_performance"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/gustafsons-law",
   "title": "Gustafson's Law",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/gustafsons-law/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/gustafsons-law.md",
   "latex": "S = N - s\\,(N - 1)",
   "one_liner": "Gustafson's law estimates how much more work a parallel computer finishes in the same time when the job grows with the number of processors.",
   "read_aloud": "S equals N minus s times the quantity N minus 1. S is the scaled speedup, N is the number of processors, and s is the serial fraction of the parallel run.",
   "symbols": [
    {
     "latex": "S",
     "meaning": "The scaled speedup: how many times longer one processor would take to do the same enlarged job. A value of 7.3 means the parallel run finishes about 7.3 times as much work in the same time."
    },
    {
     "latex": "N",
     "meaning": "The number of processors working in parallel. For example $N = 8$ means eight processors."
    },
    {
     "latex": "s",
     "meaning": "The serial fraction: the share of the parallel run's time spent on work that cannot be split, from 0 to 1. For example $s = 0.1$ means 10% of the run is serial."
    }
   ],
   "worked_example": {
    "title": "A parallel run on 8 processors with 10% serial work",
    "setup": "A program runs on $N = 8$ processors. On this parallel run, 10% of the time is serial work, so $s = 0.1$. The same 0.1 is used in Amdahl's law below only so the two answers can be compared.",
    "steps": [
     "Parallel share on each processor: $1 - s = 1 - 0.1 = 0.9$ of the parallel run time.",
     "Time one processor needs for the same job: the serial part once, plus $N(1 - s) = 8 \\cdot 0.9 = 7.2$ for all the parallel work. The total is $0.1 + 7.2 = 7.3$ time units.",
     "Formula check: $S = N - s(N - 1) = 8 - 0.1 \\cdot 7 = 8 - 0.7 = 7.3$.",
     "Amdahl's law for the same 10% serial share and a fixed job: $S = \\frac{1}{s + \\frac{1 - s}{N}} = \\frac{1}{0.1 + 0.1125} \\approx 4.71$."
    ],
    "answer": "With 8 processors and 10% serial work, one processor would take about **7.3 times** as long to do the same enlarged job. If the job must stay the same size, Amdahl's law gives only about **4.71 times** speedup for the same 10% serial share."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/amdahls-law/",
    "https://formulabro.yunusemrevurgun.com/computer-science/littles-law/"
   ],
   "sources": [
    {
     "title": "Gustafson's law, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Gustafson%27s_law"
    },
    {
     "title": "Amdahl's law, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Amdahl%27s_law"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/system-availability",
   "title": "System Availability",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/system-availability/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/system-availability.md",
   "latex": "A = \\frac{\\text{MTBF}}{\\text{MTBF} + \\text{MTTR}}",
   "one_liner": "System availability tells you the fraction of time a system is working, based on how often it breaks and how long the repair takes.",
   "read_aloud": "A equals MTBF divided by the quantity MTBF plus MTTR. A is availability, MTBF is the mean time between failures, and MTTR is the mean time to repair.",
   "symbols": [
    {
     "latex": "A",
     "meaning": "Availability: the fraction of time the system is up and working, from 0 to 1. Multiply by 100 to get a percentage, so 0.998 means 99.8%."
    },
    {
     "latex": "\\text{MTBF}",
     "meaning": "Mean time between failures: the average time the system runs before it fails, in hours for example. Larger is better."
    },
    {
     "latex": "\\text{MTTR}",
     "meaning": "Mean time to repair: the average time needed to bring the system back after a failure. Use the same unit as MTBF."
    }
   ],
   "worked_example": {
    "title": "One server that fails rarely",
    "setup": "A server fails on average every 1,000 hours of running, so $\\text{MTBF} = 1000$ hours. A repair takes 2 hours on average, so $\\text{MTTR} = 2$ hours.",
    "steps": [
     "One full cycle, from one failure to the next: $1000 + 2 = 1002$ hours on average.",
     "Availability: $A = \\frac{1000}{1002} \\approx 0.998$, which is 99.8%.",
     "Downtime per year: $(1 - A) \\times 8760 = \\frac{2}{1002} \\times 8760 \\approx 17.5$ hours.",
     "Compare with a 99.9% target, which allows $0.001 \\times 8760 = 8.76$ hours of downtime per year. This server would miss that target."
    ],
    "answer": "The server is up about **99.8%** of the time, which is about **17.5 hours** of downtime per year. That is more than the 8.76 hours allowed by a 99.9% target, so the server would miss it."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/mm1-queue/",
    "https://formulabro.yunusemrevurgun.com/computer-science/gustafsons-law/"
   ],
   "sources": [
    {
     "title": "Reliability engineering, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Reliability_engineering"
    },
    {
     "title": "Mean time between failures, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Mean_time_between_failures"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/mm1-queue",
   "title": "M/M/1 Queue",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/mm1-queue/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/mm1-queue.md",
   "latex": "W = \\frac{1}{\\mu - \\lambda}",
   "one_liner": "The M/M/1 formula tells you how long, on average, an item spends in a line with one server, based on how fast items arrive and how fast the server works.",
   "read_aloud": "W equals one divided by the quantity mu minus lambda. W is the average time an item spends in the system, mu is the service rate, and lambda is the arrival rate.",
   "symbols": [
    {
     "latex": "W",
     "meaning": "The average time one item spends in the system, from arrival until it is served, including any waiting. Use the same time unit as the rates, such as seconds."
    },
    {
     "latex": "\\lambda",
     "meaning": "The arrival rate: how many items arrive per unit of time, such as requests per second. Must be smaller than $\\mu$."
    },
    {
     "latex": "\\mu",
     "meaning": "The service rate: how many items the server can finish per unit of time, in the same units as $\\lambda$, such as requests per second."
    },
    {
     "latex": "\\rho",
     "meaning": "The utilization: the fraction of time the server is busy, $\\rho = \\frac{\\lambda}{\\mu}$. It has no unit and must be below 1."
    },
    {
     "latex": "L",
     "meaning": "The average number of items in the system at one moment, waiting or being served. $L = \\frac{\\rho}{1 - \\rho}$."
    }
   ],
   "worked_example": {
    "title": "One server handling 8 requests per second",
    "setup": "Requests arrive at $\\lambda = 8$ per second, and the server can finish $\\mu = 10$ requests per second. Both rates use the same unit, so the times come out in seconds.",
    "steps": [
     "Utilization: $\\rho = \\frac{\\lambda}{\\mu} = \\frac{8}{10} = 0.8$, so the server is busy 80% of the time.",
     "Average time in the system: $W = \\frac{1}{\\mu - \\lambda} = \\frac{1}{10 - 8} = 0.5$ seconds.",
     "Average number in the system: $L = \\frac{\\rho}{1 - \\rho} = \\frac{0.8}{0.2} = 4$ requests.",
     "Little's law check: $\\lambda W = 8 \\cdot 0.5 = 4$, the same count.",
     "Heavier load for comparison: if requests arrive at 9.5 per second, then $W = \\frac{1}{10 - 9.5} = 2$ seconds."
    ],
    "answer": "The server is busy 80% of the time, each request spends **0.5 seconds** in the system on average, and about **4 requests** are in the system at any moment. A small rise in arrivals to 9.5 per second makes the average time jump to **2 seconds**."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/littles-law/",
    "https://formulabro.yunusemrevurgun.com/computer-science/system-availability/"
   ],
   "sources": [
    {
     "title": "M/M/1 queue, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/M/M/1_queue"
    },
    {
     "title": "Queueing theory, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Queueing_theory"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/perfect-binary-tree-nodes",
   "title": "Perfect Binary Tree Nodes",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/perfect-binary-tree-nodes/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/perfect-binary-tree-nodes.md",
   "latex": "N = 2^{h+1} - 1",
   "one_liner": "The formula counts the nodes in a perfect binary tree from its height, by doubling the number of nodes on each level.",
   "read_aloud": "N equals 2 to the power of h plus 1, minus 1. N is the number of nodes and h is the height of the tree.",
   "symbols": [
    {
     "latex": "N",
     "meaning": "The total number of nodes in the tree, counting the root, the inner nodes and the leaves."
    },
    {
     "latex": "h",
     "meaning": "The height of the tree: the number of edges on the longest path from the root down to a leaf. The root alone has height 0."
    }
   ],
   "worked_example": {
    "title": "A perfect binary tree of height 3",
    "setup": "A perfect binary tree has height $h = 3$. From the root, the longest path down to a leaf has 3 edges, so the tree has 4 levels, numbered 0 to 3.",
    "steps": [
     "Level 0, the root: $2^0 = 1$ node.",
     "Level 1: $2^1 = 2$ nodes.",
     "Level 2: $2^2 = 4$ nodes.",
     "Level 3, the leaves: $2^3 = 8$ nodes.",
     "Total: $1 + 2 + 4 + 8 = 15$ nodes.",
     "Formula in one step: $N = 2^{3+1} - 1 = 2^4 - 1 = 16 - 1 = 15$."
    ],
    "answer": "The tree has **15 nodes** in total, and **8 leaves** on its bottom level. The formula gives the total in one step, so you do not have to add up the levels."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/binary-search-steps/",
    "https://formulabro.yunusemrevurgun.com/computer-science/binary-number-value/",
    "https://formulabro.yunusemrevurgun.com/computer-science/eulers-formula-for-planar-graphs/"
   ],
   "sources": [
    {
     "title": "Binary tree, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Binary_tree"
    },
    {
     "title": "Tree (data structure), Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Tree_%28data_structure%29"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/complete-graph-edges",
   "title": "Complete Graph Edges",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/complete-graph-edges/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/complete-graph-edges.md",
   "latex": "E = \\frac{n(n-1)}{2}",
   "one_liner": "A complete graph joins every pair of points with one line, and this formula counts how many lines that takes.",
   "read_aloud": "E equals n times the quantity n minus 1, divided by 2. E is the number of edges and n is the number of vertices.",
   "symbols": [
    {
     "latex": "E",
     "meaning": "The number of edges: the lines that join pairs of vertices. Each edge joins exactly two vertices."
    },
    {
     "latex": "n",
     "meaning": "The number of vertices, the points or nodes of the graph. A complete graph with $n$ vertices is written $K_n$."
    }
   ],
   "worked_example": {
    "title": "Ten computers in a full mesh",
    "setup": "Ten computers are linked so that every computer has a direct cable to every other computer. That gives $n = 10$ vertices, and each cable is one edge.",
    "steps": [
     "Cables from one computer: $n - 1 = 10 - 1 = 9$.",
     "Cable ends across all computers: $n(n - 1) = 10 \\cdot 9 = 90$.",
     "Each cable has two ends, so the number of cables is $E = \\frac{90}{2} = 45$.",
     "Formula in one step: $E = \\frac{10 \\cdot 9}{2} = 45$."
    ],
    "answer": "The full mesh needs **45 cables**. Adding an eleventh computer raises the count to 55, so the new computer needs **10 new cables**, one to each machine already in the mesh."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/eulers-formula-for-planar-graphs/",
    "https://formulabro.yunusemrevurgun.com/computer-science/pagerank/",
    "https://formulabro.yunusemrevurgun.com/computer-science/perfect-binary-tree-nodes/"
   ],
   "sources": [
    {
     "title": "Complete graph, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Complete_graph"
    },
    {
     "title": "Handshaking lemma, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Handshaking_lemma"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/eulers-formula-for-planar-graphs",
   "title": "Euler's Formula for Planar Graphs",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/eulers-formula-for-planar-graphs/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/eulers-formula-for-planar-graphs.md",
   "latex": "V - E + F = 2",
   "one_liner": "Euler's formula says that if you draw a connected network on a flat sheet with no crossing lines, counting corners, lines and regions always gives 2.",
   "read_aloud": "V minus E plus F equals 2. V is the number of vertices, E is the number of edges, and F is the number of faces.",
   "symbols": [
    {
     "latex": "V",
     "meaning": "The number of vertices: the corner points or dots of the graph."
    },
    {
     "latex": "E",
     "meaning": "The number of edges: the lines that join the vertices. Each edge joins two vertices."
    },
    {
     "latex": "F",
     "meaning": "The number of faces: the regions the drawing cuts the plane into. The outer region outside the drawing counts as one face."
    }
   ],
   "worked_example": {
    "title": "A cube as a planar graph",
    "setup": "A cube has 8 corners, 12 edges and 6 square faces. Draw its frame on paper as one square inside another, with the corners joined. The outer region outside the drawing counts as one of the faces.",
    "steps": [
     "Vertices: $V = 8$ corners.",
     "Edges: $E = 12$ lines.",
     "Faces: $F = 6$ regions, which are the 4 trapezoids between the squares, the inner square and the outside.",
     "Euler's formula: $V - E + F = 8 - 12 + 6 = 2$.",
     "Solving for a missing count: if a connected planar graph has $V = 8$ and $E = 12$, then $F = 2 - 8 + 12 = 6$."
    ],
    "answer": "The cube frame gives $8 - 12 + 6 = 2$, as the formula says. Knowing any two of $V$, $E$ and $F$ tells you the third, so a connected planar drawing with 8 vertices and 12 edges must have **6 faces**."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/complete-graph-edges/",
    "https://formulabro.yunusemrevurgun.com/computer-science/pagerank/",
    "https://formulabro.yunusemrevurgun.com/computer-science/perfect-binary-tree-nodes/"
   ],
   "sources": [
    {
     "title": "Planar graph, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Planar_graph"
    },
    {
     "title": "Euler characteristic, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Euler_characteristic"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/pagerank",
   "title": "PageRank",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/pagerank/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/pagerank.md",
   "latex": "PR(p) = \\frac{1 - d}{N} + d \\sum_{q \\to p} \\frac{PR(q)}{L(q)}",
   "one_liner": "PageRank gives each web page a score based on how many good pages link to it, so each link acts like a vote with a weight.",
   "read_aloud": "PR of p equals one minus d, divided by N, plus d times the sum, over every page q that links to p, of PR of q divided by L of q. d is the damping factor, usually 0.85.",
   "symbols": [
    {
     "latex": "PR(p)",
     "meaning": "The PageRank of page $p$: its score. When all scores are scaled to add up to 1, each score is a number between 0 and 1."
    },
    {
     "latex": "N",
     "meaning": "The total number of pages in the set being ranked."
    },
    {
     "latex": "d",
     "meaning": "The damping factor, usually 0.85. It is the chance a random surfer follows a link instead of jumping to a random page."
    },
    {
     "latex": "q \\to p",
     "meaning": "The sum runs over every page $q$ that links to $p$, the incoming links."
    },
    {
     "latex": "PR(q)",
     "meaning": "The current score of a page $q$ that links to $p$."
    },
    {
     "latex": "L(q)",
     "meaning": "The number of outgoing links on page $q$, the links that leave it."
    }
   ],
   "worked_example": {
    "title": "Three pages that link to each other",
    "setup": "A tiny web has $N = 3$ pages: A, B and C. A links to B and C, B links to C, and C links to A. So $L(A) = 2$, $L(B) = 1$ and $L(C) = 1$. Start every page at $\\frac{1}{3}$, use $d = 0.85$, and work through one round of updates.",
    "steps": [
     "Base term for every page: $\\frac{1 - d}{N} = \\frac{0.15}{3} = 0.05$.",
     "Page A gets a vote only from C, since C links to A: $PR(A) = 0.05 + 0.85 \\cdot \\frac{1/3}{1} = 0.05 + 0.2833 = 0.3333$.",
     "Page B gets a vote only from A, which splits its score over 2 links: $PR(B) = 0.05 + 0.85 \\cdot \\frac{1/3}{2} = 0.05 + 0.1417 = 0.1917$.",
     "Page C gets votes from A, split two ways, and from B: $PR(C) = 0.05 + 0.85 \\cdot \\left(\\frac{1/3}{2} + \\frac{1/3}{1}\\right) = 0.05 + 0.85 \\cdot 0.5 = 0.475$.",
     "Check: $0.3333 + 0.1917 + 0.4750 = 1.0000$, so the scores still add up to 1."
    ],
    "answer": "After one round, C has the highest score, **0.475**, because two pages vote for it. A has **0.3333** and B has **0.1917**. The next round starts from these new scores, and they keep changing until they settle."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/tf-idf/",
    "https://formulabro.yunusemrevurgun.com/computer-science/complete-graph-edges/",
    "https://formulabro.yunusemrevurgun.com/computer-science/eulers-formula-for-planar-graphs/"
   ],
   "sources": [
    {
     "title": "PageRank, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/PageRank"
    },
    {
     "title": "Brin and Page, The Anatomy of a Large-Scale Hypertextual Web Search Engine (1998)",
     "url": "https://doi.org/10.1016/S0169-7552%2898%2900110-X"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "computer-science/tf-idf",
   "title": "TF-IDF",
   "category": "computer-science",
   "url": "https://formulabro.yunusemrevurgun.com/computer-science/tf-idf/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/computer-science/tf-idf.md",
   "latex": "\\text{tfidf}(t, d) = \\text{tf}(t, d) \\times \\ln\\frac{N}{\\text{df}(t)}",
   "one_liner": "TF-IDF gives a word a high score in a document when the word appears often there but rarely in the other documents.",
   "read_aloud": "tf-idf of t and d equals tf of t and d, times the natural log of N divided by df of t. t is a term, d is a document, and N is the number of documents.",
   "symbols": [
    {
     "latex": "t",
     "meaning": "A term: the word or phrase being scored, such as the word cat."
    },
    {
     "latex": "d",
     "meaning": "One document, such as one web page or one article."
    },
    {
     "latex": "N",
     "meaning": "The total number of documents in the collection."
    },
    {
     "latex": "\\text{tf}(t, d)",
     "meaning": "Term frequency: how many times term $t$ appears in document $d$. This page uses the raw count."
    },
    {
     "latex": "\\text{df}(t)",
     "meaning": "Document frequency: how many documents in the collection contain term $t$ at least once."
    },
    {
     "latex": "\\text{tfidf}(t, d)",
     "meaning": "The score of term $t$ in document $d$. A higher score means the word says more about that document."
    }
   ],
   "worked_example": {
    "title": "Two words in a collection of 100 documents",
    "setup": "A collection has $N = 100$ documents. The word cat appears in $\\text{df} = 4$ of them, and the word the appears in 99 of them. In one document $d$, cat appears 3 times and the appears 5 times. The log is the natural log.",
    "steps": [
     "Inverse document frequency of cat: $\\ln\\frac{100}{4} = \\ln 25 \\approx 3.2189$.",
     "TF-IDF of cat in $d$: $3 \\cdot 3.2189 \\approx 9.66$.",
     "Inverse document frequency of the: $\\ln\\frac{100}{99} \\approx 0.01005$.",
     "TF-IDF of the in $d$: $5 \\cdot 0.01005 \\approx 0.0503$."
    ],
    "answer": "The word **cat** scores about **9.66** in this document, while **the** scores about **0.0503**. Cat scores high because it is frequent here and rare across the collection. The scores almost zero for the, because it appears in nearly every document."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/computer-science/pagerank/",
    "https://formulabro.yunusemrevurgun.com/computer-science/shannon-entropy/"
   ],
   "sources": [
    {
     "title": "Tf-idf, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Tf%E2%80%93idf"
    },
    {
     "title": "Information retrieval, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Information_retrieval"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/ohms-law",
   "title": "Ohm's Law",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/ohms-law.md",
   "latex": "V = I R",
   "one_liner": "Ohm's law says the push on a wire, the voltage, equals the flow through it, the current, times how hard that flow is to get through, the resistance.",
   "read_aloud": "V equals I times R. Voltage equals current times resistance.",
   "symbols": [
    {
     "latex": "V",
     "meaning": "**Voltage**, the electrical push across the part, measured in volts (V). More voltage pushes more current through."
    },
    {
     "latex": "I",
     "meaning": "**Current**, the flow of electric charge through the part, measured in amperes (A). One ampere is one coulomb of charge per second."
    },
    {
     "latex": "R",
     "meaning": "**Resistance**, how strongly the part opposes the flow, measured in ohms ($\\Omega$). A bigger number means less current for the same voltage."
    }
   ],
   "worked_example": {
    "title": "Choosing a resistor for an LED on a 5 V supply",
    "setup": "A 5 V supply powers a red LED that drops 2 V when lit. The LED should run at 20 mA, which is the current the designer wants. The resistor in series with the LED takes the leftover voltage. What resistance should it be?",
    "steps": [
     "The resistor sees the supply voltage minus the LED voltage: $V_R = 5\\ \\text{V} - 2\\ \\text{V} = 3\\ \\text{V}$.",
     "Convert the current to amperes: $20\\ \\text{mA} = 0.02\\ \\text{A}$.",
     "Rearrange Ohm's law to $R = \\frac{V}{I}$ and fill in the numbers: $R = \\frac{3\\ \\text{V}}{0.02\\ \\text{A}} = 150\\ \\Omega$.",
     "Check the power the resistor turns into heat: $P = V_R \\times I = 3\\ \\text{V} \\times 0.02\\ \\text{A} = 0.06\\ \\text{W}$."
    ],
    "answer": "Use a **150 ohm** resistor. It drops the leftover 3 V, so the LED gets its 2 V and the circuit carries 20 mA. The resistor turns about 0.06 W into heat, so a standard 1/4 W resistor is enough."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/electric-power/",
    "https://formulabro.yunusemrevurgun.com/electricity/resistors-in-series-and-parallel/",
    "https://formulabro.yunusemrevurgun.com/electricity/kirchhoffs-current-law/"
   ],
   "sources": [
    {
     "title": "Ohm's law, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Ohm%27s_law"
    },
    {
     "title": "Electrical resistance and conductance, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electrical_resistance_and_conductance"
    },
    {
     "title": "Light-emitting diode, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Light-emitting_diode"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/electric-power",
   "title": "Electric Power",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/electric-power/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/electric-power.md",
   "latex": "P = V I",
   "one_liner": "Electric power tells you how fast a device uses energy, and you get it by multiplying the volts by the amps to get watts.",
   "read_aloud": "P equals V times I. Power in watts equals volts times amps.",
   "symbols": [
    {
     "latex": "P",
     "meaning": "**Power**, how fast electrical energy is used or delivered, measured in watts (W). One watt is one joule of energy per second."
    },
    {
     "latex": "V",
     "meaning": "**Voltage**, the electrical push across the device, measured in volts (V)."
    },
    {
     "latex": "I",
     "meaning": "**Current**, the flow of charge through the device, measured in amperes (A)."
    }
   ],
   "worked_example": {
    "title": "A 2000 W kettle on 230 V and on 120 V",
    "setup": "A kettle is rated at $P = 2000\\ \\text{W}$. Mains supplies vary by region: first the kettle runs on a 230 V supply, then the same 2000 W is needed from a 120 V supply. How much current does it draw in each case? Do not open the kettle to check; the wiring is at mains voltage.",
    "steps": [
     "Rearrange $P = V I$ to get the current: $I = \\frac{P}{V}$.",
     "On 230 V: $I = \\frac{2000\\ \\text{W}}{230\\ \\text{V}} \\approx 8.70\\ \\text{A}$.",
     "On 120 V: $I = \\frac{2000\\ \\text{W}}{120\\ \\text{V}} \\approx 16.7\\ \\text{A}$.",
     "Check the 230 V case: $8.70\\ \\text{A} \\times 230\\ \\text{V} = 2001\\ \\text{W}$, which is 2000 W with rounding."
    ],
    "answer": "The kettle draws about **8.70 A** on 230 V. The same 2000 W on 120 V draws about **16.7 A**, nearly twice the current, so the wiring has to carry much more current for the same power."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/energy-and-kilowatt-hours/",
    "https://formulabro.yunusemrevurgun.com/electricity/resistors-in-series-and-parallel/"
   ],
   "sources": [
    {
     "title": "Electric power, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electric_power"
    },
    {
     "title": "Watt, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Watt"
    },
    {
     "title": "Volt, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Volt"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/energy-and-kilowatt-hours",
   "title": "Energy and Kilowatt-Hours",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/energy-and-kilowatt-hours/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/energy-and-kilowatt-hours.md",
   "latex": "E = P \\, t",
   "one_liner": "Energy is power multiplied by time, so a heater that uses 2 kilowatts for 3 hours uses 6 kilowatt-hours of energy.",
   "read_aloud": "E equals P times t. Energy equals power times time.",
   "symbols": [
    {
     "latex": "E",
     "meaning": "**Energy**, the total amount of electricity used or delivered. Measured in joules (J), or in watt-hours (Wh) and kilowatt-hours (kWh) for electricity bills."
    },
    {
     "latex": "P",
     "meaning": "**Power**, how fast energy is used, measured in watts (W)."
    },
    {
     "latex": "t",
     "meaning": "**Time**, how long the device runs, measured in seconds (s) or hours (h), as long as the units match the power."
    }
   ],
   "worked_example": {
    "title": "A heater, an LED bulb and what they cost",
    "setup": "A 2000 W heater runs for 3 hours on a mains supply. A 10 W LED bulb runs for 10 hours. For the cost, use an example price of 0.15 dollars per kWh. This price is only for the arithmetic: it is not a real tariff, and real prices vary by country and provider. Heaters run on mains voltage, so do not open one to check it.",
    "steps": [
     "Heater energy: $E = P\\,t = 2000\\ \\text{W} \\times 3\\ \\text{h} = 6000\\ \\text{Wh} = 6\\ \\text{kWh}$.",
     "Heater cost at the example price: $6\\ \\text{kWh} \\times 0.15\\ \\frac{\\text{dollars}}{\\text{kWh}} = 0.90\\ \\text{dollars}$.",
     "LED energy: $E = 10\\ \\text{W} \\times 10\\ \\text{h} = 100\\ \\text{Wh} = 0.1\\ \\text{kWh}$.",
     "Check the unit: $1\\ \\text{kWh} = 1000\\ \\text{W} \\times 3600\\ \\text{s} = 3\\,600\\,000\\ \\text{J} = 3.6\\ \\text{MJ}$."
    ],
    "answer": "The 2000 W heater uses **6 kWh** and costs **0.90 dollars** at the example price. The 10 W LED bulb uses only **0.1 kWh**, even though it ran for longer. Power sets how fast energy is used, and time sets how much is used in total."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/electric-power/",
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/planck-einstein-relation/"
   ],
   "sources": [
    {
     "title": "Kilowatt-hour, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Kilowatt-hour"
    },
    {
     "title": "Watt-hour, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Watt-hour"
    },
    {
     "title": "Joule, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Joule"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/resistors-in-series-and-parallel",
   "title": "Resistors in Series and Parallel",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/resistors-in-series-and-parallel/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/resistors-in-series-and-parallel.md",
   "latex": "R_{\\text{series}} = R_1 + R_2 + \\cdots + R_n \\qquad \\frac{1}{R_{\\text{parallel}}} = \\frac{1}{R_1} + \\frac{1}{R_2} + \\cdots + \\frac{1}{R_n}",
   "one_liner": "Resistors in a line add up, and resistors side by side always give a total smaller than the smallest one.",
   "read_aloud": "R series equals R 1 plus R 2 plus all the way to R n. One over R parallel equals one over R 1 plus one over R 2 plus all the way to one over R n.",
   "symbols": [
    {
     "latex": "R_1",
     "meaning": "The resistance of the first resistor, in ohms ($\\Omega$)."
    },
    {
     "latex": "R_2",
     "meaning": "The resistance of the second resistor, in ohms ($\\Omega$)."
    },
    {
     "latex": "R_n",
     "meaning": "The resistance of the last resistor in the group, in ohms ($\\Omega$). The number $n$ counts how many resistors there are."
    },
    {
     "latex": "R_{\\text{series}}",
     "meaning": "The total resistance when the resistors are in series, in ohms ($\\Omega$)."
    },
    {
     "latex": "R_{\\text{parallel}}",
     "meaning": "The total resistance when the resistors are in parallel, in ohms ($\\Omega$)."
    }
   ],
   "worked_example": {
    "title": "A 100 ohm and a 300 ohm resistor",
    "setup": "Two resistors, $R_1 = 100\\ \\Omega$ and $R_2 = 300\\ \\Omega$, are used first in series and then in parallel. Find the total resistance in each case.",
    "steps": [
     "Series: $R_{\\text{series}} = 100\\ \\Omega + 300\\ \\Omega = 400\\ \\Omega$.",
     "Parallel, add the reciprocals: $\\frac{1}{R_{\\text{parallel}}} = \\frac{1}{100} + \\frac{1}{300} = \\frac{3}{300} + \\frac{1}{300} = \\frac{4}{300}$.",
     "Flip the fraction to get the resistance: $R_{\\text{parallel}} = \\frac{300}{4} = 75\\ \\Omega$.",
     "Check the shortcut: $\\frac{100 \\times 300}{100 + 300} = \\frac{30000}{400} = 75\\ \\Omega$, the same answer."
    ],
    "answer": "In series the total is **400 ohm**. In parallel the total is **75 ohm**, which is smaller than the smallest resistor, 100 ohm. The parallel path gives the current a second route, so the total drops."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/kirchhoffs-current-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/rc-time-constant/"
   ],
   "sources": [
    {
     "title": "Series and parallel circuits, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Series_and_parallel_circuits"
    },
    {
     "title": "Electrical resistance and conductance, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electrical_resistance_and_conductance"
    },
    {
     "title": "Electrical network, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electrical_network"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/kirchhoffs-current-law",
   "title": "Kirchhoff's Current Law",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/kirchhoffs-current-law/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/kirchhoffs-current-law.md",
   "latex": "\\sum I_{\\text{in}} = \\sum I_{\\text{out}}",
   "one_liner": "Kirchhoff's current law says that whatever electricity flows into a junction has to flow out again, because nothing piles up there.",
   "read_aloud": "The sum of the currents into a junction equals the sum of the currents out of it.",
   "symbols": [
    {
     "latex": "\\sum",
     "meaning": "The sum sign: add up every term of the kind that follows, for every wire that touches the junction."
    },
    {
     "latex": "I_{\\text{in}}",
     "meaning": "A current flowing **into** the junction, measured in amperes (A)."
    },
    {
     "latex": "I_{\\text{out}}",
     "meaning": "A current flowing **out of** the junction, measured in amperes (A)."
    },
    {
     "latex": "I",
     "meaning": "Any current in a wire, which is the flow of charge through that wire, measured in amperes (A). One ampere is one coulomb of charge per second."
    }
   ],
   "worked_example": {
    "title": "A junction with 5 A in, then a three-way split",
    "setup": "Step 1: 5 A flows into a junction on one wire, and 2 A leaves on a second wire. The current on the third wire, $I_3$, is unknown. Step 2: 10 A flows into a second junction and splits into three branches carrying 3 A and 4 A, and an unknown current $I_3$.",
    "steps": [
     "Step 1: write the balance. $5\\ \\text{A} = 2\\ \\text{A} + I_3$.",
     "Solve for the unknown: $I_3 = 5\\ \\text{A} - 2\\ \\text{A} = 3\\ \\text{A}$.",
     "Step 2: write the balance. $10\\ \\text{A} = 3\\ \\text{A} + 4\\ \\text{A} + I_3$.",
     "Solve for the unknown: $I_3 = 10\\ \\text{A} - 3\\ \\text{A} - 4\\ \\text{A} = 3\\ \\text{A}$.",
     "Check: the three outgoing currents add up to $3\\ \\text{A} + 4\\ \\text{A} + 3\\ \\text{A} = 10\\ \\text{A}$, which equals the 10 A that came in."
    ],
    "answer": "In step 1 the unknown wire carries **3 A**. In step 2 the third branch also carries **3 A**, so the three branches share the 10 A exactly. Charge is conserved at both junctions."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/resistors-in-series-and-parallel/",
    "https://formulabro.yunusemrevurgun.com/electricity/rc-time-constant/"
   ],
   "sources": [
    {
     "title": "Kirchhoff's circuit laws, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Kirchhoff%27s_circuit_laws"
    },
    {
     "title": "Electrical network, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electrical_network"
    },
    {
     "title": "Electric current, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electric_current"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/rc-time-constant",
   "title": "RC Time Constant",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/rc-time-constant/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/rc-time-constant.md",
   "latex": "\\tau = R C",
   "one_liner": "The RC time constant tells you how long a capacitor takes to fill up through a resistor: multiply the resistance by the capacitance.",
   "read_aloud": "Tau equals R times C. The time constant equals resistance times capacitance.",
   "symbols": [
    {
     "latex": "\\tau",
     "meaning": "The **time constant** (the Greek letter tau), measured in seconds (s). It sets how fast the capacitor charges or discharges."
    },
    {
     "latex": "R",
     "meaning": "**Resistance** of the resistor in the circuit, measured in ohms ($\\Omega$)."
    },
    {
     "latex": "C",
     "meaning": "**Capacitance**, how much charge the capacitor holds for each volt, measured in farads (F). A microfarad is $10^{-6}$ F."
    }
   ],
   "worked_example": {
    "title": "Charging a 100 microfarad capacitor through 10 kiloohm",
    "setup": "A 5 V supply charges a capacitor with $C = 100\\ \\mu\\text{F}$ through a resistor with $R = 10\\ \\text{k}\\Omega$, which is 10 000 ohm. Find the time constant, then the capacitor voltage after 1 s and after 5 s.",
    "steps": [
     "Time constant: $\\tau = R C = 10 \\times 10^{3}\\ \\Omega \\times 100 \\times 10^{-6}\\ \\text{F} = 1\\ \\text{s}$.",
     "Fraction charged after 1 s: $1 - e^{-1} \\approx 1 - 0.3679 = 0.632$, so 63.2%.",
     "Voltage after 1 s: $V_C(1\\ \\text{s}) = 5\\ \\text{V} \\times 0.632 \\approx 3.16\\ \\text{V}$.",
     "Fraction charged after 5 s: $1 - e^{-5} \\approx 1 - 0.0067 = 0.993$, so 99.3%.",
     "Voltage after 5 s: $V_C(5\\ \\text{s}) = 5\\ \\text{V} \\times 0.993 \\approx 4.97\\ \\text{V}$."
    ],
    "answer": "The time constant is **1 s**. After 1 s the capacitor is at **3.16 V**, which is 63.2% of 5 V. After 5 s it is at **4.97 V**, which is 99.3% of the supply, so it is almost fully charged."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/resistors-in-series-and-parallel/",
    "https://formulabro.yunusemrevurgun.com/electricity/kirchhoffs-current-law/"
   ],
   "sources": [
    {
     "title": "RC circuit, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/RC_circuit"
    },
    {
     "title": "Capacitor, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Capacitor"
    },
    {
     "title": "Exponential decay, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Exponential_decay"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/coulombs-law",
   "title": "Coulomb's Law",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/coulombs-law/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/coulombs-law.md",
   "latex": "F = k_e \\frac{|q_1 q_2|}{r^2}",
   "one_liner": "Coulomb's law tells you how hard two electric charges push or pull each other, and the force gets weaker fast as they move apart.",
   "read_aloud": "F equals k sub e times the size of q 1 times q 2, divided by r squared.",
   "symbols": [
    {
     "latex": "F",
     "meaning": "**Force** between the two charges, measured in newtons (N). The size is given by the formula; the sign of the charges gives the direction."
    },
    {
     "latex": "k_e",
     "meaning": "The **Coulomb constant**, $k_e = 8.9875517923 \\times 10^{9}\\ \\text{N}\\,\\text{m}^2/\\text{C}^2$. It sets the strength of the electric force in SI units."
    },
    {
     "latex": "q_1",
     "meaning": "The charge on the first object, measured in coulombs (C)."
    },
    {
     "latex": "q_2",
     "meaning": "The charge on the second object, measured in coulombs (C)."
    },
    {
     "latex": "r",
     "meaning": "The distance between the two charges, measured in meters (m)."
    }
   ],
   "worked_example": {
    "title": "Two 1 microcoulomb charges 10 cm apart",
    "setup": "Two positive point charges, each with $q = 1\\ \\mu\\text{C}$ (which is $1 \\times 10^{-6}$ C), sit 10 cm apart. Find the force between them, then the force when they are moved to 20 cm apart.",
    "steps": [
     "Convert the distance: $r = 10\\ \\text{cm} = 0.10\\ \\text{m}$, so $r^2 = 0.01\\ \\text{m}^2$.",
     "Multiply the charges: $|q_1 q_2| = (1 \\times 10^{-6}\\ \\text{C})(1 \\times 10^{-6}\\ \\text{C}) = 1 \\times 10^{-12}\\ \\text{C}^2$.",
     "Plug into the formula: $F = 8.9875517923 \\times 10^{9} \\times \\frac{10^{-12}}{0.01} \\approx 0.899\\ \\text{N}$.",
     "At 20 cm, $r^2 = 0.04\\ \\text{m}^2$ is four times bigger, so the force is one quarter: $F = \\frac{0.899\\ \\text{N}}{4} \\approx 0.225\\ \\text{N}$."
    ],
    "answer": "At 10 cm the two charges push each other apart with a force of about **0.899 N**. Like charges repel, so this force is repulsive. At 20 cm the force is about **0.225 N**, one quarter of the first."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/rc-time-constant/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/hydrogen-energy-levels/"
   ],
   "sources": [
    {
     "title": "Coulomb's law, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Coulomb%27s_law"
    },
    {
     "title": "Coulomb constant, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Coulomb_constant"
    },
    {
     "title": "Electric charge, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electric_charge"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/charge-and-current",
   "title": "Charge and Current",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/charge-and-current/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/charge-and-current.md",
   "latex": "I = \\frac{Q}{t}",
   "one_liner": "Electric current is how much charge passes a point each second, so the same charge moving faster means more current.",
   "read_aloud": "I equals Q over t. Current equals charge divided by time.",
   "symbols": [
    {
     "latex": "I",
     "meaning": "**Current**, the flow of electric charge past a point, measured in amperes (A). One ampere is one coulomb of charge per second."
    },
    {
     "latex": "Q",
     "meaning": "**Charge**, the amount of electric charge that has moved, measured in coulombs (C)."
    },
    {
     "latex": "t",
     "meaning": "**Time**, the length of time the charge takes to pass, measured in seconds (s)."
    },
    {
     "latex": "e",
     "meaning": "**Elementary charge**, the size of the charge on one electron, $e = 1.602176634 \\times 10^{-19}$ C. It is used to count electrons."
    }
   ],
   "worked_example": {
    "title": "How much charge flows through a wire",
    "setup": "A wire carries a steady current of 0.5 A for 4 seconds. How much charge passes any point in the wire, and how many electrons is that?",
    "steps": [
     "Find the charge with $Q = I t$: $Q = 0.5\\ \\text{A} \\times 4\\ \\text{s} = 2\\ \\text{C}$.",
     "Divide by the charge of one electron to count electrons: $N = \\frac{Q}{e} = \\frac{2\\ \\text{C}}{1.602 \\times 10^{-19}\\ \\text{C}} \\approx 1.25 \\times 10^{19}$.",
     "Check the other way: $I = \\frac{Q}{t} = \\frac{2\\ \\text{C}}{4\\ \\text{s}} = 0.5\\ \\text{A}$, which matches the start."
    ],
    "answer": "**2 coulombs** of charge pass each point in 4 seconds. That is about **$1.25 \\times 10^{19}$ electrons**, a huge number even for a small current."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/drift-velocity/",
    "https://formulabro.yunusemrevurgun.com/electricity/kirchhoffs-current-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/electric-power/"
   ],
   "sources": [
    {
     "title": "Electric current, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electric_current"
    },
    {
     "title": "Electric charge, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electric_charge"
    },
    {
     "title": "Ampere, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Ampere"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/kirchhoffs-voltage-law",
   "title": "Kirchhoff's Voltage Law",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/kirchhoffs-voltage-law/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/kirchhoffs-voltage-law.md",
   "latex": "\\sum_{k} V_k = 0",
   "one_liner": "Kirchhoff's voltage law says that if you walk all the way around a circuit loop, the voltage gained equals the voltage lost.",
   "read_aloud": "The sum over k of V sub k equals zero. Add up all the voltages around any closed loop, and the total is zero.",
   "symbols": [
    {
     "latex": "\\sum_{k}",
     "meaning": "The sum sign: add up the voltage of every element $k$ that you pass on the way around the loop."
    },
    {
     "latex": "V_k",
     "meaning": "The voltage across element $k$, measured in volts (V). Count it as positive when you walk through a rise, such as a battery pushing you up, and negative when you walk through a drop, such as a resistor."
    }
   ],
   "worked_example": {
    "title": "Finding the voltage across a second resistor",
    "setup": "A 12 V battery drives two resistors in series. The first resistor, $R_1 = 100\\ \\Omega$, has a voltage drop of 4 V across it. What is the voltage drop across the second resistor, and what is its resistance? The same current flows through both resistors.",
    "steps": [
     "Walk around the single loop from the battery's negative terminal, through the battery, the two resistors and back. The battery is a rise of $+12\\ \\text{V}$, the first resistor is a drop of $-4\\ \\text{V}$ and the second resistor is a drop of $-V_2$.",
     "Apply the voltage law: $12\\ \\text{V} - 4\\ \\text{V} - V_2 = 0$, so $V_2 = 8\\ \\text{V}$.",
     "Find the current from the first resistor with Ohm's law: $I = \\frac{4\\ \\text{V}}{100\\ \\Omega} = 0.04\\ \\text{A}$.",
     "Find the second resistance: $R_2 = \\frac{V_2}{I} = \\frac{8\\ \\text{V}}{0.04\\ \\text{A}} = 200\\ \\Omega$."
    ],
    "answer": "The second resistor has a drop of **8 V** and a resistance of **200 ohms**. The 12 V rise is exactly used up by the 4 V and 8 V drops, which is the voltage law at work."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/kirchhoffs-current-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/voltage-divider/",
    "https://formulabro.yunusemrevurgun.com/electricity/resistors-in-series-and-parallel/"
   ],
   "sources": [
    {
     "title": "Kirchhoff's circuit laws, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Kirchhoff%27s_circuit_laws"
    },
    {
     "title": "Voltage, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Voltage"
    },
    {
     "title": "Electric potential, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electric_potential"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/voltage-divider",
   "title": "Voltage Divider",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/voltage-divider/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/voltage-divider.md",
   "latex": "V_{\\text{out}} = V_{\\text{in}} \\frac{R_2}{R_1 + R_2}",
   "one_liner": "A voltage divider uses two resistors in series to take a smaller share of a supply voltage, with the share set by their ratio.",
   "read_aloud": "V out equals V in times R 2 over R 1 plus R 2. The output voltage is the input voltage times R 2 divided by the total of R 1 and R 2.",
   "symbols": [
    {
     "latex": "V_{\\text{out}}",
     "meaning": "The **output voltage**, the voltage across $R_2$, measured in volts (V)."
    },
    {
     "latex": "V_{\\text{in}}",
     "meaning": "The **input voltage**, the supply voltage across both resistors together, measured in volts (V)."
    },
    {
     "latex": "R_1",
     "meaning": "The resistance of the top resistor, between the input and the output, measured in ohms ($\\Omega$)."
    },
    {
     "latex": "R_2",
     "meaning": "The resistance of the bottom resistor, between the output and ground, measured in ohms ($\\Omega$)."
    }
   ],
   "worked_example": {
    "title": "A divider that halves the voltage, then loads it",
    "setup": "A 9 V supply feeds a divider with $R_1 = 20\\ \\text{k}\\Omega$ and $R_2 = 10\\ \\text{k}\\Omega$. First find the output with nothing connected. Then connect a sensor that draws as if it were a $10\\ \\text{k}\\Omega$ resistor from the output to ground, and find the new output.",
    "steps": [
     "Unloaded: $V_{\\text{out}} = V_{\\text{in}} \\frac{R_2}{R_1 + R_2} = 9\\ \\text{V} \\times \\frac{10\\ \\text{k}\\Omega}{20\\ \\text{k}\\Omega + 10\\ \\text{k}\\Omega} = 9\\ \\text{V} \\times \\frac{1}{3} = 3\\ \\text{V}$.",
     "Loaded: the sensor sits in parallel with $R_2$, so the bottom half becomes $\\frac{10 \\times 10}{10 + 10} = 5\\ \\text{k}\\Omega$.",
     "Use the same formula with the new bottom resistance: $V_{\\text{out}} = 9\\ \\text{V} \\times \\frac{5\\ \\text{k}\\Omega}{20\\ \\text{k}\\Omega + 5\\ \\text{k}\\Omega} = 9\\ \\text{V} \\times 0.2 = 1.8\\ \\text{V}$."
    ],
    "answer": "With nothing connected the output is **3 V**. With the 10 k$\\Omega$ sensor attached, the output falls to **1.8 V**, so the load pulled the output down by 1.2 V."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/current-divider/",
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/kirchhoffs-voltage-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/resistors-in-series-and-parallel/"
   ],
   "sources": [
    {
     "title": "Voltage divider, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Voltage_divider"
    },
    {
     "title": "Potentiometer, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Potentiometer"
    },
    {
     "title": "Electrical load, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electrical_load"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/current-divider",
   "title": "Current Divider",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/current-divider/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/current-divider.md",
   "latex": "I_1 = I_{\\text{total}} \\frac{R_2}{R_1 + R_2}",
   "one_liner": "A current divider splits a total current between two parallel resistors, and the smaller resistor always takes the bigger share.",
   "read_aloud": "I 1 equals I total times R 2 over R 1 plus R 2. The current in branch 1 is the total current times R 2 divided by the total of R 1 and R 2.",
   "symbols": [
    {
     "latex": "I_1",
     "meaning": "The **current through $R_1$**, the branch being found, measured in amperes (A)."
    },
    {
     "latex": "I_{\\text{total}}",
     "meaning": "The **total current** entering the pair of parallel resistors, measured in amperes (A)."
    },
    {
     "latex": "R_1",
     "meaning": "The resistance of the first branch, measured in ohms ($\\Omega$)."
    },
    {
     "latex": "R_2",
     "meaning": "The resistance of the second branch, measured in ohms ($\\Omega$)."
    }
   ],
   "worked_example": {
    "title": "Splitting 10 mA between a 100 ohm and a 400 ohm resistor",
    "setup": "A total current of 10 mA flows into two resistors in parallel, $R_1 = 100\\ \\Omega$ and $R_2 = 400\\ \\Omega$. Find the current in each branch.",
    "steps": [
     "Convert the total current: $I_{\\text{total}} = 10\\ \\text{mA} = 0.01\\ \\text{A}$.",
     "Find the current through $R_1$: $I_1 = I_{\\text{total}} \\frac{R_2}{R_1 + R_2} = 0.01\\ \\text{A} \\times \\frac{400\\ \\Omega}{500\\ \\Omega} = 0.008\\ \\text{A}$.",
     "Find the current through $R_2$: $I_2 = I_{\\text{total}} \\frac{R_1}{R_1 + R_2} = 0.01\\ \\text{A} \\times \\frac{100\\ \\Omega}{500\\ \\Omega} = 0.002\\ \\text{A}$.",
     "Check with Ohm's law: the parallel pair is $\\frac{100 \\times 400}{500} = 80\\ \\Omega$, so the shared voltage is $0.01\\ \\text{A} \\times 80\\ \\Omega = 0.8\\ \\text{V}$, and $0.8\\ \\text{V} / 100\\ \\Omega = 0.008\\ \\text{A}$ as before."
    ],
    "answer": "The 100 ohm branch carries **8 mA** and the 400 ohm branch carries **2 mA**. The smaller resistor takes four times the current, and the two branches add up to the 10 mA that came in."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/voltage-divider/",
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/resistors-in-series-and-parallel/",
    "https://formulabro.yunusemrevurgun.com/electricity/kirchhoffs-current-law/"
   ],
   "sources": [
    {
     "title": "Current divider, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Current_divider"
    },
    {
     "title": "Ammeter, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Ammeter"
    },
    {
     "title": "Series and parallel circuits, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Series_and_parallel_circuits"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/resistivity",
   "title": "Resistivity",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/resistivity/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/resistivity.md",
   "latex": "R = \\rho \\frac{L}{A}",
   "one_liner": "A wire's resistance grows with its length, shrinks with its thickness, and depends on what the wire is made of.",
   "read_aloud": "R equals rho times L over A. Resistance equals resistivity times length divided by cross-sectional area.",
   "symbols": [
    {
     "latex": "R",
     "meaning": "**Resistance** of the wire, measured in ohms ($\\Omega$)."
    },
    {
     "latex": "\\rho",
     "meaning": "**Resistivity**, a property of the material, measured in ohm metres ($\\Omega\\ \\text{m}$). Copper at 20 $^\\circ$C is about $1.68 \\times 10^{-8}\\ \\Omega\\ \\text{m}$."
    },
    {
     "latex": "L",
     "meaning": "**Length** of the wire along the direction of the current, measured in metres (m)."
    },
    {
     "latex": "A",
     "meaning": "**Cross-sectional area**, the area of a slice through the wire, measured in square metres (m$^2$). For a round wire, $A = \\pi r^2$ where $r$ is the radius."
    }
   ],
   "worked_example": {
    "title": "Resistance of a 10 m copper wire",
    "setup": "A copper wire is 10 m long and has a diameter of 1.0 mm, so its radius is 0.5 mm. Copper has a resistivity of $1.68 \\times 10^{-8}\\ \\Omega\\ \\text{m}$ at 20 $^\\circ$C. What is the resistance of the wire?",
    "steps": [
     "Convert the radius to metres: $r = 0.5\\ \\text{mm} = 0.0005\\ \\text{m}$.",
     "Find the cross-sectional area: $A = \\pi r^2 = \\pi \\times (0.0005\\ \\text{m})^2 \\approx 7.85 \\times 10^{-7}\\ \\text{m}^2$.",
     "Apply the formula: $R = \\rho \\frac{L}{A} = 1.68 \\times 10^{-8}\\ \\Omega\\ \\text{m} \\times \\frac{10\\ \\text{m}}{7.85 \\times 10^{-7}\\ \\text{m}^2} \\approx 0.214\\ \\Omega$."
    ],
    "answer": "The wire has a resistance of about **0.214 ohms**. Doubling its length would double this to about 0.43 ohms, and doubling its diameter would cut it to about 0.053 ohms."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/temperature-coefficient-of-resistance/",
    "https://formulabro.yunusemrevurgun.com/electricity/drift-velocity/",
    "https://formulabro.yunusemrevurgun.com/electricity/resistors-in-series-and-parallel/"
   ],
   "sources": [
    {
     "title": "Electrical resistivity and conductivity, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electrical_resistivity_and_conductivity"
    },
    {
     "title": "Electrical resistance and conductance, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electrical_resistance_and_conductance"
    },
    {
     "title": "Copper, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Copper"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/temperature-coefficient-of-resistance",
   "title": "Temperature Coefficient of Resistance",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/temperature-coefficient-of-resistance/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/temperature-coefficient-of-resistance.md",
   "latex": "R = R_0\\left[1 + \\alpha (T - T_0)\\right]",
   "one_liner": "Most metals get harder to push current through as they get hotter, and this formula estimates how much the resistance rises.",
   "read_aloud": "R equals R zero times the quantity one plus alpha times the quantity T minus T zero. Resistance at a temperature equals the reference resistance times one plus the coefficient times the temperature change.",
   "symbols": [
    {
     "latex": "R",
     "meaning": "**Resistance** at the new temperature $T$, measured in ohms ($\\Omega$)."
    },
    {
     "latex": "R_0",
     "meaning": "**Reference resistance**, the resistance measured at the reference temperature $T_0$, in ohms ($\\Omega$)."
    },
    {
     "latex": "\\alpha",
     "meaning": "**Temperature coefficient of resistance**, how fast the resistance changes per degree, in per degree Celsius (1/$^\\circ$C). Copper near 20 $^\\circ$C is about $0.00393$ per $^\\circ$C."
    },
    {
     "latex": "T",
     "meaning": "The **new temperature**, measured in degrees Celsius ($^\\circ$C)."
    },
    {
     "latex": "T_0",
     "meaning": "The **reference temperature** where $R_0$ was measured, usually 20 $^\\circ$C, in degrees Celsius ($^\\circ$C)."
    }
   ],
   "worked_example": {
    "title": "A copper coil heated from 20 to 70 degrees",
    "setup": "A copper coil has a resistance of 10 $\\Omega$ at 20 $^\\circ$C. Its temperature rises to 70 $^\\circ$C. Using $\\alpha = 0.00393$ per $^\\circ$C, what is its resistance now?",
    "steps": [
     "Find the temperature change: $T - T_0 = 70\\ ^\\circ\\text{C} - 20\\ ^\\circ\\text{C} = 50\\ ^\\circ\\text{C}$.",
     "Multiply by the coefficient: $\\alpha (T - T_0) = 0.00393 \\times 50 = 0.1965$, which is a 19.65% rise.",
     "Apply the formula: $R = R_0 [1 + 0.1965] = 10\\ \\Omega \\times 1.1965 \\approx 11.97\\ \\Omega$."
    ],
    "answer": "At 70 $^\\circ$C the coil has a resistance of about **11.97 ohms**, which is roughly 2 ohms more than at 20 $^\\circ$C. The estimate is good for this range of temperatures."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/resistivity/",
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/electric-power/",
    "https://formulabro.yunusemrevurgun.com/electricity/resistors-in-series-and-parallel/"
   ],
   "sources": [
    {
     "title": "Temperature coefficient, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Temperature_coefficient"
    },
    {
     "title": "Electrical resistivity and conductivity, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electrical_resistivity_and_conductivity"
    },
    {
     "title": "Resistance thermometer, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Resistance_thermometer"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/drift-velocity",
   "title": "Drift Velocity",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/drift-velocity/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/drift-velocity.md",
   "latex": "v_d = \\frac{I}{n q A}",
   "one_liner": "Electrons in a copper wire drift along at a fraction of a millimetre per second, even though the electric signal races along the wire.",
   "read_aloud": "v d equals I over n times q times A. Drift velocity equals current divided by the carrier density times the charge per carrier times the cross-sectional area.",
   "symbols": [
    {
     "latex": "v_d",
     "meaning": "**Drift velocity**, the average speed the charge carriers move along the wire, in metres per second (m/s)."
    },
    {
     "latex": "I",
     "meaning": "**Current** through the wire, measured in amperes (A)."
    },
    {
     "latex": "n",
     "meaning": "**Carrier density**, the number of free charge carriers per unit volume, in per cubic metre (m$^{-3}$). Copper has about $8.5 \\times 10^{28}$ free electrons per m$^3$."
    },
    {
     "latex": "q",
     "meaning": "**Charge per carrier**, measured in coulombs (C). For electrons its size is $e = 1.602176634 \\times 10^{-19}$ C."
    },
    {
     "latex": "A",
     "meaning": "**Cross-sectional area** of the wire, measured in square metres (m$^2$)."
    }
   ],
   "worked_example": {
    "title": "How fast electrons move in a 1 A copper wire",
    "setup": "A copper wire with a diameter of 1.0 mm carries a steady current of 1 A. Copper has about $8.5 \\times 10^{28}$ free electrons per m$^3$. Find the drift velocity, and how long the electrons would take to move 1 m.",
    "steps": [
     "Find the cross-sectional area from the radius, 0.5 mm: $A = \\pi (0.0005\\ \\text{m})^2 \\approx 7.85 \\times 10^{-7}\\ \\text{m}^2$.",
     "Find the product $n q A = 8.5 \\times 10^{28}\\ \\text{m}^{-3} \\times 1.602 \\times 10^{-19}\\ \\text{C} \\times 7.85 \\times 10^{-7}\\ \\text{m}^2 \\approx 1.07 \\times 10^{4}\\ \\text{C/m}$.",
     "Apply the formula: $v_d = \\frac{1\\ \\text{A}}{1.07 \\times 10^{4}\\ \\text{C/m}} \\approx 9.35 \\times 10^{-5}\\ \\text{m/s}$, which is about 0.09 mm/s.",
     "Time to move 1 m: $\\frac{1\\ \\text{m}}{9.35 \\times 10^{-5}\\ \\text{m/s}} \\approx 10\\,700\\ \\text{s}$, which is about 3 hours."
    ],
    "answer": "The electrons drift at about **0.09 mm/s**, so one electron would take roughly **3 hours** to move 1 m. The electrical signal still reaches the far end of the wire almost instantly on the scale of human experience."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/charge-and-current/",
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/resistivity/",
    "https://formulabro.yunusemrevurgun.com/electricity/kirchhoffs-current-law/"
   ],
   "sources": [
    {
     "title": "Drift velocity, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Drift_velocity"
    },
    {
     "title": "Electric current, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electric_current"
    },
    {
     "title": "Hall effect, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Hall_effect"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/internal-resistance",
   "title": "Internal Resistance",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/internal-resistance/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/internal-resistance.md",
   "latex": "V = \\varepsilon - I r",
   "one_liner": "A real battery has a small resistance inside it, so its output voltage drops when it pushes a current through a load.",
   "read_aloud": "V equals epsilon minus I r. The terminal voltage equals the emf minus the current times the internal resistance.",
   "symbols": [
    {
     "latex": "V",
     "meaning": "**Terminal voltage**, the voltage across the battery's output terminals while it supplies current, measured in volts (V)."
    },
    {
     "latex": "\\varepsilon",
     "meaning": "**Electromotive force (emf)**, the voltage of the battery when no current flows, measured in volts (V)."
    },
    {
     "latex": "I",
     "meaning": "**Current** the battery supplies to the circuit, measured in amperes (A)."
    },
    {
     "latex": "r",
     "meaning": "**Internal resistance** of the battery, the resistance inside the cell itself, measured in ohms ($\\Omega$)."
    }
   ],
   "worked_example": {
    "title": "A 9 V battery with internal resistance driving a load",
    "setup": "A battery has an emf of 9 V and an internal resistance of 0.5 $\\Omega$. It drives a load resistor of 4.5 $\\Omega$. Find the current, the terminal voltage and the power that turns into heat inside the battery.",
    "steps": [
     "Find the total resistance in the circuit: $R + r = 4.5\\ \\Omega + 0.5\\ \\Omega = 5\\ \\Omega$. The current is $I = \\frac{\\varepsilon}{R + r} = \\frac{9\\ \\text{V}}{5\\ \\Omega} = 1.8\\ \\text{A}$.",
     "Find the terminal voltage: $V = \\varepsilon - I r = 9\\ \\text{V} - 1.8\\ \\text{A} \\times 0.5\\ \\Omega = 9\\ \\text{V} - 0.9\\ \\text{V} = 8.1\\ \\text{V}$.",
     "Check with the load: $V = I R = 1.8\\ \\text{A} \\times 4.5\\ \\Omega = 8.1\\ \\text{V}$, which matches.",
     "Find the power inside the battery: $P = I^2 r = (1.8\\ \\text{A})^2 \\times 0.5\\ \\Omega = 1.62\\ \\text{W}$."
    ],
    "answer": "The battery supplies **1.8 A** and its terminal voltage falls to **8.1 V**, which is 0.9 V below the emf. About **1.62 W** is lost as heat inside the battery itself."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/maximum-power-transfer/",
    "https://formulabro.yunusemrevurgun.com/electricity/electric-power/",
    "https://formulabro.yunusemrevurgun.com/electricity/kirchhoffs-voltage-law/"
   ],
   "sources": [
    {
     "title": "Electromotive force, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electromotive_force"
    },
    {
     "title": "Battery (electricity), Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Battery_(electricity)"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/maximum-power-transfer",
   "title": "Maximum Power Transfer",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/maximum-power-transfer/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/maximum-power-transfer.md",
   "latex": "R_L = R_S \\qquad P_{\\max} = \\frac{V_S^2}{4 R_S}",
   "one_liner": "A load receives the most power when its resistance matches the source's resistance, but then half the power is lost inside the source.",
   "read_aloud": "R L equals R S. The maximum power equals V S squared over 4 times R S.",
   "symbols": [
    {
     "latex": "R_L",
     "meaning": "The **load resistance**, the resistance of the device that receives the power, measured in ohms ($\\Omega$)."
    },
    {
     "latex": "R_S",
     "meaning": "The **source resistance**, the resistance inside the source, such as a battery's internal resistance, measured in ohms ($\\Omega$)."
    },
    {
     "latex": "V_S",
     "meaning": "The **source voltage**, the open-circuit voltage of the source with no load attached, measured in volts (V)."
    },
    {
     "latex": "P_{\\max}",
     "meaning": "The **maximum power** delivered to the load, measured in watts (W)."
    }
   ],
   "worked_example": {
    "title": "Choosing a load for a 12 V source with 4 ohm resistance",
    "setup": "A source has a voltage of 12 V and an internal resistance of 4 $\\Omega$. Compare the power delivered to a 4 $\\Omega$ load with the power delivered to an 8 $\\Omega$ load.",
    "steps": [
     "Matched load, $R_L = 4\\ \\Omega$: the total resistance is $4 + 4 = 8\\ \\Omega$, so $I = \\frac{12\\ \\text{V}}{8\\ \\Omega} = 1.5\\ \\text{A}$. The load power is $P_L = I^2 R_L = (1.5\\ \\text{A})^2 \\times 4\\ \\Omega = 9\\ \\text{W}$.",
     "Check with the formula: $P_{\\max} = \\frac{V_S^2}{4 R_S} = \\frac{(12\\ \\text{V})^2}{4 \\times 4\\ \\Omega} = \\frac{144}{16} = 9\\ \\text{W}$.",
     "Larger load, $R_L = 8\\ \\Omega$: the total resistance is $4 + 8 = 12\\ \\Omega$, so $I = \\frac{12\\ \\text{V}}{12\\ \\Omega} = 1\\ \\text{A}$. The load power is $P_L = (1\\ \\text{A})^2 \\times 8\\ \\Omega = 8\\ \\text{W}$.",
     "Efficiency at the match: the total power is $I^2 (R_S + R_L) = (1.5\\ \\text{A})^2 \\times 8\\ \\Omega = 18\\ \\text{W}$, so the efficiency is $\\frac{9\\ \\text{W}}{18\\ \\text{W}} = 50\\%$."
    ],
    "answer": "The matched 4 $\\Omega$ load receives the most power, **9 W**. The 8 $\\Omega$ load receives only **8 W**. At the match, half of the 18 W from the source is wasted inside the source, so the efficiency is **50%**."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/internal-resistance/",
    "https://formulabro.yunusemrevurgun.com/electricity/electric-power/",
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/voltage-divider/"
   ],
   "sources": [
    {
     "title": "Maximum power transfer theorem, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Maximum_power_transfer_theorem"
    },
    {
     "title": "Impedance matching, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Impedance_matching"
    },
    {
     "title": "Electric power, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electric_power"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/wheatstone-bridge",
   "title": "Wheatstone Bridge",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/wheatstone-bridge/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/wheatstone-bridge.md",
   "latex": "\\frac{R_1}{R_2} = \\frac{R_3}{R_x}",
   "one_liner": "A Wheatstone bridge finds an unknown resistance by adjusting a known one until the meter between two midpoints reads zero, then doing one multiply and one divide.",
   "read_aloud": "R one over R two equals R three over R x. The bridge is balanced when the ratio of the left arm equals the ratio of the right arm.",
   "symbols": [
    {
     "latex": "R_1",
     "meaning": "The **top resistor of the left arm**, a known value in ohms ($\\Omega$)."
    },
    {
     "latex": "R_2",
     "meaning": "The **bottom resistor of the left arm**, a known value in ohms ($\\Omega$)."
    },
    {
     "latex": "R_3",
     "meaning": "The **top resistor of the right arm**, a known value in ohms ($\\Omega$). You adjust it until the meter reads zero."
    },
    {
     "latex": "R_x",
     "meaning": "The **bottom resistor of the right arm**, the unknown resistance in ohms ($\\Omega$) that you want to find."
    }
   ],
   "worked_example": {
    "title": "Finding an unknown resistor",
    "setup": "The left arm has $R_1 = 100\\ \\Omega$ on top and $R_2 = 200\\ \\Omega$ below. The right arm has a decade box $R_3 = 350\\ \\Omega$ on top and the unknown $R_x$ below. The meter reads zero, so the bridge is balanced. Find $R_x$.",
    "steps": [
     "Write the balance rule: $\\frac{R_1}{R_2} = \\frac{R_3}{R_x}$.",
     "Rearrange it to get $R_x$: $R_x = R_3 \\times \\frac{R_2}{R_1}$.",
     "Fill in the numbers: $R_x = 350\\ \\Omega \\times \\frac{200\\ \\Omega}{100\\ \\Omega} = 350\\ \\Omega \\times 2 = 700\\ \\Omega$.",
     "Check the two ratios: $\\frac{100}{200} = 0.5$ and $\\frac{350}{700} = 0.5$. They match, so the bridge is balanced."
    ],
    "answer": "The unknown resistor is **700 ohm**, which is 0.7 kiloohm. Both ratios equal 0.5, and that equality is the balance condition."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/voltage-divider/",
    "https://formulabro.yunusemrevurgun.com/electricity/kirchhoffs-current-law/"
   ],
   "sources": [
    {
     "title": "Wheatstone bridge, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Wheatstone_bridge"
    },
    {
     "title": "Strain gauge, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Strain_gauge"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/battery-capacity-runtime",
   "title": "Battery Capacity and Runtime",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/battery-capacity-runtime/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/battery-capacity-runtime.md",
   "latex": "t = \\frac{C}{I}",
   "one_liner": "Divide a battery's capacity by the current the device draws, and you get roughly how many hours the battery will run it.",
   "read_aloud": "t equals C over I. Runtime equals battery capacity divided by current.",
   "symbols": [
    {
     "latex": "t",
     "meaning": "**Runtime**, how long the battery lasts, in hours (h) when $C$ is in ampere-hours and $I$ is in amperes."
    },
    {
     "latex": "C",
     "meaning": "**Capacity** of the battery, in ampere-hours (Ah) or milliampere-hours (mAh). A 2000 mAh battery holds 2 Ah."
    },
    {
     "latex": "I",
     "meaning": "**Current** the device draws from the battery, in amperes (A) or milliamperes (mA). Use the same prefix for both values, so that mAh divided by mA gives hours."
    }
   ],
   "worked_example": {
    "title": "Runtime of a small battery pack",
    "setup": "A battery pack is rated at 2000 mAh and 3.7 V. A small device draws a steady 250 mA from it. Find the ideal runtime, and the energy stored in the pack.",
    "steps": [
     "Runtime: $t = \\frac{C}{I} = \\frac{2000\\ \\text{mAh}}{250\\ \\text{mA}} = 8\\ \\text{h}$.",
     "Convert the capacity to ampere-hours: $2000\\ \\text{mAh} = 2\\ \\text{Ah}$.",
     "Energy: $E = C \\times V = 2\\ \\text{Ah} \\times 3.7\\ \\text{V} = 7.4\\ \\text{Wh}$.",
     "Check the power: $P = V \\times I = 3.7\\ \\text{V} \\times 0.25\\ \\text{A} = 0.925\\ \\text{W}$. Then $7.4\\ \\text{Wh} / 0.925\\ \\text{W} = 8\\ \\text{h}$, the same runtime."
    ],
    "answer": "The ideal runtime is **8 hours**, and the pack stores **7.4 Wh**. The real runtime will be shorter, because the pack does not give its full capacity at this current and the device stops at its cutoff voltage."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/energy-and-kilowatt-hours/",
    "https://formulabro.yunusemrevurgun.com/electricity/electric-power/",
    "https://formulabro.yunusemrevurgun.com/electricity/internal-resistance/"
   ],
   "sources": [
    {
     "title": "Battery (electricity), Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Battery_(electricity)"
    },
    {
     "title": "Peukert's law, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Peukert%27s_law"
    },
    {
     "title": "Watt-hour, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Watt-hour"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/capacitance",
   "title": "Capacitance",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/capacitance/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/capacitance.md",
   "latex": "Q = C V",
   "one_liner": "Capacitance tells you how much electric charge a capacitor stores for each volt across it.",
   "read_aloud": "Q equals C times V. Charge equals capacitance times voltage.",
   "symbols": [
    {
     "latex": "Q",
     "meaning": "**Charge** stored on one plate of the capacitor, in coulombs (C). One coulomb is about $6.24 \\times 10^{18}$ elementary charges."
    },
    {
     "latex": "C",
     "meaning": "**Capacitance**, the charge stored per volt, in farads (F). Real capacitors are usually rated in microfarads ($\\mu\\text{F}$) or picofarads (pF)."
    },
    {
     "latex": "V",
     "meaning": "**Voltage** across the capacitor, in volts (V)."
    }
   ],
   "worked_example": {
    "title": "Charge on a 100 microfarad capacitor",
    "setup": "A capacitor with $C = 100\\ \\mu\\text{F}$ is charged to $5\\ \\text{V}$. How much charge is stored on each plate?",
    "steps": [
     "Write the rule: $Q = C V$.",
     "Convert the capacitance to farads: $100\\ \\mu\\text{F} = 100 \\times 10^{-6}\\ \\text{F} = 1 \\times 10^{-4}\\ \\text{F}$.",
     "Multiply: $Q = 1 \\times 10^{-4}\\ \\text{F} \\times 5\\ \\text{V} = 5 \\times 10^{-4}\\ \\text{C}$.",
     "Convert to microcoulombs: $5 \\times 10^{-4}\\ \\text{C} = 500\\ \\mu\\text{C}$."
    ],
    "answer": "The capacitor stores **0.0005 C**, which is **500 microcoulombs**, on each plate. The opposite plate holds the same amount with the opposite sign."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/parallel-plate-capacitor/",
    "https://formulabro.yunusemrevurgun.com/electricity/capacitors-in-series-and-parallel/",
    "https://formulabro.yunusemrevurgun.com/electricity/energy-stored-in-capacitor/"
   ],
   "sources": [
    {
     "title": "Capacitance, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Capacitance"
    },
    {
     "title": "Farad, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Farad"
    },
    {
     "title": "Capacitor, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Capacitor"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/parallel-plate-capacitor",
   "title": "Parallel-Plate Capacitor",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/parallel-plate-capacitor/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/parallel-plate-capacitor.md",
   "latex": "C = \\frac{\\varepsilon_0 \\varepsilon_r A}{d}",
   "one_liner": "The parallel-plate formula says a capacitor holds more charge per volt when its plates are bigger, closer together, or separated by a material with a higher permittivity.",
   "read_aloud": "C equals epsilon zero times epsilon r times A over d. Capacitance equals the permittivity of free space, times the relative permittivity, times the plate area, divided by the plate gap.",
   "symbols": [
    {
     "latex": "C",
     "meaning": "**Capacitance**, in farads (F)."
    },
    {
     "latex": "\\varepsilon_0",
     "meaning": "The **permittivity of free space**, a constant equal to $8.8541878128 \\times 10^{-12}$ F/m (farads per metre)."
    },
    {
     "latex": "\\varepsilon_r",
     "meaning": "The **relative permittivity** of the material between the plates. It is a plain number with no unit. It is exactly 1 for vacuum and very close to 1 for air. Larger values raise the capacitance."
    },
    {
     "latex": "A",
     "meaning": "**Area** of one plate, in square metres (m$^2$)."
    },
    {
     "latex": "d",
     "meaning": "**Separation**, the gap between the plates, in metres (m)."
    }
   ],
   "worked_example": {
    "title": "A small capacitor from two plates",
    "setup": "Two flat plates each have area $A = 0.01\\ \\text{m}^2$, which is 100 cm$^2$, a square about 10 cm on each side. They are separated by a gap $d = 1\\ \\text{mm} = 0.001\\ \\text{m}$ that is filled with a material of relative permittivity $\\varepsilon_r = 4$. Find the capacitance.",
    "steps": [
     "Write the formula: $C = \\frac{\\varepsilon_0 \\varepsilon_r A}{d}$.",
     "Multiply the two permittivities: $\\varepsilon_0 \\varepsilon_r = 8.8541878128 \\times 10^{-12}\\ \\text{F/m} \\times 4 = 3.5417 \\times 10^{-11}\\ \\text{F/m}$.",
     "Multiply by the area and divide by the gap: $C = \\frac{3.5417 \\times 10^{-11}\\ \\text{F/m} \\times 0.01\\ \\text{m}^2}{0.001\\ \\text{m}} = 3.5417 \\times 10^{-10}\\ \\text{F}$.",
     "Convert to picofarads: $3.5417 \\times 10^{-10}\\ \\text{F} = 354\\ \\text{pF}$."
    ],
    "answer": "The capacitance is about **354 pF**, which is $3.54 \\times 10^{-10}$ F. Doubling the plate area would double it, and halving the gap would double it too."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/capacitance/",
    "https://formulabro.yunusemrevurgun.com/electricity/capacitors-in-series-and-parallel/",
    "https://formulabro.yunusemrevurgun.com/electricity/energy-stored-in-capacitor/"
   ],
   "sources": [
    {
     "title": "Capacitor, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Capacitor"
    },
    {
     "title": "Vacuum permittivity, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Vacuum_permittivity"
    },
    {
     "title": "Permittivity, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Permittivity"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/capacitors-in-series-and-parallel",
   "title": "Capacitors in Series and Parallel",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/capacitors-in-series-and-parallel/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/capacitors-in-series-and-parallel.md",
   "latex": "C_{\\text{par}} = C_1 + C_2 + \\cdots \\qquad \\frac{1}{C_{\\text{ser}}} = \\frac{1}{C_1} + \\frac{1}{C_2} + \\cdots",
   "one_liner": "Capacitors side by side add their capacitance, while capacitors chained end to end give a smaller total that is found with reciprocals.",
   "read_aloud": "Parallel: C par equals C one plus C two, and so on. Series: one over C ser equals one over C one plus one over C two, and so on.",
   "symbols": [
    {
     "latex": "C_{\\text{par}}",
     "meaning": "The **total capacitance** of capacitors connected in parallel, in farads (F)."
    },
    {
     "latex": "C_{\\text{ser}}",
     "meaning": "The **total capacitance** of capacitors connected in series, in farads (F)."
    },
    {
     "latex": "C_1",
     "meaning": "The capacitance of the first capacitor, in farads (F). The same idea applies to $C_2$ and any others."
    },
    {
     "latex": "C_2",
     "meaning": "The capacitance of the second capacitor, in farads (F)."
    }
   ],
   "worked_example": {
    "title": "A 10 microfarad and a 30 microfarad capacitor",
    "setup": "Two capacitors, $C_1 = 10\\ \\mu\\text{F}$ and $C_2 = 30\\ \\mu\\text{F}$, are first wired in parallel and then in series. Find the total capacitance in each case.",
    "steps": [
     "Parallel: $C_{\\text{par}} = C_1 + C_2 = 10\\ \\mu\\text{F} + 30\\ \\mu\\text{F} = 40\\ \\mu\\text{F}$.",
     "Series: $\\frac{1}{C_{\\text{ser}}} = \\frac{1}{10\\ \\mu\\text{F}} + \\frac{1}{30\\ \\mu\\text{F}} = \\frac{3 + 1}{30\\ \\mu\\text{F}} = \\frac{4}{30\\ \\mu\\text{F}} \\approx 0.1333\\ \\frac{1}{\\mu\\text{F}}$.",
     "Flip the reciprocal to get the total: $C_{\\text{ser}} = \\frac{30}{4}\\ \\mu\\text{F} = 7.5\\ \\mu\\text{F}$.",
     "Check: 7.5 $\\mu$F is smaller than the smallest capacitor, 10 $\\mu$F, as a series total should be."
    ],
    "answer": "In parallel the total is **40 µF**. In series the total is **7.5 µF**, which is less than either capacitor on its own."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/capacitance/",
    "https://formulabro.yunusemrevurgun.com/electricity/resistors-in-series-and-parallel/",
    "https://formulabro.yunusemrevurgun.com/electricity/parallel-plate-capacitor/"
   ],
   "sources": [
    {
     "title": "Series and parallel circuits, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Series_and_parallel_circuits"
    },
    {
     "title": "Capacitor, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Capacitor"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/energy-stored-in-capacitor",
   "title": "Energy Stored in a Capacitor",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/energy-stored-in-capacitor/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/energy-stored-in-capacitor.md",
   "latex": "E = \\frac{1}{2} C V^2",
   "one_liner": "A charged capacitor stores energy in the electric field between its plates, and the amount grows with the square of the voltage.",
   "read_aloud": "E equals one half C V squared. Energy equals one half times capacitance times voltage squared.",
   "symbols": [
    {
     "latex": "E",
     "meaning": "**Energy** stored in the capacitor, in joules (J)."
    },
    {
     "latex": "C",
     "meaning": "**Capacitance**, in farads (F)."
    },
    {
     "latex": "V",
     "meaning": "**Voltage** across the capacitor, in volts (V). It is squared in the formula."
    }
   ],
   "worked_example": {
    "title": "Energy in a 1000 microfarad capacitor at 12 V",
    "setup": "A capacitor with $C = 1000\\ \\mu\\text{F}$ is charged to $12\\ \\text{V}$. How much energy is stored? Find the charge first, then check the answer with $\\frac{Q^2}{2C}$.",
    "steps": [
     "Convert the capacitance: $1000\\ \\mu\\text{F} = 1000 \\times 10^{-6}\\ \\text{F} = 1 \\times 10^{-3}\\ \\text{F}$.",
     "Energy: $E = \\frac{1}{2} C V^2 = \\frac{1}{2} \\times 10^{-3}\\ \\text{F} \\times (12\\ \\text{V})^2 = \\frac{1}{2} \\times 10^{-3} \\times 144\\ \\text{J} = 0.072\\ \\text{J}$.",
     "Charge: $Q = C V = 10^{-3}\\ \\text{F} \\times 12\\ \\text{V} = 0.012\\ \\text{C}$.",
     "Check with the other form: $\\frac{Q^2}{2C} = \\frac{(0.012\\ \\text{C})^2}{2 \\times 10^{-3}\\ \\text{F}} = \\frac{1.44 \\times 10^{-4}}{2 \\times 10^{-3}}\\ \\text{J} = 0.072\\ \\text{J}$."
    ],
    "answer": "The capacitor stores **0.072 J**, which is **72 millijoules**. The charge on each plate is 0.012 C, and both energy formulas give the same result."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/capacitance/",
    "https://formulabro.yunusemrevurgun.com/electricity/energy-stored-in-inductor/",
    "https://formulabro.yunusemrevurgun.com/electricity/electric-power/"
   ],
   "sources": [
    {
     "title": "Capacitor, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Capacitor"
    },
    {
     "title": "Capacitance, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Capacitance"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/inductor-voltage",
   "title": "Inductor Voltage",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/inductor-voltage/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/inductor-voltage.md",
   "latex": "V = L \\frac{dI}{dt}",
   "one_liner": "An inductor pushes back against changes in current, and the voltage across it is set by how fast the current is changing.",
   "read_aloud": "V equals L times d I over d t. Voltage equals inductance times the rate of change of current.",
   "symbols": [
    {
     "latex": "V",
     "meaning": "**Voltage** across the inductor, in volts (V)."
    },
    {
     "latex": "L",
     "meaning": "**Inductance**, a measure of how strongly the coil opposes changes in current, in henries (H). A millihenry is $10^{-3}$ H."
    },
    {
     "latex": "I",
     "meaning": "**Current** through the inductor, in amperes (A)."
    },
    {
     "latex": "t",
     "meaning": "**Time**, in seconds (s)."
    }
   ],
   "worked_example": {
    "title": "Voltage across a 10 millihenry coil",
    "setup": "A coil with $L = 10\\ \\text{mH}$ has its current ramped steadily from 0 A to 2 A in 1 ms. Find the voltage across the coil during the ramp.",
    "steps": [
     "Convert the units: $L = 10\\ \\text{mH} = 0.01\\ \\text{H}$ and $t = 1\\ \\text{ms} = 0.001\\ \\text{s}$.",
     "Find the rate of change of current: $\\frac{dI}{dt} = \\frac{2\\ \\text{A}}{0.001\\ \\text{s}} = 2000\\ \\text{A/s}$.",
     "Apply the formula: $V = L \\frac{dI}{dt} = 0.01\\ \\text{H} \\times 2000\\ \\text{A/s} = 20\\ \\text{V}$."
    ],
    "answer": "The coil needs **20 V** across it to make its current rise steadily from 0 to 2 A in 1 ms. A faster ramp needs more voltage, and a steady 2 A needs none."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/faradays-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/rl-time-constant/",
    "https://formulabro.yunusemrevurgun.com/electricity/energy-stored-in-inductor/"
   ],
   "sources": [
    {
     "title": "Inductor, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Inductor"
    },
    {
     "title": "Inductance, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Inductance"
    },
    {
     "title": "Freewheeling diode, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Freewheeling_diode"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/energy-stored-in-inductor",
   "title": "Energy Stored in an Inductor",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/energy-stored-in-inductor/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/energy-stored-in-inductor.md",
   "latex": "E = \\frac{1}{2} L I^2",
   "one_liner": "A coil with current flowing through it stores energy in its magnetic field, and the amount grows with the square of the current.",
   "read_aloud": "E equals one half L I squared. Energy equals one half times inductance times current squared.",
   "symbols": [
    {
     "latex": "E",
     "meaning": "**Energy** stored in the magnetic field of the inductor, in joules (J)."
    },
    {
     "latex": "L",
     "meaning": "**Inductance**, in henries (H)."
    },
    {
     "latex": "I",
     "meaning": "**Current** through the inductor, in amperes (A). It is squared in the formula."
    }
   ],
   "worked_example": {
    "title": "Energy in a 10 millihenry coil carrying 2 A",
    "setup": "The same $10\\ \\text{mH}$ coil from the inductor voltage example now carries a steady current of $2\\ \\text{A}$. How much energy is stored in its magnetic field? Then find the energy if the current doubles to 4 A.",
    "steps": [
     "Convert the inductance: $L = 10\\ \\text{mH} = 0.01\\ \\text{H}$.",
     "Square the current: $I^2 = (2\\ \\text{A})^2 = 4\\ \\text{A}^2$.",
     "Energy: $E = \\frac{1}{2} L I^2 = \\frac{1}{2} \\times 0.01\\ \\text{H} \\times 4\\ \\text{A}^2 = 0.02\\ \\text{J}$.",
     "Double the current to 4 A: $E = \\frac{1}{2} \\times 0.01\\ \\text{H} \\times (4\\ \\text{A})^2 = 0.08\\ \\text{J}$, which is four times the first answer."
    ],
    "answer": "The coil stores **0.02 J** (20 millijoules) at 2 A. At 4 A it stores **0.08 J**, four times as much."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/energy-stored-in-capacitor/",
    "https://formulabro.yunusemrevurgun.com/electricity/inductor-voltage/",
    "https://formulabro.yunusemrevurgun.com/electricity/rl-time-constant/"
   ],
   "sources": [
    {
     "title": "Inductor, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Inductor"
    },
    {
     "title": "Inductance, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Inductance"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/rl-time-constant",
   "title": "RL Time Constant",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/rl-time-constant/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/rl-time-constant.md",
   "latex": "\\tau = \\frac{L}{R}",
   "one_liner": "The RL time constant tells you how long current takes to build up in a coil connected through a resistor: divide the inductance by the resistance.",
   "read_aloud": "Tau equals L over R. The time constant equals inductance divided by resistance.",
   "symbols": [
    {
     "latex": "\\tau",
     "meaning": "The **time constant** (the Greek letter tau), measured in seconds (s). It sets how fast the current rises or falls."
    },
    {
     "latex": "L",
     "meaning": "**Inductance** of the coil, measured in henries (H)."
    },
    {
     "latex": "R",
     "meaning": "**Resistance** of the resistor in series with the coil, measured in ohms ($\\Omega$)."
    }
   ],
   "worked_example": {
    "title": "A 2 henry coil with a 10 ohm resistor on a 5 V supply",
    "setup": "A coil with $L = 2\\ \\text{H}$ and a resistor with $R = 10\\ \\Omega$ are connected in series to a 5 V supply at $t = 0$. Find the time constant, the final current and the current at $t = 0.2\\ \\text{s}$ and $t = 1\\ \\text{s}$.",
    "steps": [
     "Time constant: $\\tau = \\frac{L}{R} = \\frac{2\\ \\text{H}}{10\\ \\Omega} = 0.2\\ \\text{s}$.",
     "Final current, when the coil no longer changes: $I_\\infty = \\frac{V}{R} = \\frac{5\\ \\text{V}}{10\\ \\Omega} = 0.5\\ \\text{A}$.",
     "At $t = 0.2\\ \\text{s}$, which is one time constant: $I = 0.5\\ \\text{A} \\times (1 - e^{-1}) \\approx 0.5 \\times 0.632 = 0.316\\ \\text{A}$.",
     "At $t = 1\\ \\text{s}$, which is five time constants: $I = 0.5\\ \\text{A} \\times (1 - e^{-5}) \\approx 0.5 \\times 0.993 = 0.497\\ \\text{A}$."
    ],
    "answer": "The time constant is **0.2 s**. The current reaches **0.316 A** after 0.2 s, which is 63.2% of the final **0.5 A**. After 1 s it is **0.497 A**, more than 99% of the way to the final value."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/rc-time-constant/",
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/inductive-reactance/"
   ],
   "sources": [
    {
     "title": "RL circuit, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/RL_circuit"
    },
    {
     "title": "Inductance, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Inductance"
    },
    {
     "title": "Exponential decay, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Exponential_decay"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/capacitive-reactance",
   "title": "Capacitive Reactance",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/capacitive-reactance/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/capacitive-reactance.md",
   "latex": "X_C = \\frac{1}{2\\pi f C}",
   "one_liner": "Capacitive reactance tells you how hard a capacitor pushes back against alternating current, and it gets smaller as the frequency goes up.",
   "read_aloud": "X C equals one divided by two pi times f times C. Capacitive reactance equals one over two pi f C.",
   "symbols": [
    {
     "latex": "X_C",
     "meaning": "**Capacitive reactance**, the opposition a capacitor gives to alternating current, measured in ohms ($\\Omega$). It is not resistance, because the capacitor does not turn the energy into heat."
    },
    {
     "latex": "\\pi",
     "meaning": "The number pi, about 3.14159. It has no unit."
    },
    {
     "latex": "f",
     "meaning": "**Frequency** of the alternating current, measured in hertz (Hz). One hertz is one cycle per second."
    },
    {
     "latex": "C",
     "meaning": "**Capacitance**, how much charge the capacitor holds for each volt, measured in farads (F). A microfarad is $10^{-6}$ F."
    }
   ],
   "worked_example": {
    "title": "A 100 microfarad capacitor at 50 Hz and 500 Hz",
    "setup": "A capacitor with $C = 100\\ \\mu\\text{F}$ is connected to an AC supply. Find its reactance at $f = 50\\ \\text{Hz}$, then at $f = 500\\ \\text{Hz}$.",
    "steps": [
     "Convert the capacitance: $C = 100 \\times 10^{-6}\\ \\text{F}$.",
     "At 50 Hz, the product is $2\\pi f C = 2\\pi \\times 50\\ \\text{Hz} \\times 100 \\times 10^{-6}\\ \\text{F} \\approx 0.03142\\ \\text{S}$, where S (siemens) is one over an ohm.",
     "So $X_C = \\frac{1}{0.03142\\ \\text{S}} \\approx 31.8\\ \\Omega$.",
     "At 500 Hz the frequency is ten times higher, so the product is ten times bigger: $2\\pi \\times 500\\ \\text{Hz} \\times 100 \\times 10^{-6}\\ \\text{F} \\approx 0.3142\\ \\text{S}$. Then $X_C = \\frac{1}{0.3142\\ \\text{S}} \\approx 3.18\\ \\Omega$."
    ],
    "answer": "At 50 Hz the capacitor has a reactance of about **31.8 Ω**. At 500 Hz it drops to about **3.18 Ω**, ten times smaller, because the frequency is ten times higher."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/rc-time-constant/",
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/resistors-in-series-and-parallel/"
   ],
   "sources": [
    {
     "title": "Electrical reactance, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electrical_reactance"
    },
    {
     "title": "Capacitor, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Capacitor"
    },
    {
     "title": "Alternating current, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Alternating_current"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/inductive-reactance",
   "title": "Inductive Reactance",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/inductive-reactance/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/inductive-reactance.md",
   "latex": "X_L = 2\\pi f L",
   "one_liner": "Inductive reactance tells you how hard a coil pushes back against alternating current, and it gets bigger as the frequency goes up.",
   "read_aloud": "X L equals two pi times f times L. Inductive reactance equals two pi f L.",
   "symbols": [
    {
     "latex": "X_L",
     "meaning": "**Inductive reactance**, the opposition a coil gives to alternating current, measured in ohms ($\\Omega$). It is not resistance, because the coil stores energy instead of turning it into heat."
    },
    {
     "latex": "\\pi",
     "meaning": "The number pi, about 3.14159. It has no unit."
    },
    {
     "latex": "f",
     "meaning": "**Frequency** of the alternating current, measured in hertz (Hz). One hertz is one cycle per second."
    },
    {
     "latex": "L",
     "meaning": "**Inductance**, how strongly the coil opposes a change in its current, measured in henries (H). A millihenry is $10^{-3}$ H."
    }
   ],
   "worked_example": {
    "title": "A 0.1 henry coil at 50 Hz and 500 Hz",
    "setup": "A coil with $L = 0.1\\ \\text{H}$ is connected to an AC supply. Find its reactance at $f = 50\\ \\text{Hz}$, a common mains frequency, then at $f = 500\\ \\text{Hz}$.",
    "steps": [
     "At 50 Hz: $X_L = 2\\pi \\times 50\\ \\text{Hz} \\times 0.1\\ \\text{H}$.",
     "Multiply: $2\\pi \\approx 6.283$, and $6.283 \\times 50 \\times 0.1 \\approx 31.4$, so $X_L \\approx 31.4\\ \\Omega$.",
     "At 500 Hz the frequency is ten times higher, so $X_L = 2\\pi \\times 500\\ \\text{Hz} \\times 0.1\\ \\text{H} \\approx 314\\ \\Omega$.",
     "Units check: $\\text{Hz} \\times \\text{H} = \\Omega$, because $\\text{H} = \\Omega \\cdot \\text{s}$ and $\\text{Hz} = 1/\\text{s}$."
    ],
    "answer": "At 50 Hz the coil has a reactance of about **31.4 Ω**. At 500 Hz it rises to about **314 Ω**, ten times larger, so the coil passes far less alternating current at the higher frequency."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/capacitive-reactance/",
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/rc-time-constant/"
   ],
   "sources": [
    {
     "title": "Electrical reactance, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electrical_reactance"
    },
    {
     "title": "Inductance, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Inductance"
    },
    {
     "title": "Alternating current, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Alternating_current"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/rlc-impedance",
   "title": "Series RLC Impedance",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/rlc-impedance/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/rlc-impedance.md",
   "latex": "Z = \\sqrt{R^2 + (X_L - X_C)^2}",
   "one_liner": "Impedance is the total opposition a series circuit of a resistor, a coil and a capacitor gives to alternating current.",
   "read_aloud": "Z equals the square root of R squared plus the quantity X L minus X C, all squared.",
   "symbols": [
    {
     "latex": "Z",
     "meaning": "**Impedance**, the total opposition to alternating current in the series circuit, measured in ohms ($\\Omega$)."
    },
    {
     "latex": "R",
     "meaning": "**Resistance** of the resistor, measured in ohms ($\\Omega$)."
    },
    {
     "latex": "X_L",
     "meaning": "**Inductive reactance** of the coil, measured in ohms ($\\Omega$). See the page on inductive reactance."
    },
    {
     "latex": "X_C",
     "meaning": "**Capacitive reactance** of the capacitor, measured in ohms ($\\Omega$). See the page on capacitive reactance."
    }
   ],
   "worked_example": {
    "title": "A 30 ohm resistor, a 0.1 H coil and a 50 microfarad capacitor at 50 Hz",
    "setup": "A series circuit has $R = 30\\ \\Omega$, $L = 0.1\\ \\text{H}$ and $C = 50\\ \\mu\\text{F}$, driven at $f = 50\\ \\text{Hz}$ by a 10 V rms supply. Find $X_L$, $X_C$, the impedance, the phase angle and the rms current.",
    "steps": [
     "Coil reactance: $X_L = 2\\pi f L = 2\\pi \\times 50\\ \\text{Hz} \\times 0.1\\ \\text{H} \\approx 31.42\\ \\Omega$.",
     "Capacitor reactance: $X_C = \\frac{1}{2\\pi f C} = \\frac{1}{2\\pi \\times 50\\ \\text{Hz} \\times 50 \\times 10^{-6}\\ \\text{F}} \\approx 63.66\\ \\Omega$.",
     "Net reactance: $X_L - X_C \\approx 31.42\\ \\Omega - 63.66\\ \\Omega = -32.25\\ \\Omega$. The minus sign means the capacitor dominates.",
     "Impedance: $Z = \\sqrt{R^2 + (X_L - X_C)^2} = \\sqrt{30^2 + 32.25^2} = \\sqrt{900 + 1040} \\approx 44.0\\ \\Omega$.",
     "Phase angle: $\\tan\\varphi = \\frac{-32.25\\ \\Omega}{30\\ \\Omega} \\approx -1.075$, so $\\varphi \\approx -47.1^\\circ$.",
     "Current: $I = \\frac{V}{Z} = \\frac{10\\ \\text{V}}{44.0\\ \\Omega} \\approx 0.227\\ \\text{A}$."
    ],
    "answer": "The impedance is about **44.0 Ω**. The capacitor dominates, so the current leads the supply voltage by about **47.1°**, and the rms current is about **0.227 A**."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/capacitive-reactance/",
    "https://formulabro.yunusemrevurgun.com/electricity/inductive-reactance/",
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/"
   ],
   "sources": [
    {
     "title": "RLC circuit, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/RLC_circuit"
    },
    {
     "title": "Electrical impedance, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electrical_impedance"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/resonant-frequency",
   "title": "Resonant Frequency",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/resonant-frequency/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/resonant-frequency.md",
   "latex": "f_0 = \\frac{1}{2\\pi\\sqrt{LC}}",
   "one_liner": "The resonant frequency is the one frequency where a coil and a capacitor trade energy back and forth most easily, and radios use it to tune in stations.",
   "read_aloud": "f zero equals one divided by two pi times the square root of L times C. Resonant frequency equals one over two pi root L C.",
   "symbols": [
    {
     "latex": "f_0",
     "meaning": "**Resonant frequency**, the frequency at which the LC circuit resonates, measured in hertz (Hz)."
    },
    {
     "latex": "\\pi",
     "meaning": "The number pi, about 3.14159. It has no unit."
    },
    {
     "latex": "L",
     "meaning": "**Inductance** of the coil, measured in henries (H)."
    },
    {
     "latex": "C",
     "meaning": "**Capacitance** of the capacitor, measured in farads (F)."
    }
   ],
   "worked_example": {
    "title": "A 250 microhenry coil and a 100 picofarad capacitor",
    "setup": "A tuning circuit has $L = 250\\ \\mu\\text{H}$ and $C = 100\\ \\text{pF}$. Find its resonant frequency. A microhenry is $10^{-6}$ H and a picofarad is $10^{-12}$ F.",
    "steps": [
     "Convert the units: $L = 250 \\times 10^{-6}\\ \\text{H} = 2.5 \\times 10^{-4}\\ \\text{H}$ and $C = 100 \\times 10^{-12}\\ \\text{F} = 1.0 \\times 10^{-10}\\ \\text{F}$.",
     "Multiply: $LC = 2.5 \\times 10^{-4} \\times 1.0 \\times 10^{-10} = 2.5 \\times 10^{-14}\\ \\text{s}^2$.",
     "Square root: $\\sqrt{LC} = \\sqrt{2.5 \\times 10^{-14}} \\approx 1.581 \\times 10^{-7}\\ \\text{s}$.",
     "Resonant frequency: $f_0 = \\frac{1}{2\\pi \\sqrt{LC}} = \\frac{1}{2\\pi \\times 1.581 \\times 10^{-7}\\ \\text{s}} \\approx 1.007 \\times 10^{6}\\ \\text{Hz}$."
    ],
    "answer": "The circuit resonates at about **1.01 MHz**, which falls in the AM broadcast band. Turning the capacitor or moving the coil changes this frequency."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/rlc-impedance/",
    "https://formulabro.yunusemrevurgun.com/electricity/inductive-reactance/",
    "https://formulabro.yunusemrevurgun.com/electricity/capacitive-reactance/"
   ],
   "sources": [
    {
     "title": "LC circuit, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/LC_circuit"
    },
    {
     "title": "Resonance, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Resonance"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/rms-voltage",
   "title": "RMS Voltage",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/rms-voltage/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/rms-voltage.md",
   "latex": "V_{\\text{rms}} = \\frac{V_{\\text{peak}}}{\\sqrt{2}}",
   "one_liner": "RMS voltage is the steady voltage that heats a resistor as much as an AC sine wave does, and you get it by dividing the peak voltage by the square root of 2.",
   "read_aloud": "V r m s equals V peak divided by the square root of 2. RMS voltage equals peak voltage over root two.",
   "symbols": [
    {
     "latex": "V_{\\text{rms}}",
     "meaning": "**RMS voltage**, the root mean square value of an AC voltage, measured in volts (V). It is the steady DC voltage that gives the same heating effect."
    },
    {
     "latex": "V_{\\text{peak}}",
     "meaning": "**Peak voltage**, the largest value the AC voltage reaches, measured in volts (V)."
    }
   ],
   "worked_example": {
    "title": "Peak voltage of 120 V and 230 V mains",
    "setup": "A US outlet is rated at $120\\ \\text{V}$ rms, and a European outlet is rated at $230\\ \\text{V}$ rms. Find the peak voltage of each.",
    "steps": [
     "Rearrange the formula: $V_{\\text{peak}} = V_{\\text{rms}} \\times \\sqrt{2}$.",
     "US: $V_{\\text{peak}} = 120\\ \\text{V} \\times 1.4142 \\approx 169.7\\ \\text{V}$, which is about 170 V.",
     "Europe: $V_{\\text{peak}} = 230\\ \\text{V} \\times 1.4142 \\approx 325.3\\ \\text{V}$, which is about 325 V.",
     "Check the US case: $169.7\\ \\text{V} / \\sqrt{2} \\approx 120\\ \\text{V}$, which returns the rms value."
    ],
    "answer": "The US peak is about **170 V** and the European peak is about **325 V**. These peaks are why AC insulation must be rated well above the rms number on the label."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/electric-power/",
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/energy-and-kilowatt-hours/"
   ],
   "sources": [
    {
     "title": "Root mean square, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Root_mean_square"
    },
    {
     "title": "Mains electricity, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Mains_electricity"
    },
    {
     "title": "Alternating current, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Alternating_current"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/ac-power-factor",
   "title": "AC Power Factor",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/ac-power-factor/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/ac-power-factor.md",
   "latex": "P = V_{\\text{rms}} I_{\\text{rms}} \\cos\\varphi",
   "one_liner": "Power factor tells you what share of the current in an AC circuit does useful work, and it is the ratio of real power to apparent power.",
   "read_aloud": "P equals V r m s times I r m s times cos phi. Real power equals rms voltage times rms current times the cosine of phi.",
   "symbols": [
    {
     "latex": "P",
     "meaning": "**Real power**, the power that does useful work, such as heat or motion, measured in watts (W)."
    },
    {
     "latex": "V_{\\text{rms}}",
     "meaning": "**RMS voltage** of the supply, measured in volts (V)."
    },
    {
     "latex": "I_{\\text{rms}}",
     "meaning": "**RMS current** through the load, measured in amperes (A)."
    },
    {
     "latex": "\\cos\\varphi",
     "meaning": "**Power factor**, the cosine of the phase angle $\\varphi$ between voltage and current. It is a number from 0 to 1 with no unit."
    }
   ],
   "worked_example": {
    "title": "A 120 V motor drawing 5 A at a power factor of 0.8",
    "setup": "A motor runs on a 120 V rms supply and draws 5 A rms. Its power factor is 0.8. Find the apparent power, the real power and the reactive power.",
    "steps": [
     "Apparent power: $S = V_{\\text{rms}} I_{\\text{rms}} = 120\\ \\text{V} \\times 5\\ \\text{A} = 600\\ \\text{VA}$.",
     "Real power: $P = S \\cos\\varphi = 600\\ \\text{VA} \\times 0.8 = 480\\ \\text{W}$.",
     "Phase angle: $\\varphi = \\arccos(0.8) \\approx 36.9^\\circ$, so $\\sin\\varphi = 0.6$.",
     "Reactive power: $Q = S \\sin\\varphi = 600\\ \\text{VA} \\times 0.6 = 360\\ \\text{var}$."
    ],
    "answer": "The apparent power is **600 VA**, the real power is **480 W** and the power factor is **0.8**. The remaining **360 var** is reactive power, which goes back and forth and does no net work."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/electric-power/",
    "https://formulabro.yunusemrevurgun.com/electricity/rms-voltage/",
    "https://formulabro.yunusemrevurgun.com/electricity/rlc-impedance/"
   ],
   "sources": [
    {
     "title": "Power factor, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Power_factor"
    },
    {
     "title": "Reactive power, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Reactive_power"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/three-phase-power",
   "title": "Three-Phase Power",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/three-phase-power/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/three-phase-power.md",
   "latex": "P = \\sqrt{3}\\, V_L I_L \\cos\\varphi",
   "one_liner": "Three-phase power tells you how much real power a balanced three-wire AC load uses, and you get it from the line voltage, the line current and the power factor.",
   "read_aloud": "P equals the square root of 3 times V L times I L times cos phi. Three-phase power equals root three times line voltage, times line current, times the cosine of phi.",
   "symbols": [
    {
     "latex": "P",
     "meaning": "**Real power** of the whole three-phase load, measured in watts (W)."
    },
    {
     "latex": "\\sqrt{3}",
     "meaning": "The square root of 3, about 1.732. It has no unit."
    },
    {
     "latex": "V_L",
     "meaning": "**Line voltage**, the voltage between two of the three line wires, measured in volts (V)."
    },
    {
     "latex": "I_L",
     "meaning": "**Line current**, the current in one of the three line wires, measured in amperes (A)."
    },
    {
     "latex": "\\cos\\varphi",
     "meaning": "**Power factor** of each phase, the cosine of the phase angle between voltage and current. It is a number from 0 to 1 with no unit."
    }
   ],
   "worked_example": {
    "title": "A 400 V three-phase motor drawing 10 A at a power factor of 0.8",
    "setup": "A balanced three-phase motor is supplied at a line voltage of $V_L = 400\\ \\text{V}$. Each line draws $I_L = 10\\ \\text{A}$, and the power factor is $\\cos\\varphi = 0.8$. Find the real power.",
    "steps": [
     "Factor for three phases: $\\sqrt{3} \\approx 1.732$.",
     "Multiply the line quantities: $\\sqrt{3} \\times 400\\ \\text{V} \\times 10\\ \\text{A} \\approx 6928\\ \\text{VA}$.",
     "Multiply by the power factor: $6928\\ \\text{VA} \\times 0.8 \\approx 5543\\ \\text{W}$.",
     "Convert to kilowatts: $5543\\ \\text{W} = 5.54\\ \\text{kW}$."
    ],
    "answer": "The motor uses about **5.54 kW** of real power. Its apparent power is about **6.93 kVA**, and the power factor of 0.8 means the real power is 80% of that."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/ac-power-factor/",
    "https://formulabro.yunusemrevurgun.com/electricity/rms-voltage/",
    "https://formulabro.yunusemrevurgun.com/electricity/electric-power/"
   ],
   "sources": [
    {
     "title": "Three-phase electric power, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Three-phase_electric_power"
    },
    {
     "title": "Power factor, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Power_factor"
    },
    {
     "title": "Electric power, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electric_power"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/transformer-turns-ratio",
   "title": "Transformer Turns Ratio",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/transformer-turns-ratio/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/transformer-turns-ratio.md",
   "latex": "\\frac{V_s}{V_p} = \\frac{N_s}{N_p}",
   "one_liner": "A transformer changes an AC voltage up or down in the same ratio as the number of wire turns on its two coils.",
   "read_aloud": "V sub s over V sub p equals N sub s over N sub p. The secondary voltage divided by the primary voltage equals the secondary turns divided by the primary turns.",
   "symbols": [
    {
     "latex": "V_s",
     "meaning": "**Secondary voltage**, the voltage across the output coil, measured in volts (V)."
    },
    {
     "latex": "V_p",
     "meaning": "**Primary voltage**, the voltage across the input coil, measured in volts (V)."
    },
    {
     "latex": "N_s",
     "meaning": "**Secondary turns**, the number of wire loops on the output coil. Turns are counted, so this has no unit."
    },
    {
     "latex": "N_p",
     "meaning": "**Primary turns**, the number of wire loops on the input coil. Turns are counted, so this has no unit."
    },
    {
     "latex": "I_s",
     "meaning": "**Secondary current**, the current in the output coil, measured in amperes (A)."
    },
    {
     "latex": "I_p",
     "meaning": "**Primary current**, the current in the input coil, measured in amperes (A)."
    }
   ],
   "worked_example": {
    "title": "Stepping 120 V down to 12 V",
    "setup": "The primary coil of a transformer has $N_p = 500$ turns and sits on a 120 V AC supply. The primary draws $I_p = 0.5\\ \\text{A}$. The secondary coil has $N_s = 50$ turns. Find the secondary voltage and current, then check the power on each side.",
    "steps": [
     "Find the secondary voltage from the turns: $V_s = V_p \\times \\frac{N_s}{N_p} = 120\\ \\text{V} \\times \\frac{50}{500} = 12\\ \\text{V}$.",
     "Find the secondary current from the current rule: $I_s = I_p \\times \\frac{N_p}{N_s} = 0.5\\ \\text{A} \\times \\frac{500}{50} = 5\\ \\text{A}$.",
     "Check the power on the input side: $P_{\\text{in}} = V_p I_p = 120\\ \\text{V} \\times 0.5\\ \\text{A} = 60\\ \\text{W}$.",
     "Check the power on the output side: $P_{\\text{out}} = V_s I_s = 12\\ \\text{V} \\times 5\\ \\text{A} = 60\\ \\text{W}$."
    ],
    "answer": "The secondary delivers **12 V** and **5 A**. The voltage went down by a factor of 10, and the current went up by the same factor. Both sides carry **60 W**, which is what an ideal transformer should do."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/faradays-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/electric-power/",
    "https://formulabro.yunusemrevurgun.com/electricity/rms-voltage/",
    "https://formulabro.yunusemrevurgun.com/electricity/ohms-law/"
   ],
   "sources": [
    {
     "title": "Transformer, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Transformer"
    },
    {
     "title": "Faraday's law of induction, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Faraday%27s_law_of_induction"
    },
    {
     "title": "Electric power transmission, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electric_power_transmission"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/electric-field-of-point-charge",
   "title": "Electric Field of a Point Charge",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/electric-field-of-point-charge/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/electric-field-of-point-charge.md",
   "latex": "E = \\frac{k_e\\, q}{r^2}",
   "one_liner": "The electric field around a charge tells you the push that a small test charge would feel at each point in space.",
   "read_aloud": "E equals k sub e times q, divided by r squared. The electric field equals the Coulomb constant times the charge, divided by the distance squared.",
   "symbols": [
    {
     "latex": "E",
     "meaning": "**Electric field**, the force per unit charge at a point, measured in newtons per coulomb (N/C). The same unit is volts per meter (V/m)."
    },
    {
     "latex": "k_e",
     "meaning": "The **Coulomb constant**, $k_e = 8.9875517923 \\times 10^{9}\\ \\text{N}\\,\\text{m}^2/\\text{C}^2$. It sets the scale of the electric force in SI units."
    },
    {
     "latex": "q",
     "meaning": "The **source charge**, the charge that creates the field, measured in coulombs (C). Its size sets the strength, and its sign sets the direction."
    },
    {
     "latex": "r",
     "meaning": "The **distance** from the source charge to the point where the field is measured, in meters (m)."
    }
   ],
   "worked_example": {
    "title": "Field 0.5 m from a 2 microcoulomb charge",
    "setup": "A point charge of $q = 2\\ \\mu\\text{C}$ (which is $2 \\times 10^{-6}$ C) sits in empty space. Find the electric field at a point 0.5 m away. Then find the force on a 3 microcoulomb charge placed at that point.",
    "steps": [
     "Square the distance: $r^2 = (0.5\\ \\text{m})^2 = 0.25\\ \\text{m}^2$.",
     "Put the numbers into the formula: $E = 8.9875517923 \\times 10^{9} \\times \\frac{2 \\times 10^{-6}\\ \\text{C}}{0.25\\ \\text{m}^2} \\approx 7.19 \\times 10^{4}\\ \\text{N/C}$.",
     "Use the field to find the force on the 3 microcoulomb charge: $F = qE = (3 \\times 10^{-6}\\ \\text{C}) \\times (7.19 \\times 10^{4}\\ \\text{N/C}) \\approx 0.216\\ \\text{N}$."
    ],
    "answer": "The field at 0.5 m is about $7.19 \\times 10^{4}$ N/C, pointing away from the positive charge. A 3 microcoulomb charge placed there would feel a force of about **0.216 N**, pushing it away from the source."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/coulombs-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/electric-potential/",
    "https://formulabro.yunusemrevurgun.com/electricity/charge-and-current/",
    "https://formulabro.yunusemrevurgun.com/electricity/parallel-plate-capacitor/"
   ],
   "sources": [
    {
     "title": "Electric field, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electric_field"
    },
    {
     "title": "Coulomb's law, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Coulomb%27s_law"
    },
    {
     "title": "Electric charge, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electric_charge"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/electric-potential",
   "title": "Electric Potential",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/electric-potential/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/electric-potential.md",
   "latex": "V = \\frac{k_e\\, q}{r}",
   "one_liner": "Electric potential tells you how much energy each unit of charge would have at a spot in space, measured in volts.",
   "read_aloud": "V equals k sub e times q, divided by r. The electric potential equals the Coulomb constant times the charge, divided by the distance.",
   "symbols": [
    {
     "latex": "V",
     "meaning": "**Electric potential**, the energy per unit charge at a point, measured in volts (V). One volt is one joule per coulomb."
    },
    {
     "latex": "k_e",
     "meaning": "The **Coulomb constant**, $k_e = 8.9875517923 \\times 10^{9}\\ \\text{N}\\,\\text{m}^2/\\text{C}^2$."
    },
    {
     "latex": "q",
     "meaning": "The **source charge**, the charge that creates the potential, measured in coulombs (C). Its sign sets whether the potential is positive or negative."
    },
    {
     "latex": "r",
     "meaning": "The **distance** from the source charge to the point, measured in meters (m)."
    },
    {
     "latex": "\\Delta U",
     "meaning": "The **change in potential energy** of a charge moved between two points, measured in joules (J)."
    },
    {
     "latex": "\\Delta V",
     "meaning": "The **change in potential** between two points, measured in volts (V). It is the final potential minus the starting potential."
    }
   ],
   "worked_example": {
    "title": "Potential energy change for a charge moved outward",
    "setup": "A point charge of $q = 5\\ \\text{nC}$ (which is $5 \\times 10^{-9}$ C) sits at the origin. A positive charge of $2\\ \\mu\\text{C}$ starts 0.10 m away and is moved out to 0.50 m. Find the potential at each distance, then the change in potential energy of the 2 microcoulomb charge.",
    "steps": [
     "Find the potential at 0.10 m: $V_1 = 8.9875517923 \\times 10^{9} \\times \\frac{5 \\times 10^{-9}}{0.10} \\approx 449.4\\ \\text{V}$.",
     "Find the potential at 0.50 m: $V_2 = 8.9875517923 \\times 10^{9} \\times \\frac{5 \\times 10^{-9}}{0.50} \\approx 89.9\\ \\text{V}$.",
     "Find the change in potential: $\\Delta V = V_2 - V_1 \\approx 89.9\\ \\text{V} - 449.4\\ \\text{V} = -359.5\\ \\text{V}$.",
     "Multiply by the charge: $\\Delta U = q\\,\\Delta V = (2 \\times 10^{-6}\\ \\text{C}) \\times (-359.5\\ \\text{V}) \\approx -7.19 \\times 10^{-4}\\ \\text{J}$."
    ],
    "answer": "The potential energy of the 2 microcoulomb charge drops by about **$7.19 \\times 10^{-4}$ J**, which is 0.719 millijoules. The negative sign means the repulsion from the source pushes the charge outward and does work on it, so the charge loses stored energy."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/electric-field-of-point-charge/",
    "https://formulabro.yunusemrevurgun.com/electricity/coulombs-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/energy-stored-in-capacitor/"
   ],
   "sources": [
    {
     "title": "Electric potential, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electric_potential"
    },
    {
     "title": "Electric potential energy, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electric_potential_energy"
    },
    {
     "title": "Volt, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Volt"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/magnetic-force-on-moving-charge",
   "title": "Magnetic Force on a Moving Charge",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/magnetic-force-on-moving-charge/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/magnetic-force-on-moving-charge.md",
   "latex": "F = |q|\\, v\\, B \\sin\\theta",
   "one_liner": "A magnetic field pushes a moving charge sideways, and the push is biggest when the charge moves straight across the field lines.",
   "read_aloud": "F equals the size of q times v times B times the sine of theta. The magnetic force equals the size of the charge, times the speed, times the field strength, times the sine of the angle between the velocity and the field.",
   "symbols": [
    {
     "latex": "F",
     "meaning": "**Magnetic force**, the size of the push on the charge, measured in newtons (N)."
    },
    {
     "latex": "|q|",
     "meaning": "The **size of the charge**, measured in coulombs (C). Only the size goes into the formula; the sign of the charge sets the direction."
    },
    {
     "latex": "v",
     "meaning": "The **speed** of the charge, measured in meters per second (m/s)."
    },
    {
     "latex": "B",
     "meaning": "The **magnetic field strength**, measured in tesla (T). One tesla is one newton per ampere per meter."
    },
    {
     "latex": "\\theta",
     "meaning": "The **angle** between the velocity and the magnetic field. At 90 degrees the sine is 1, the largest push. At 0 degrees the sine is 0, and there is no push."
    }
   ],
   "worked_example": {
    "title": "Electron crossing a magnetic field",
    "setup": "An electron moves at $v = 2.0 \\times 10^{6}$ m/s through a uniform magnetic field of $B = 0.5$ T. The size of its charge is $|q| = e = 1.602176634 \\times 10^{-19}$ C. Find the magnetic force when the electron moves at right angles to the field, then when it moves at 30 degrees to the field.",
    "steps": [
     "At 90 degrees, $\\sin 90^\\circ = 1$, so $F = |q|\\, v\\, B \\sin 90^\\circ = (1.602 \\times 10^{-19}\\ \\text{C})(2.0 \\times 10^{6}\\ \\text{m/s})(0.5\\ \\text{T})(1)$.",
     "Multiply: $F = 1.602 \\times 10^{-13}\\ \\text{N}$.",
     "At 30 degrees, $\\sin 30^\\circ = 0.5$, so the force is half as big: $F = 1.602 \\times 10^{-13}\\ \\text{N} \\times 0.5 \\approx 8.01 \\times 10^{-14}\\ \\text{N}$."
    ],
    "answer": "At right angles the magnetic force on the electron is about **$1.60 \\times 10^{-13}$ N**. At 30 degrees it drops to about **$8.01 \\times 10^{-14}$ N**. The force is tiny in everyday terms, but an electron has so little mass that this force bends its path strongly."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/force-on-current-carrying-wire/",
    "https://formulabro.yunusemrevurgun.com/electricity/magnetic-field-of-straight-wire/",
    "https://formulabro.yunusemrevurgun.com/electricity/faradays-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/electric-field-of-point-charge/"
   ],
   "sources": [
    {
     "title": "Lorentz force, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Lorentz_force"
    },
    {
     "title": "Right-hand rule, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Right-hand_rule"
    },
    {
     "title": "Elementary charge, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Elementary_charge"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/force-on-current-carrying-wire",
   "title": "Force on a Current-Carrying Wire",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/force-on-current-carrying-wire/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/force-on-current-carrying-wire.md",
   "latex": "F = B\\, I\\, L \\sin\\theta",
   "one_liner": "A wire carrying current is pushed sideways by a magnetic field, and the push grows with the current, the wire length and the field strength.",
   "read_aloud": "F equals B times I times L times the sine of theta. The force equals the magnetic field times the current times the length of the wire in the field, times the sine of the angle.",
   "symbols": [
    {
     "latex": "F",
     "meaning": "**Force** on the wire, measured in newtons (N)."
    },
    {
     "latex": "B",
     "meaning": "**Magnetic field strength**, measured in tesla (T)."
    },
    {
     "latex": "I",
     "meaning": "**Current** in the wire, measured in amperes (A)."
    },
    {
     "latex": "L",
     "meaning": "**Length** of the wire that lies inside the field, measured in meters (m)."
    },
    {
     "latex": "\\theta",
     "meaning": "The **angle** between the wire and the magnetic field. The force is biggest when the wire is at right angles to the field and zero when it runs along the field."
    }
   ],
   "worked_example": {
    "title": "Force on a 30 cm wire carrying 5 A",
    "setup": "A straight wire 0.30 m long carries a current of 5 A. It sits in a uniform magnetic field of 0.2 T. Find the force when the wire is at right angles to the field, then when it is tilted to 30 degrees from the field direction.",
    "steps": [
     "At 90 degrees, $\\sin 90^\\circ = 1$, so $F = B I L \\sin 90^\\circ = (0.2\\ \\text{T})(5\\ \\text{A})(0.30\\ \\text{m})(1)$.",
     "Multiply: $F = 0.30\\ \\text{N}$.",
     "At 30 degrees, $\\sin 30^\\circ = 0.5$, so the force is half as big: $F = 0.30\\ \\text{N} \\times 0.5 = 0.15\\ \\text{N}$."
    ],
    "answer": "At right angles the wire feels a force of **0.30 N**, and at 30 degrees it feels **0.15 N**. The force pushes the wire sideways, not along its length."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/magnetic-force-on-moving-charge/",
    "https://formulabro.yunusemrevurgun.com/electricity/magnetic-field-of-straight-wire/",
    "https://formulabro.yunusemrevurgun.com/electricity/magnetic-field-of-solenoid/",
    "https://formulabro.yunusemrevurgun.com/electricity/faradays-law/"
   ],
   "sources": [
    {
     "title": "Electric motor, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electric_motor"
    },
    {
     "title": "Lorentz force, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Lorentz_force"
    },
    {
     "title": "Magnetic field, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Magnetic_field"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/magnetic-field-of-straight-wire",
   "title": "Magnetic Field of a Straight Wire",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/magnetic-field-of-straight-wire/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/magnetic-field-of-straight-wire.md",
   "latex": "B = \\frac{\\mu_0 I}{2\\pi r}",
   "one_liner": "A current in a straight wire makes a magnetic field that wraps around the wire, and the field gets weaker the farther away you measure it.",
   "read_aloud": "B equals mu sub zero times I, divided by 2 pi times r. The magnetic field equals the permeability of free space times the current, divided by two pi times the distance.",
   "symbols": [
    {
     "latex": "B",
     "meaning": "**Magnetic field**, measured in tesla (T). The field lines are circles around the wire."
    },
    {
     "latex": "\\mu_0",
     "meaning": "The **permeability of free space**, $\\mu_0 = 1.25663706212 \\times 10^{-6}\\ \\text{N/A}^2$. It sets how strongly a current makes a magnetic field in vacuum."
    },
    {
     "latex": "I",
     "meaning": "**Current** in the wire, measured in amperes (A)."
    },
    {
     "latex": "r",
     "meaning": "**Distance** from the wire to the point where the field is measured, measured in meters (m)."
    }
   ],
   "worked_example": {
    "title": "Field of a 10 A wire at two distances",
    "setup": "A long straight wire carries a steady current of $I = 10$ A. Find the magnetic field 5 cm from the wire, then the field 10 cm from the wire.",
    "steps": [
     "Convert the first distance: $r = 5\\ \\text{cm} = 0.05\\ \\text{m}$.",
     "Put the numbers into the formula: $B = \\frac{(1.25663706212 \\times 10^{-6}\\ \\text{N/A}^2)(10\\ \\text{A})}{2\\pi\\,(0.05\\ \\text{m})} \\approx 4.0 \\times 10^{-5}\\ \\text{T}$.",
     "At 10 cm, $r = 0.10$ m is twice as far, so the field is half as big: $B = \\frac{4.0 \\times 10^{-5}\\ \\text{T}}{2} = 2.0 \\times 10^{-5}\\ \\text{T}$."
    ],
    "answer": "At 5 cm the field is about **$4.0 \\times 10^{-5}$ T**, which is 40 microtesla. At 10 cm it is about **$2.0 \\times 10^{-5}$ T**. Doubling the distance halved the field, as the $1/r$ rule predicts."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/magnetic-field-of-solenoid/",
    "https://formulabro.yunusemrevurgun.com/electricity/force-on-current-carrying-wire/",
    "https://formulabro.yunusemrevurgun.com/electricity/magnetic-force-on-moving-charge/",
    "https://formulabro.yunusemrevurgun.com/electricity/faradays-law/"
   ],
   "sources": [
    {
     "title": "Biot-Savart law, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Biot%E2%80%93Savart_law"
    },
    {
     "title": "Ampere's circuital law, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Amp%C3%A8re%27s_circuital_law"
    },
    {
     "title": "Vacuum permeability, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Vacuum_permeability"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/magnetic-field-of-solenoid",
   "title": "Magnetic Field of a Solenoid",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/magnetic-field-of-solenoid/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/magnetic-field-of-solenoid.md",
   "latex": "B = \\mu_0\\, n\\, I",
   "one_liner": "A long coil of wire makes a strong, nearly uniform magnetic field along its middle, and the field depends on how many turns are packed into each meter.",
   "read_aloud": "B equals mu sub zero times n times I. The magnetic field equals the permeability of free space times the turns per meter times the current.",
   "symbols": [
    {
     "latex": "B",
     "meaning": "**Magnetic field** inside the solenoid, measured in tesla (T)."
    },
    {
     "latex": "\\mu_0",
     "meaning": "The **permeability of free space**, $\\mu_0 = 1.25663706212 \\times 10^{-6}\\ \\text{N/A}^2$."
    },
    {
     "latex": "n",
     "meaning": "The **turns per meter**, the number of wire loops in each meter of coil length, measured in 1/m. It equals $n = N / L$."
    },
    {
     "latex": "I",
     "meaning": "**Current** in the wire, measured in amperes (A)."
    },
    {
     "latex": "N",
     "meaning": "The **total number of turns** in the coil. Turns are counted, so this has no unit."
    },
    {
     "latex": "L",
     "meaning": "The **length** of the coil along its axis, measured in meters (m)."
    }
   ],
   "worked_example": {
    "title": "Field inside a 25 cm coil with 500 turns",
    "setup": "A solenoid has $N = 500$ turns spread evenly over a length of $L = 0.25$ m, and it carries $I = 2$ A. Find the magnetic field inside the coil.",
    "steps": [
     "Find the turns per meter: $n = \\frac{N}{L} = \\frac{500}{0.25\\ \\text{m}} = 2000\\ \\text{turns/m}$.",
     "Put the numbers into the formula: $B = \\mu_0 n I = (1.25663706212 \\times 10^{-6}\\ \\text{N/A}^2)(2000\\ \\text{turns/m})(2\\ \\text{A})$.",
     "Multiply: $B \\approx 5.03 \\times 10^{-3}\\ \\text{T}$."
    ],
    "answer": "The field inside the coil is about **$5.03 \\times 10^{-3}$ T**, or 5.03 millitesla. It is nearly uniform along the middle of the coil, and doubling the current would double it."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/magnetic-field-of-straight-wire/",
    "https://formulabro.yunusemrevurgun.com/electricity/faradays-law/",
    "https://formulabro.yunusemrevurgun.com/electricity/energy-stored-in-inductor/",
    "https://formulabro.yunusemrevurgun.com/electricity/inductor-voltage/"
   ],
   "sources": [
    {
     "title": "Solenoid, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Solenoid"
    },
    {
     "title": "Magnetic field, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Magnetic_field"
    },
    {
     "title": "Vacuum permeability, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Vacuum_permeability"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "electricity/faradays-law",
   "title": "Faraday's Law of Induction",
   "category": "electricity",
   "url": "https://formulabro.yunusemrevurgun.com/electricity/faradays-law/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/electricity/faradays-law.md",
   "latex": "\\varepsilon = -N\\, \\frac{d\\Phi_B}{dt}",
   "one_liner": "A changing magnetic field through a loop of wire pushes a voltage into the wire, and that is how generators make electricity.",
   "read_aloud": "epsilon equals minus N times d Phi B over d t. The induced voltage equals minus the number of turns times the rate of change of the magnetic flux.",
   "symbols": [
    {
     "latex": "\\varepsilon",
     "meaning": "The **induced emf**, the voltage pushed around the loop, measured in volts (V)."
    },
    {
     "latex": "N",
     "meaning": "The **number of turns** of wire in the coil. Turns are counted, so this has no unit."
    },
    {
     "latex": "\\Phi_B",
     "meaning": "The **magnetic flux** through one turn of the coil, measured in webers (Wb). One weber is one tesla times one square meter."
    },
    {
     "latex": "t",
     "meaning": "**Time**, measured in seconds (s)."
    },
    {
     "latex": "B",
     "meaning": "**Magnetic field strength**, measured in tesla (T)."
    },
    {
     "latex": "A",
     "meaning": "**Area** of the loop, measured in square meters (m^2)."
    },
    {
     "latex": "\\theta",
     "meaning": "The **angle** between the magnetic field and the normal to the loop, which is a line sticking straight out of its face. Measured in degrees or radians."
    }
   ],
   "worked_example": {
    "title": "Average emf from a field that grows in 0.1 s",
    "setup": "A coil with $N = 100$ turns and an area of $A = 0.01\\ \\text{m}^2$ (which is 100 cm^2) has its face perpendicular to a magnetic field. The field grows steadily from 0 to 0.5 T in 0.1 s. Find the size of the average induced emf.",
    "steps": [
     "The face is perpendicular to the field, so $\\theta = 0$ and $\\cos 0 = 1$. The flux at the end is $\\Phi_B = BA = (0.5\\ \\text{T})(0.01\\ \\text{m}^2) = 0.005\\ \\text{Wb}$.",
     "The change in flux is $\\Delta\\Phi_B = 0.005\\ \\text{Wb} - 0 = 0.005\\ \\text{Wb}$, over $\\Delta t = 0.1\\ \\text{s}$, so the rate of change is $0.05\\ \\text{Wb/s}$.",
     "Multiply by the number of turns: $|\\varepsilon| = N \\frac{\\Delta\\Phi_B}{\\Delta t} = 100 \\times 0.05\\ \\text{Wb/s} = 5\\ \\text{V}$.",
     "The minus sign in the formula only sets the direction, so the induced current opposes the growth in flux."
    ],
    "answer": "The average induced emf has a size of **5 V**. Its sign is negative, so by Lenz's law the induced current flows in the direction that opposes the growing flux through the coil."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/electricity/transformer-turns-ratio/",
    "https://formulabro.yunusemrevurgun.com/electricity/magnetic-field-of-solenoid/",
    "https://formulabro.yunusemrevurgun.com/electricity/inductor-voltage/",
    "https://formulabro.yunusemrevurgun.com/electricity/magnetic-force-on-moving-charge/"
   ],
   "sources": [
    {
     "title": "Faraday's law of induction, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Faraday%27s_law_of_induction"
    },
    {
     "title": "Lenz's law, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Lenz%27s_law"
    },
    {
     "title": "Magnetic flux, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Magnetic_flux"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/planck-einstein-relation",
   "title": "Planck-Einstein Relation (E = hf)",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/planck-einstein-relation/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/planck-einstein-relation.md",
   "latex": "E = h f",
   "one_liner": "E = hf says each packet of light carries energy in proportion to its frequency: higher frequency means more energy per packet, and brightness does not change it.",
   "read_aloud": "E equals h times f. E is the energy of one photon, h is Planck's constant, and f is the frequency of the light.",
   "symbols": [
    {
     "latex": "E",
     "meaning": "The energy of **one** photon, a single packet of light, in joules (J). Atomic physics often uses electron volts (eV) instead: $1\\ \\text{eV} = 1.602176634 \\times 10^{-19}$ J."
    },
    {
     "latex": "h",
     "meaning": "Planck's constant, $6.62607015 \\times 10^{-34}$ J s (joule seconds). Its value is exact by definition in the SI system."
    },
    {
     "latex": "f",
     "meaning": "The frequency of the light, in hertz (Hz), which means waves per second."
    }
   ],
   "worked_example": {
    "title": "Green light at 540 THz",
    "setup": "Green light has a frequency of $f = 5.4 \\times 10^{14}$ Hz, which is 540 THz. Use $h = 6.62607015 \\times 10^{-34}$ J s.",
    "steps": [
     "Multiply by Planck's constant: $E = hf = (6.62607015 \\times 10^{-34}\\ \\text{J s})(5.4 \\times 10^{14}\\ \\text{Hz}) \\approx 3.578 \\times 10^{-19}$ J.",
     "Convert joules to electron volts by dividing by $1.602176634 \\times 10^{-19}$ J per eV: $\\frac{3.578 \\times 10^{-19}}{1.602176634 \\times 10^{-19}} \\approx 2.233$ eV.",
     "Find the wavelength with $\\lambda = c / f = (2.998 \\times 10^{8}\\ \\text{m/s}) / (5.4 \\times 10^{14}\\ \\text{Hz}) \\approx 5.55 \\times 10^{-7}$ m, or about 555 nm."
    ],
    "answer": "Each photon of this green light carries about $3.58 \\times 10^{-19}$ J, or **2.23 eV**. A lamp that sends out a million times more photons per second carries a million times more energy each second, but each photon still has the same 2.23 eV."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/photoelectric-effect/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/de-broglie-wavelength/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/hydrogen-energy-levels/"
   ],
   "sources": [
    {
     "title": "Planck relation, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Planck_relation"
    },
    {
     "title": "Photon, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Photon"
    },
    {
     "title": "Fundamental physical constants, NIST",
     "url": "https://physics.nist.gov/cuu/Constants/"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/photoelectric-effect",
   "title": "Photoelectric Effect",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/photoelectric-effect/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/photoelectric-effect.md",
   "latex": "K_{\\max} = h f - \\phi",
   "one_liner": "Light can knock electrons out of a metal, but only if each packet of light carries enough energy, and the leftover energy becomes the electron's speed.",
   "read_aloud": "K max equals h times f minus phi. K max is the largest kinetic energy of an ejected electron, h is Planck's constant, f is the light's frequency, and phi is the metal's work function.",
   "symbols": [
    {
     "latex": "K_{\\max}",
     "meaning": "The largest kinetic energy (energy of motion) an ejected electron can have, in joules (J) or electron volts (eV)."
    },
    {
     "latex": "h",
     "meaning": "Planck's constant, $6.62607015 \\times 10^{-34}$ J s (joule seconds)."
    },
    {
     "latex": "f",
     "meaning": "The frequency of the light, in hertz (Hz). Each photon of frequency $f$ can free at most one electron."
    },
    {
     "latex": "\\phi",
     "meaning": "The work function of the metal: the minimum energy needed to pull an electron out of its surface, in joules or electron volts. Each metal has its own value."
    }
   ],
   "worked_example": {
    "title": "Violet light and red light on the same metal",
    "setup": "A metal with work function $\\phi = 2.3$ eV, close to the value for potassium (2.29 eV). Two lights shine on it: violet light at a wavelength of 400 nm and red light at 700 nm. The photon energy is $hf = hc/\\lambda$, with $hc = 1239.84$ eV nm.",
    "steps": [
     "Violet light: $hf = \\frac{1239.84\\ \\text{eV nm}}{400\\ \\text{nm}} \\approx 3.10$ eV.",
     "Maximum kinetic energy of the ejected electrons: $K_{\\max} = hf - \\phi = 3.10 - 2.3 = 0.80$ eV.",
     "Red light: $hf = \\frac{1239.84\\ \\text{eV nm}}{700\\ \\text{nm}} \\approx 1.77$ eV.",
     "Compare with the work function: $1.77 - 2.3 \\approx -0.53$ eV. The result is below zero, so one red photon cannot pay the cost of escape, and no electron leaves the metal."
    ],
    "answer": "Violet light ejects electrons with up to **0.80 eV** of kinetic energy. Red light at 700 nm ejects no electrons at all, however bright it is, because no single red photon has the 2.3 eV needed to escape the metal. More red light only adds more photons, and each one is still too weak."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/planck-einstein-relation/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/de-broglie-wavelength/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/hydrogen-energy-levels/"
   ],
   "sources": [
    {
     "title": "Photoelectric effect, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Photoelectric_effect"
    },
    {
     "title": "Work function, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Work_function"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/de-broglie-wavelength",
   "title": "De Broglie Wavelength",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/de-broglie-wavelength/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/de-broglie-wavelength.md",
   "latex": "\\lambda = \\frac{h}{p} = \\frac{h}{m v}",
   "one_liner": "Every moving object has a wavelength, and the heavier or faster it moves, the shorter that wavelength gets.",
   "read_aloud": "Lambda equals h divided by p, which is h divided by m times v. Lambda is the wavelength, h is Planck's constant, p is momentum, m is mass and v is speed.",
   "symbols": [
    {
     "latex": "\\lambda",
     "meaning": "The de Broglie wavelength: the distance over which the matter wave repeats, in meters (m)."
    },
    {
     "latex": "h",
     "meaning": "Planck's constant, $6.62607015 \\times 10^{-34}$ J s (joule seconds)."
    },
    {
     "latex": "p",
     "meaning": "The momentum of the particle, in kilogram meters per second (kg m/s). Momentum is mass times speed, the amount of motion."
    },
    {
     "latex": "m",
     "meaning": "The mass of the particle, in kilograms (kg)."
    },
    {
     "latex": "v",
     "meaning": "The speed of the particle, in meters per second (m/s)."
    }
   ],
   "worked_example": {
    "title": "An electron and a baseball",
    "setup": "Electron: mass $m_e = 9.1093837 \\times 10^{-31}$ kg, speed $v = 1.0 \\times 10^{6}$ m/s. Baseball: mass $m = 0.145$ kg, speed $v = 40$ m/s. Use $h = 6.62607015 \\times 10^{-34}$ J s.",
    "steps": [
     "Electron momentum: $p = m_e v = (9.1093837 \\times 10^{-31})(1.0 \\times 10^{6}) = 9.1093837 \\times 10^{-25}$ kg m/s.",
     "Electron wavelength: $\\lambda = \\frac{h}{p} = \\frac{6.62607015 \\times 10^{-34}}{9.1093837 \\times 10^{-25}} \\approx 7.27 \\times 10^{-10}$ m, which is 0.727 nm.",
     "Baseball momentum: $p = 0.145 \\times 40 = 5.8$ kg m/s.",
     "Baseball wavelength: $\\lambda = \\frac{6.62607015 \\times 10^{-34}}{5.8} \\approx 1.14 \\times 10^{-34}$ m."
    ],
    "answer": "The electron's wave is about 0.727 nm long, which is a few times the width of one atom, so wave behavior matters for electrons in atoms. The baseball's wave is $1.14 \\times 10^{-34}$ m long. That is about $10^{-24}$ times the width of an atom, far too small for any experiment to see. The same formula gives very different results because the wave matters only when the mass is tiny."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/heisenberg-uncertainty-principle/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/planck-einstein-relation/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/schrodinger-equation/"
   ],
   "sources": [
    {
     "title": "Matter wave, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Matter_wave"
    },
    {
     "title": "Louis de Broglie, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Louis_de_Broglie"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/heisenberg-uncertainty-principle",
   "title": "Heisenberg Uncertainty Principle",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/heisenberg-uncertainty-principle/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/heisenberg-uncertainty-principle.md",
   "latex": "\\Delta x \\, \\Delta p \\ge \\frac{\\hbar}{2}",
   "one_liner": "The more tightly a particle's position is pinned down, the more its speed must spread out, and no instrument can beat that trade-off.",
   "read_aloud": "Delta x times delta p is greater than or equal to h-bar divided by two. Delta x is the spread in position, delta p is the spread in momentum, and h-bar is the reduced Planck constant.",
   "symbols": [
    {
     "latex": "\\Delta x",
     "meaning": "The spread in position measurements (the standard deviation of position), in meters (m). The delta means a spread here, not a single error."
    },
    {
     "latex": "\\Delta p",
     "meaning": "The spread in momentum measurements, in kilogram meters per second (kg m/s)."
    },
    {
     "latex": "\\ge",
     "meaning": "\"Greater than or equal to\": the product of the two spreads can never be smaller than the number on the right."
    },
    {
     "latex": "\\hbar",
     "meaning": "The reduced Planck constant, $h / 2\\pi = 1.054571817 \\times 10^{-34}$ J s (joule seconds)."
    }
   ],
   "worked_example": {
    "title": "An electron squeezed into an atom",
    "setup": "An electron is confined to a region of width $\\Delta x = 1.0 \\times 10^{-10}$ m, about the width of an atom. Use $\\hbar = 1.054571817 \\times 10^{-34}$ J s and $m_e = 9.1093837 \\times 10^{-31}$ kg.",
    "steps": [
     "Rearrange the limit to find the smallest momentum spread: $\\Delta p \\ge \\frac{\\hbar}{2\\,\\Delta x}$.",
     "Plug in the numbers: $\\Delta p \\ge \\frac{1.054571817 \\times 10^{-34}\\ \\text{J s}}{2 \\times 1.0 \\times 10^{-10}\\ \\text{m}} \\approx 5.27 \\times 10^{-25}$ kg m/s.",
     "Divide by the electron mass to get the smallest speed spread: $\\Delta v = \\frac{\\Delta p}{m_e} \\ge \\frac{5.27 \\times 10^{-25}}{9.1093837 \\times 10^{-31}} \\approx 5.79 \\times 10^{5}$ m/s."
    ],
    "answer": "The electron's speed must be spread out by at least about $5.79 \\times 10^{5}$ m/s, roughly 0.19% of the speed of light. Being squeezed into atom-sized space means the electron cannot have one sharp speed. This comes from the wave itself, not from a poor ruler."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/de-broglie-wavelength/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/born-rule/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/schrodinger-equation/"
   ],
   "sources": [
    {
     "title": "Uncertainty principle, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Uncertainty_principle"
    },
    {
     "title": "Fundamental physical constants, NIST",
     "url": "https://physics.nist.gov/cuu/Constants/"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/born-rule",
   "title": "Born Rule",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/born-rule/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/born-rule.md",
   "latex": "P(x) = |\\psi(x)|^2",
   "one_liner": "The Born rule says the chance of finding a particle at a spot, or of getting an outcome, is the squared size of its wave at that spot.",
   "read_aloud": "P of x equals the absolute value of psi of x, squared. P of x is the probability density at position x, and psi is the wave function.",
   "symbols": [
    {
     "latex": "P(x)",
     "meaning": "The probability density at position $x$: probability per unit length, so per meter in one dimension. To get a real probability, multiply by a width and add up over a region."
    },
    {
     "latex": "x",
     "meaning": "A position. In one dimension it is measured in meters (m)."
    },
    {
     "latex": "\\psi(x)",
     "meaning": "The wave function at position $x$. It is a complex number, not a probability. In one dimension its units are $\\text{m}^{-1/2}$."
    },
    {
     "latex": "|\\psi(x)|^2",
     "meaning": "The squared size of the wave function. The size (absolute value) removes the phase, and squaring makes the result positive."
    },
    {
     "latex": "c_i",
     "meaning": "The amplitude (a complex number) for possible outcome number $i$, in a state written as a sum of possible outcomes."
    },
    {
     "latex": "P_i",
     "meaning": "The probability of outcome number $i$: a number between 0 and 1."
    }
   ],
   "worked_example": {
    "title": "A qubit with two possible outcomes",
    "setup": "A qubit is in a state with amplitudes $c_0 = 0.6$ for outcome 0 and $c_1 = 0.8i$ for outcome 1. Here $i$ is the imaginary unit, with $i^2 = -1$.",
    "steps": [
     "Size of the second amplitude: $|c_1|^2 = |0.8i|^2 = 0.8^2 = 0.64$.",
     "Size of the first amplitude: $|c_0|^2 = 0.6^2 = 0.36$.",
     "Apply the rule: $P(0) = |c_0|^2 = 0.36$ and $P(1) = |c_1|^2 = 0.64$.",
     "Check the total: $0.36 + 0.64 = 1$, so the two outcomes cover every possibility."
    ],
    "answer": "Outcome 0 has probability **0.36** (36%) and outcome 1 has probability **0.64** (64%). The $i$ in $c_1$ does not change these numbers, because only the size of $c_1$ is squared. The phase would matter if the state were measured in a different way, where the two amplitudes could combine."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/schrodinger-equation/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/heisenberg-uncertainty-principle/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/de-broglie-wavelength/"
   ],
   "sources": [
    {
     "title": "Born rule, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Born_rule"
    },
    {
     "title": "Max Born, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Max_Born"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/schrodinger-equation",
   "title": "Schrödinger Equation",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/schrodinger-equation/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/schrodinger-equation.md",
   "latex": "i \\hbar \\frac{\\partial \\psi}{\\partial t} = \\hat{H} \\psi",
   "one_liner": "The Schrödinger equation says how a quantum particle's wave changes over time, the way Newton's laws say how a moving ball changes its position.",
   "read_aloud": "i times h-bar times the partial derivative of psi with respect to t equals H-hat times psi. Psi is the wave function, t is time, and H-hat is the energy operator.",
   "symbols": [
    {
     "latex": "i",
     "meaning": "The imaginary unit, with $i^2 = -1$. It is what makes the phase of the wave function turn as time passes."
    },
    {
     "latex": "\\hbar",
     "meaning": "The reduced Planck constant, $1.054571817 \\times 10^{-34}$ J s (joule seconds)."
    },
    {
     "latex": "\\frac{\\partial \\psi}{\\partial t}",
     "meaning": "How fast the wave function changes at one fixed point as time passes. The partial derivative means only time is changing here."
    },
    {
     "latex": "\\psi",
     "meaning": "The wave function, a complex number at each position and time. Its squared size gives a probability density (see the Born rule)."
    },
    {
     "latex": "\\hat{H}",
     "meaning": "The Hamiltonian, the energy operator. For one particle of mass $m$ in a potential $V$, $\\hat{H} = -\\frac{\\hbar^2}{2m}\\nabla^2 + V$. Its result is in joules (J)."
    },
    {
     "latex": "t",
     "meaning": "Time, in seconds (s)."
    },
    {
     "latex": "m",
     "meaning": "The mass of the particle, in kilograms (kg)."
    },
    {
     "latex": "\\nabla^2",
     "meaning": "The Laplacian, the sum of second spatial derivatives. In one dimension it is $\\partial^2 / \\partial x^2$, in units of 1/m^2."
    },
    {
     "latex": "V",
     "meaning": "The potential energy at each position, in joules (J). It is the landscape the particle moves through."
    },
    {
     "latex": "E",
     "meaning": "The energy of a state, in joules (J), in the time-independent form $\\hat{H}\\psi = E\\psi$."
    }
   ],
   "worked_example": {
    "title": "An electron in a 1 nm box",
    "setup": "An electron (mass $m = 9.1093837 \\times 10^{-31}$ kg) is trapped in a one-dimensional box of width $L = 1.0$ nm $= 1.0 \\times 10^{-9}$ m, with walls too high to escape. Its allowed energies are $E_n = \\frac{n^2 h^2}{8 m L^2}$ for $n = 1, 2, 3, \\dots$, with $h = 6.62607015 \\times 10^{-34}$ J s.",
    "steps": [
     "Compute the energy for $n = 1$: $E_1 = \\frac{h^2}{8 m L^2} = \\frac{(6.62607015 \\times 10^{-34})^2}{8 (9.1093837 \\times 10^{-31})(1.0 \\times 10^{-9})^2} \\approx 6.02 \\times 10^{-20}$ J.",
     "Convert to electron volts: $E_1 = \\frac{6.02 \\times 10^{-20}}{1.602 \\times 10^{-19}} \\approx 0.376$ eV.",
     "Next level, $n = 2$: $E_2 = 2^2 E_1 = 4 E_1 \\approx 1.50$ eV.",
     "Level $n = 3$: $E_3 = 3^2 E_1 = 9 E_1 \\approx 3.38$ eV."
    ],
    "answer": "In this box the electron can have energies of 0.376 eV, 1.50 eV, 3.38 eV and so on. The lowest energy, 0.376 eV, is not zero, because confining a particle always costs some energy."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/born-rule/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/de-broglie-wavelength/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/hydrogen-energy-levels/"
   ],
   "sources": [
    {
     "title": "Schrödinger equation, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Schr%C3%B6dinger_equation"
    },
    {
     "title": "Particle in a box, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Particle_in_a_box"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/hydrogen-energy-levels",
   "title": "Hydrogen Energy Levels",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/hydrogen-energy-levels/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/hydrogen-energy-levels.md",
   "latex": "E_n = -\\frac{13.6\\ \\text{eV}}{n^2}",
   "one_liner": "A hydrogen electron can only sit on certain energy steps, and every jump between steps gives off or takes in light of one exact color.",
   "read_aloud": "E sub n equals negative 13.6 electron volts divided by n squared. E sub n is the energy of level n, and n is a whole number: 1, 2, 3 and so on.",
   "symbols": [
    {
     "latex": "E_n",
     "meaning": "The energy of the electron in level $n$, in electron volts (eV). The negative sign means the electron is bound to the proton."
    },
    {
     "latex": "n",
     "meaning": "The principal quantum number: a whole number 1, 2, 3 and so on. A larger $n$ means a larger orbit and a level closer to zero energy."
    },
    {
     "latex": "13.6\\ \\text{eV}",
     "meaning": "The rounded ionization energy of hydrogen from the ground state, 13.6 electron volts."
    }
   ],
   "worked_example": {
    "title": "The red H-alpha line, from n = 3 to n = 2",
    "setup": "An electron falls from level $n = 3$ to level $n = 2$. Use $E_n = -13.6\\ \\text{eV} / n^2$ and $hc = 1239.84$ eV nm.",
    "steps": [
     "Energy of level 3: $E_3 = -\\frac{13.6}{3^2} \\approx -1.51$ eV.",
     "Energy of level 2: $E_2 = -\\frac{13.6}{2^2} = -3.40$ eV.",
     "Energy of the photon, the upper level minus the lower level: $E_{\\text{photon}} = E_3 - E_2 = (-1.51) - (-3.40) \\approx 1.89$ eV.",
     "Wavelength: $\\lambda = \\frac{hc}{E_{\\text{photon}}} = \\frac{1239.84\\ \\text{eV nm}}{1.89\\ \\text{eV}} \\approx 656$ nm."
    ],
    "answer": "The electron emits a photon of 1.89 eV, which has a wavelength of about 656 nm. That is the red H-alpha line, one of the reasons hydrogen gas glows red-pink in discharge tubes. Ionizing a hydrogen atom from its lowest level would take 13.6 eV instead."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/planck-einstein-relation/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/schrodinger-equation/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/photoelectric-effect/"
   ],
   "sources": [
    {
     "title": "Hydrogen spectral series, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Hydrogen_spectral_series"
    },
    {
     "title": "Bohr model, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Bohr_model"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/photon-momentum",
   "title": "Photon Momentum",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/photon-momentum/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/photon-momentum.md",
   "latex": "p = \\frac{h}{\\lambda} = \\frac{E}{c}",
   "one_liner": "A photon has no mass, yet it carries momentum, so light can push on objects, and the shorter its wavelength, the harder each photon pushes.",
   "read_aloud": "p equals h over lambda, which also equals E over c. p is the momentum of one photon, h is Planck's constant, lambda is the wavelength, E is the photon's energy, and c is the speed of light.",
   "symbols": [
    {
     "latex": "p",
     "meaning": "The **momentum** of one photon, in kilogram meters per second (kg m/s). Ordinary momentum is mass times velocity, but a photon has no rest mass, so this formula is the one to use."
    },
    {
     "latex": "h",
     "meaning": "Planck's constant, $6.62607015 \\times 10^{-34}$ J s (joule seconds). Its value is exact by definition in the SI system."
    },
    {
     "latex": "\\lambda",
     "meaning": "The **wavelength** of the light, in meters (m)."
    },
    {
     "latex": "E",
     "meaning": "The **energy** of one photon, in joules (J)."
    },
    {
     "latex": "c",
     "meaning": "The speed of light in vacuum, $2.99792458 \\times 10^{8}$ m/s, exact by definition."
    }
   ],
   "worked_example": {
    "title": "Momentum of a 500 nm photon",
    "setup": "Green light has a wavelength of $\\lambda = 500$ nm, which is $5.00 \\times 10^{-7}$ m. Use $h = 6.62607015 \\times 10^{-34}$ J s and $c = 2.99792458 \\times 10^{8}$ m/s.",
    "steps": [
     "Momentum from the wavelength: $p = \\frac{h}{\\lambda} = \\frac{6.62607015 \\times 10^{-34}\\ \\text{J s}}{5.00 \\times 10^{-7}\\ \\text{m}} \\approx 1.325 \\times 10^{-27}\\ \\text{kg m/s}$.",
     "Energy of the same photon: $E = \\frac{hc}{\\lambda} = \\frac{(6.62607015 \\times 10^{-34})(2.99792458 \\times 10^{8})}{5.00 \\times 10^{-7}} \\approx 3.973 \\times 10^{-19}$ J.",
     "Check with $E / c$: $\\frac{3.973 \\times 10^{-19}\\ \\text{J}}{2.998 \\times 10^{8}\\ \\text{m/s}} \\approx 1.325 \\times 10^{-27}\\ \\text{kg m/s}$, the same answer."
    ],
    "answer": "One 500 nm photon has a momentum of about $1.325 \\times 10^{-27}$ kg m/s and an energy of about 2.48 eV. That push is far too small to feel, but a beam of billions of photons per second adds up."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/planck-einstein-relation/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/compton-scattering/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/photoelectric-effect/"
   ],
   "sources": [
    {
     "title": "Radiation pressure, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Radiation_pressure"
    },
    {
     "title": "Photon, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Photon"
    },
    {
     "title": "Solar sail, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Solar_sail"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/compton-scattering",
   "title": "Compton Scattering",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/compton-scattering/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/compton-scattering.md",
   "latex": "\\lambda' - \\lambda = \\frac{h}{m_e c}\\left(1 - \\cos\\theta\\right)",
   "one_liner": "When an X-ray bounces off an electron it loses some energy, so its wavelength gets longer, and the amount depends only on the angle it bounces through.",
   "read_aloud": "lambda prime minus lambda equals h over m e c, times one minus cosine theta. Lambda is the wavelength before scattering, lambda prime is the wavelength after, and theta is the scattering angle.",
   "symbols": [
    {
     "latex": "\\lambda",
     "meaning": "The wavelength of the X-ray or gamma-ray photon **before** it hits the electron, in meters (m)."
    },
    {
     "latex": "\\lambda'",
     "meaning": "The wavelength **after** scattering, in meters. It is never shorter than $\\lambda$."
    },
    {
     "latex": "\\theta",
     "meaning": "The **scattering angle**: the angle between the photon's original direction and its new direction."
    },
    {
     "latex": "h",
     "meaning": "Planck's constant, $6.62607015 \\times 10^{-34}$ J s."
    },
    {
     "latex": "m_e",
     "meaning": "The **mass of the electron**, $9.1093837 \\times 10^{-31}$ kg."
    },
    {
     "latex": "c",
     "meaning": "The speed of light in vacuum, $2.99792458 \\times 10^{8}$ m/s."
    }
   ],
   "worked_example": {
    "title": "An X-ray bouncing off an electron at 90 degrees",
    "setup": "An X-ray with wavelength $\\lambda = 0.0700$ nm scatters off a free electron at $\\theta = 90^\\circ$. Use the Compton wavelength $h / (m_e c) = 2.426 \\times 10^{-12}$ m.",
    "steps": [
     "Shift factor: $1 - \\cos 90^\\circ = 1 - 0 = 1$.",
     "Wavelength shift: $\\lambda' - \\lambda = (2.426 \\times 10^{-12}\\ \\text{m})(1) = 2.426 \\times 10^{-12}$ m, which is 0.002426 nm.",
     "New wavelength: $\\lambda' = 0.0700\\ \\text{nm} + 0.002426\\ \\text{nm} \\approx 0.07243$ nm."
    ],
    "answer": "The scattered X-ray has a wavelength of about 0.07243 nm, which is 2.426 picometers longer than before. The change is tiny, but it is measurable, and classical wave theory predicts no such change at this angle."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/photon-momentum/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/planck-einstein-relation/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/photoelectric-effect/"
   ],
   "sources": [
    {
     "title": "Compton scattering, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Compton_scattering"
    },
    {
     "title": "Compton wavelength, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Compton_wavelength"
    },
    {
     "title": "Arthur Compton, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Arthur_Compton"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/plancks-law",
   "title": "Planck's Law",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/plancks-law/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/plancks-law.md",
   "latex": "B_\\lambda(\\lambda, T) = \\frac{2 h c^2}{\\lambda^5} \\cdot \\frac{1}{e^{h c / (\\lambda k_B T)} - 1}",
   "one_liner": "Planck's law says how bright a hot object glows at each wavelength, and the mix of colors depends on its temperature.",
   "read_aloud": "B lambda of lambda and T equals two h c squared over lambda to the fifth, times one over e to the power of h c over lambda k B T, minus one. B lambda is the brightness at wavelength lambda, and T is the absolute temperature in kelvin.",
   "symbols": [
    {
     "latex": "B_\\lambda",
     "meaning": "The **spectral radiance**: the power emitted per unit area, per unit solid angle, per unit wavelength, in watts per square meter, per steradian, per meter (W sr$^{-1}$ m$^{-3}$)."
    },
    {
     "latex": "\\lambda",
     "meaning": "The **wavelength** of the light, in meters (m)."
    },
    {
     "latex": "T",
     "meaning": "The **absolute temperature** of the object, in kelvin (K). Celsius cannot be used directly."
    },
    {
     "latex": "h",
     "meaning": "Planck's constant, $6.62607015 \\times 10^{-34}$ J s."
    },
    {
     "latex": "c",
     "meaning": "The speed of light in vacuum, $2.99792458 \\times 10^{8}$ m/s."
    },
    {
     "latex": "k_B",
     "meaning": "The **Boltzmann constant**, $1.380649 \\times 10^{-23}$ J/K, which links temperature to energy."
    }
   ],
   "worked_example": {
    "title": "Brightness at 500 nm for a 5772 K surface",
    "setup": "The Sun's effective surface temperature is about 5772 K. Find the spectral radiance at $\\lambda = 500$ nm. Use $h = 6.62607015 \\times 10^{-34}$ J s, $c = 2.99792458 \\times 10^{8}$ m/s and $k_B = 1.380649 \\times 10^{-23}$ J/K.",
    "steps": [
     "Find the exponent: $x = \\frac{h c}{\\lambda k_B T} = \\frac{(6.62607015 \\times 10^{-34})(2.99792458 \\times 10^{8})}{(5.00 \\times 10^{-7})(1.380649 \\times 10^{-23})(5772)} \\approx 4.985$.",
     "Denominator of the formula: $e^{x} - 1 = e^{4.985} - 1 \\approx 145.3$.",
     "Prefactor: $\\frac{2 h c^2}{\\lambda^5} = \\frac{2 (6.62607015 \\times 10^{-34})(2.99792458 \\times 10^{8})^2}{(5.00 \\times 10^{-7})^5} \\approx 3.811 \\times 10^{15}$ W sr$^{-1}$ m$^{-3}$.",
     "Divide: $B_\\lambda = \\frac{3.811 \\times 10^{15}}{145.3} \\approx 2.624 \\times 10^{13}$ W sr$^{-1}$ m$^{-3}$."
    ],
    "answer": "At 500 nm a 5772 K surface emits a spectral radiance of about $2.62 \\times 10^{13}$ W sr$^{-1}$ m$^{-3}$. This is close to the peak of the Sun's spectrum, which is why sunlight looks white with a slight green peak."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/wiens-displacement-law/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/stefan-boltzmann-law/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/planck-einstein-relation/"
   ],
   "sources": [
    {
     "title": "Planck's law, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Planck%27s_law"
    },
    {
     "title": "Black body, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Black_body"
    },
    {
     "title": "Max Planck, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Max_Planck"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/wiens-displacement-law",
   "title": "Wien's Displacement Law",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/wiens-displacement-law/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/wiens-displacement-law.md",
   "latex": "\\lambda_{\\max} = \\frac{b}{T}",
   "one_liner": "Wien's law says a hotter object is brightest at a shorter wavelength, and the peak wavelength is a fixed constant divided by the temperature.",
   "read_aloud": "lambda max equals b over T. Lambda max is the wavelength where the glow is brightest, b is Wien's constant, and T is the absolute temperature in kelvin.",
   "symbols": [
    {
     "latex": "\\lambda_{\\max}",
     "meaning": "The **peak wavelength**: the wavelength at which the emitted light is brightest, in meters (m)."
    },
    {
     "latex": "b",
     "meaning": "**Wien's displacement constant**, $2.897771955 \\times 10^{-3}$ m K (meter kelvin)."
    },
    {
     "latex": "T",
     "meaning": "The **absolute temperature** of the object, in kelvin (K)."
    }
   ],
   "worked_example": {
    "title": "Peak of the Sun's light and a 3000 K filament",
    "setup": "The Sun's effective surface temperature is about 5772 K. A warm lamp filament is about 3000 K. Use $b = 2.897771955 \\times 10^{-3}$ m K.",
    "steps": [
     "Sun: $\\lambda_{\\max} = \\frac{2.897771955 \\times 10^{-3}\\ \\text{m K}}{5772\\ \\text{K}} \\approx 5.020 \\times 10^{-7}$ m.",
     "Convert to nanometers: $5.020 \\times 10^{-7}$ m $= 502.0$ nm, which is in the green part of the visible range.",
     "Filament: $\\lambda_{\\max} = \\frac{2.897771955 \\times 10^{-3}\\ \\text{m K}}{3000\\ \\text{K}} \\approx 9.659 \\times 10^{-7}$ m, or about 966 nm."
    ],
    "answer": "The Sun's peak falls near 502 nm, in the green part of the visible range. The 3000 K filament peaks near 966 nm, in the infrared, so most of its radiated energy is infrared rather than visible light."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/plancks-law/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/stefan-boltzmann-law/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/planck-einstein-relation/"
   ],
   "sources": [
    {
     "title": "Wien's displacement law, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Wien%27s_displacement_law"
    },
    {
     "title": "Black body, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Black_body"
    },
    {
     "title": "Fundamental physical constants, NIST",
     "url": "https://physics.nist.gov/cuu/Constants/"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/stefan-boltzmann-law",
   "title": "Stefan-Boltzmann Law",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/stefan-boltzmann-law/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/stefan-boltzmann-law.md",
   "latex": "P = \\varepsilon \\sigma A T^4",
   "one_liner": "The Stefan-Boltzmann law says a hot surface gives off radiated power that grows with the fourth power of its absolute temperature.",
   "read_aloud": "P equals epsilon sigma A T to the fourth. P is the radiated power, epsilon is the emissivity, sigma is the Stefan-Boltzmann constant, A is the surface area, and T is the absolute temperature in kelvin.",
   "symbols": [
    {
     "latex": "P",
     "meaning": "The **radiated power**: the total energy emitted per second, in watts (W)."
    },
    {
     "latex": "\\varepsilon",
     "meaning": "The **emissivity**, a number from 0 to 1. A perfect blackbody has $\\varepsilon = 1$, and real surfaces are lower."
    },
    {
     "latex": "\\sigma",
     "meaning": "The **Stefan-Boltzmann constant**, $5.670374419 \\times 10^{-8}$ W m$^{-2}$ K$^{-4}$."
    },
    {
     "latex": "A",
     "meaning": "The **surface area** in square meters (m$^2$)."
    },
    {
     "latex": "T",
     "meaning": "The **absolute temperature** in kelvin (K). The formula uses $T^4$, so it must be in kelvin."
    }
   ],
   "worked_example": {
    "title": "Radiated power from a 1 m$^2$ surface at 300 K",
    "setup": "A 1.00 m$^2$ perfect blackbody, so $\\varepsilon = 1$, is held at 300 K, close to room temperature. Use $\\sigma = 5.670374419 \\times 10^{-8}$ W m$^{-2}$ K$^{-4}$.",
    "steps": [
     "Fourth power of the temperature: $T^4 = 300^4 = 8.1 \\times 10^{9}$ K$^4$.",
     "Power per square meter: $\\sigma T^4 = (5.670374419 \\times 10^{-8})(8.1 \\times 10^{9}) \\approx 459.3$ W/m$^2$.",
     "Multiply by emissivity and area: $P = \\varepsilon \\sigma A T^4 = (1)(459.3\\ \\text{W/m}^2)(1.00\\ \\text{m}^2) \\approx 459.3$ W."
    ],
    "answer": "The surface radiates about 459.3 W. Nearly all of that is infrared light, which our eyes cannot see. A real surface with emissivity 0.5 would radiate about half as much at the same temperature."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/plancks-law/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/wiens-displacement-law/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/planck-einstein-relation/"
   ],
   "sources": [
    {
     "title": "Stefan-Boltzmann law, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Stefan%E2%80%93Boltzmann_law"
    },
    {
     "title": "Emissivity, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Emissivity"
    },
    {
     "title": "Fundamental physical constants, NIST",
     "url": "https://physics.nist.gov/cuu/Constants/"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/rydberg-formula",
   "title": "Rydberg Formula",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/rydberg-formula/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/rydberg-formula.md",
   "latex": "\\frac{1}{\\lambda} = R_H\\left(\\frac{1}{n_1^2} - \\frac{1}{n_2^2}\\right)",
   "one_liner": "The Rydberg formula predicts the exact color of light a hydrogen atom gives off when its electron drops from one energy level to a lower one.",
   "read_aloud": "One over lambda equals R H times, in brackets, one over n 1 squared minus one over n 2 squared. Lambda is the wavelength, R H is the Rydberg constant for hydrogen, and n 1 and n 2 are whole numbers, with n 2 larger than n 1.",
   "symbols": [
    {
     "latex": "\\lambda",
     "meaning": "The **wavelength** of the emitted or absorbed light, in meters (m)."
    },
    {
     "latex": "R_H",
     "meaning": "The **Rydberg constant for hydrogen**, $1.09678 \\times 10^{7}$ m$^{-1}$. The infinite-nucleus-mass value is $R_\\infty = 1.0973731568 \\times 10^{7}$ m$^{-1}$, and the small difference comes from the proton's finite mass."
    },
    {
     "latex": "n_1",
     "meaning": "The **lower** energy level, a whole number 1, 2, 3 and so on."
    },
    {
     "latex": "n_2",
     "meaning": "The **higher** energy level, a whole number greater than $n_1$."
    }
   ],
   "worked_example": {
    "title": "The H-alpha line, from n = 3 down to n = 2",
    "setup": "An electron falls from $n_2 = 3$ to $n_1 = 2$ in a hydrogen atom. Use $R_H = 1.09678 \\times 10^{7}$ m$^{-1}$.",
    "steps": [
     "Bracket: $\\frac{1}{2^2} - \\frac{1}{3^2} = \\frac{1}{4} - \\frac{1}{9} = \\frac{5}{36} \\approx 0.13889$.",
     "Multiply by $R_H$: $\\frac{1}{\\lambda} = (1.09678 \\times 10^{7}\\ \\text{m}^{-1})(0.13889) \\approx 1.5233 \\times 10^{6}$ m$^{-1}$.",
     "Invert to get the wavelength: $\\lambda = \\frac{1}{1.5233 \\times 10^{6}\\ \\text{m}^{-1}} \\approx 6.565 \\times 10^{-7}$ m, which is 656.5 nm."
    ],
    "answer": "The jump emits light of wavelength about 656.5 nm, the red H-alpha line. It is one of the reasons hydrogen gas glows red-pink in discharge tubes."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/hydrogen-energy-levels/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/hydrogen-like-atom-energy/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/planck-einstein-relation/"
   ],
   "sources": [
    {
     "title": "Rydberg formula, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Rydberg_formula"
    },
    {
     "title": "Hydrogen spectral series, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Hydrogen_spectral_series"
    },
    {
     "title": "Fundamental physical constants, NIST",
     "url": "https://physics.nist.gov/cuu/Constants/"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/bohr-radius",
   "title": "Bohr Radius",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/bohr-radius/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/bohr-radius.md",
   "latex": "a_0 = \\frac{4\\pi \\varepsilon_0 \\hbar^2}{m_e e^2}",
   "one_liner": "The Bohr radius is the natural size of a hydrogen atom, about 0.0529 nanometers, built from fixed physical constants.",
   "read_aloud": "a sub zero equals four pi epsilon sub zero h-bar squared, over m sub e times e squared. a sub zero is the Bohr radius, about 0.0529 nanometers.",
   "symbols": [
    {
     "latex": "a_0",
     "meaning": "The **Bohr radius**, about $5.29 \\times 10^{-11}$ m, or 0.0529 nm."
    },
    {
     "latex": "\\varepsilon_0",
     "meaning": "The **vacuum permittivity**, $8.8541878128 \\times 10^{-12}$ F/m. It sets the strength of electric forces."
    },
    {
     "latex": "\\hbar",
     "meaning": "The **reduced Planck constant**, $1.054571817 \\times 10^{-34}$ J s, which equals $h / 2\\pi$."
    },
    {
     "latex": "m_e",
     "meaning": "The **mass of the electron**, $9.1093837 \\times 10^{-31}$ kg."
    },
    {
     "latex": "e",
     "meaning": "The **elementary charge**, $1.602176634 \\times 10^{-19}$ C, the charge of one proton."
    }
   ],
   "worked_example": {
    "title": "Size of the n = 2 orbit in the Bohr model",
    "setup": "Find the radius of the second Bohr orbit in hydrogen, $n = 2$. Use $a_0 = 5.29 \\times 10^{-11}$ m, the Bohr radius.",
    "steps": [
     "Use $r_n = n^2 a_0$ with $n = 2$: $r_2 = 2^2 a_0 = 4 a_0$.",
     "Multiply: $r_2 = 4 \\times 5.29 \\times 10^{-11}\\ \\text{m} = 2.116 \\times 10^{-10}$ m.",
     "Convert to nanometers: $2.116 \\times 10^{-10}$ m $= 0.2116$ nm."
    ],
    "answer": "The n = 2 orbit in the Bohr model has a radius of about 0.2116 nm, four times the Bohr radius. This is a model size, not a measured orbit of an electron."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/hydrogen-energy-levels/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/hydrogen-like-atom-energy/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/schrodinger-equation/"
   ],
   "sources": [
    {
     "title": "Bohr radius, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Bohr_radius"
    },
    {
     "title": "Bohr model, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Bohr_model"
    },
    {
     "title": "Fundamental physical constants, NIST",
     "url": "https://physics.nist.gov/cuu/Constants/"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/hydrogen-like-atom-energy",
   "title": "Hydrogen-Like Atom Energy",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/hydrogen-like-atom-energy/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/hydrogen-like-atom-energy.md",
   "latex": "E_n = -\\frac{Z^2}{n^2} \\times 13.605693\\ \\text{eV}",
   "one_liner": "An atom or ion with only one electron has energy levels that follow the hydrogen pattern, scaled up by the square of its nuclear charge.",
   "read_aloud": "E sub n equals negative Z squared over n squared, times 13.605693 electron volts. E sub n is the energy of level n, Z is the nuclear charge, and n is the level number.",
   "symbols": [
    {
     "latex": "E_n",
     "meaning": "The **energy** of the electron in level $n$, in electron volts (eV). It is negative because the electron is bound to the nucleus."
    },
    {
     "latex": "Z",
     "meaning": "The **nuclear charge** in units of the proton charge, which equals the number of protons in the nucleus. Hydrogen has $Z = 1$, and singly ionized helium, He$^+$, has $Z = 2$."
    },
    {
     "latex": "n",
     "meaning": "The **principal quantum number**, a whole number 1, 2, 3 and so on. A larger $n$ means a higher level."
    },
    {
     "latex": "13.605693\\ \\text{eV}",
     "meaning": "The **Rydberg energy**, the ionization energy of hydrogen from its ground state, in electron volts (eV)."
    }
   ],
   "worked_example": {
    "title": "Ground state and first jump of He$^+$",
    "setup": "Find the ground-state energy of He$^+$, which has $Z = 2$ and $n = 1$, and the energy of the photon emitted when its electron falls from $n = 2$ to $n = 1$. Use 13.605693 eV for the constant.",
    "steps": [
     "Ground state: $E_1 = -\\frac{2^2}{1^2} \\times 13.605693\\ \\text{eV} = -54.4228$ eV.",
     "Level 2: $E_2 = -\\frac{2^2}{2^2} \\times 13.605693\\ \\text{eV}$, or $E_2 = -13.6057$ eV for $Z = 2$ at $n = 2$.",
     "Photon energy: $E_{\\text{photon}} = E_2 - E_1 = (-13.6057) - (-54.4228) \\approx 40.8171$ eV.",
     "Wavelength: $\\lambda = \\frac{1239.84\\ \\text{eV nm}}{40.8171\\ \\text{eV}} \\approx 30.38$ nm."
    ],
    "answer": "The He$^+$ ground state is $-54.42$ eV. The jump from $n = 2$ to $n = 1$ emits a photon of about 40.82 eV with a wavelength near 30.38 nm, in the extreme ultraviolet. Hydrogen's same jump is only about 10.2 eV, since the He$^+$ energies are four times larger."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/hydrogen-energy-levels/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/rydberg-formula/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/bohr-radius/"
   ],
   "sources": [
    {
     "title": "Hydrogen-like atom, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Hydrogen-like_atom"
    },
    {
     "title": "Bohr model, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Bohr_model"
    },
    {
     "title": "Rydberg formula, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Rydberg_formula"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/electron-shell-capacity",
   "title": "Electron Shell Capacity",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/electron-shell-capacity/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/electron-shell-capacity.md",
   "latex": "N_{\\max} = 2 n^2",
   "one_liner": "The shell with number n can hold at most twice n squared electrons, because it has n squared places and each place takes two electrons.",
   "read_aloud": "N max equals 2 times n squared. N max is the most electrons a shell can hold, and n is the shell number: 1, 2, 3 and so on.",
   "symbols": [
    {
     "latex": "N_{\\max}",
     "meaning": "The **maximum number of electrons** that the shell with number $n$ can hold. It is a whole number."
    },
    {
     "latex": "n",
     "meaning": "The **shell number**, the principal quantum number: 1, 2, 3 and so on. Shell 1 is closest to the nucleus."
    }
   ],
   "worked_example": {
    "title": "Electrons in potassium, element 19",
    "setup": "A neutral potassium atom has 19 electrons. The shell limits are $N_{\\max} = 2 n^2$, which gives 2 for shell 1, 8 for shell 2, 18 for shell 3 and 32 for shell 4. Find how the 19 electrons fill the shells.",
    "steps": [
     "Shell 1 holds up to 2 electrons. Put 2 in it, leaving $19 - 2 = 17$.",
     "Shell 2 holds up to 8 electrons. Put 8 in it, leaving $17 - 8 = 9$.",
     "Shell 3 could hold 18, but the 4s subshell fills before the last 3d subshell. Put 8 in shell 3 (2 in 3s and 6 in 3p), leaving $9 - 8 = 1$.",
     "The last electron goes into the 4s subshell of shell 4."
    ],
    "answer": "Potassium's 19 electrons are arranged 2, 8, 8, 1 across the first four shells. Shell 3 has room for 18 but holds only 8, because the last electron goes into 4s rather than 3d. The configuration is written $1s^2\\ 2s^2\\ 2p^6\\ 3s^2\\ 3p^6\\ 4s^1$."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/hydrogen-energy-levels/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/bohr-radius/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/spin-one-half/"
   ],
   "sources": [
    {
     "title": "Electron shell, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electron_shell"
    },
    {
     "title": "Aufbau principle, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Aufbau_principle"
    },
    {
     "title": "Electron configuration, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Electron_configuration"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/particle-in-a-box",
   "title": "Particle in a Box",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/particle-in-a-box/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/particle-in-a-box.md",
   "latex": "E_n = \\frac{n^2 h^2}{8 m L^2}, \\qquad n = 1, 2, 3, \\dots",
   "one_liner": "A particle trapped between two walls can only have certain energies, and this formula gives them: the narrower the box, the higher the energies.",
   "read_aloud": "E sub n equals n squared times h squared, divided by 8 times m times L squared. E sub n is the energy of level n, n is the level number starting at 1, h is Planck's constant, m is the particle's mass and L is the width of the box.",
   "symbols": [
    {
     "latex": "E_n",
     "meaning": "The energy of level $n$, in joules (J). Atoms and molecules are often described in electron volts (eV) instead, where $1\\ \\text{eV} = 1.602 \\times 10^{-19}$ J."
    },
    {
     "latex": "n",
     "meaning": "The level number, a whole number starting at 1: $n = 1, 2, 3, \\dots$. It counts the half-waves that fit inside the box."
    },
    {
     "latex": "h",
     "meaning": "Planck's constant, $6.62607015 \\times 10^{-34}$ J s (joule seconds). Its value is exact by definition in the SI system."
    },
    {
     "latex": "m",
     "meaning": "The mass of the particle, in kilograms (kg). For an electron, $m = 9.1093837 \\times 10^{-31}$ kg."
    },
    {
     "latex": "L",
     "meaning": "The width of the box, in meters (m). The walls sit at the two ends, and the particle stays between them."
    }
   ],
   "worked_example": {
    "title": "An electron in a 1.0 nm box",
    "setup": "An electron (mass $m = 9.1093837 \\times 10^{-31}$ kg) is trapped in a box of width $L = 1.0$ nm $= 1.0 \\times 10^{-9}$ m. Find the energies of the first three levels in electron volts (eV), and the energy needed to move from level 1 to level 2.",
    "steps": [
     "Level 1 in joules: $E_1 = \\frac{h^2}{8 m L^2} = \\frac{(6.62607015 \\times 10^{-34})^2}{8 (9.1093837 \\times 10^{-31})(1.0 \\times 10^{-9})^2} \\approx 6.02 \\times 10^{-20}$ J.",
     "Convert to electron volts: $E_1 = \\frac{6.02 \\times 10^{-20}}{1.602 \\times 10^{-19}} \\approx 0.376$ eV.",
     "Level 2: $E_2 = 2^2 E_1 = 4 E_1 \\approx 1.50$ eV.",
     "Level 3: $E_3 = 3^2 E_1 = 9 E_1 \\approx 3.38$ eV.",
     "Energy to go from level 1 to level 2: $E_2 - E_1 = 3 E_1 \\approx 1.13$ eV."
    ],
    "answer": "The first three levels of this electron are **0.376 eV**, **1.50 eV** and **3.38 eV**. Moving from level 1 to level 2 takes about **1.13 eV**. The lowest level is above zero, because a wave that must vanish at both walls cannot be flat."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/schrodinger-equation/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/quantum-harmonic-oscillator/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/hydrogen-energy-levels/"
   ],
   "sources": [
    {
     "title": "Particle in a box, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Particle_in_a_box"
    },
    {
     "title": "Planck constant, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Planck_constant"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/quantum-harmonic-oscillator",
   "title": "Quantum Harmonic Oscillator",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/quantum-harmonic-oscillator/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/quantum-harmonic-oscillator.md",
   "latex": "E_n = \\hbar \\omega \\left(n + \\frac{1}{2}\\right), \\qquad n = 0, 1, 2, \\dots",
   "one_liner": "A quantum particle on a spring can only have energies in equal steps, and even its lowest step sits above zero.",
   "read_aloud": "E sub n equals h-bar times omega times the quantity n plus one half. E sub n is the energy of level n, h-bar is the reduced Planck constant, omega is the angular frequency, and n is the level number, starting at 0.",
   "symbols": [
    {
     "latex": "E_n",
     "meaning": "The energy of level $n$, in joules (J). For molecules, electron volts (eV) are more convenient: $1\\ \\text{eV} = 1.602 \\times 10^{-19}$ J."
    },
    {
     "latex": "n",
     "meaning": "The level number, $n = 0, 1, 2, \\dots$. Level 0 is the ground state, the lowest energy the oscillator can have."
    },
    {
     "latex": "\\hbar",
     "meaning": "The reduced Planck constant, $1.054571817 \\times 10^{-34}$ J s (joule seconds)."
    },
    {
     "latex": "\\omega",
     "meaning": "The angular frequency, in radians per second (rad/s). It equals $2\\pi f$, where $f$ is the ordinary frequency in hertz (Hz)."
    }
   ],
   "worked_example": {
    "title": "Vibration of a C-H bond",
    "setup": "A carbon-hydrogen (C-H) bond in a molecule vibrates with a frequency of about $f = 9.0 \\times 10^{13}$ Hz. That is close to the stretching frequency of C-H bonds, about 3000 waves per centimeter in spectroscopy units. Find the zero-point energy and the energy of the first excited level, in electron volts (eV).",
    "steps": [
     "Angular frequency: $\\omega = 2\\pi f = 2\\pi (9.0 \\times 10^{13}\\ \\text{Hz}) \\approx 5.65 \\times 10^{14}$ rad/s.",
     "Energy step: $\\hbar\\omega = (1.054571817 \\times 10^{-34})(5.65 \\times 10^{14}) \\approx 5.96 \\times 10^{-20}$ J.",
     "In electron volts: $\\hbar\\omega \\approx \\frac{5.96 \\times 10^{-20}}{1.602 \\times 10^{-19}} \\approx 0.372$ eV.",
     "Zero-point energy: $E_0 = \\frac{1}{2}\\hbar\\omega \\approx 0.186$ eV.",
     "First excited level: $E_1 = \\frac{3}{2}\\hbar\\omega \\approx 0.558$ eV.",
     "Wavelength of a photon with energy $\\hbar\\omega = hf$: $\\lambda = \\frac{c}{f} = \\frac{3.00 \\times 10^{8}\\ \\text{m/s}}{9.0 \\times 10^{13}\\ \\text{Hz}} \\approx 3.33 \\times 10^{-6}$ m."
    ],
    "answer": "The lowest vibrational energy of this bond is **0.186 eV**, and the energy steps are **0.372 eV**. A photon with that energy has a wavelength of about **3.3 micrometers**, in the infrared, which is why bonds like this absorb infrared light."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/particle-in-a-box/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/planck-einstein-relation/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/heisenberg-uncertainty-principle/"
   ],
   "sources": [
    {
     "title": "Quantum harmonic oscillator, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Quantum_harmonic_oscillator"
    },
    {
     "title": "Zero-point energy, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Zero-point_energy"
    },
    {
     "title": "Infrared spectroscopy, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Infrared_spectroscopy"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/quantum-tunneling-probability",
   "title": "Quantum Tunneling Probability",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/quantum-tunneling-probability/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/quantum-tunneling-probability.md",
   "latex": "T \\approx e^{-2\\kappa L}",
   "one_liner": "A quantum particle can sometimes pass through a barrier that is too high for it to climb over, and this formula estimates how often.",
   "read_aloud": "T is approximately e to the power of minus 2 kappa L. T is the chance that the particle gets through the barrier, kappa is how fast the wave fades inside the barrier, and L is the width of the barrier.",
   "symbols": [
    {
     "latex": "T",
     "meaning": "The transmission probability, the chance that the particle gets through the barrier. It is a number from 0 to 1 and has no units."
    },
    {
     "latex": "e",
     "meaning": "Euler's number, about 2.718, the base of natural logarithms. It is not the elementary charge."
    },
    {
     "latex": "\\kappa",
     "meaning": "The decay constant inside the barrier, in 1/m. It equals $\\kappa = \\frac{\\sqrt{2m(V_0 - E)}}{\\hbar}$. A large $\\kappa$ means the wave dies out quickly as it enters the barrier."
    },
    {
     "latex": "L",
     "meaning": "The width of the barrier, in meters (m)."
    },
    {
     "latex": "m",
     "meaning": "The mass of the particle, in kilograms (kg)."
    },
    {
     "latex": "E",
     "meaning": "The energy of the particle, in joules (J). The formula assumes $E < V_0$, so the particle does not have enough energy to go over the barrier."
    },
    {
     "latex": "V_0",
     "meaning": "The height of the barrier, in joules (J). It is the potential energy at the top of the barrier."
    },
    {
     "latex": "\\hbar",
     "meaning": "The reduced Planck constant, $1.054571817 \\times 10^{-34}$ J s."
    }
   ],
   "worked_example": {
    "title": "An electron meets a 3.0 eV barrier",
    "setup": "An electron with energy $E = 0.20$ eV meets a barrier of height $V_0 = 3.0$ eV and width $L = 0.30$ nm $= 3.0 \\times 10^{-10}$ m. The electron mass is $m = 9.1093837 \\times 10^{-31}$ kg. Estimate the chance $T$ that the electron tunnels through.",
    "steps": [
     "Missing energy: $V_0 - E = 3.0$ eV $- 0.20$ eV $= 2.8$ eV $= 2.8 \\times 1.602 \\times 10^{-19}$ J $\\approx 4.486 \\times 10^{-19}$ J.",
     "Decay constant: $\\kappa = \\frac{\\sqrt{2 m (V_0 - E)}}{\\hbar} = \\frac{\\sqrt{2 (9.1093837 \\times 10^{-31})(4.486 \\times 10^{-19})}}{1.054571817 \\times 10^{-34}} \\approx 8.573 \\times 10^{9}\\ \\text{m}^{-1}$.",
     "Width times decay constant: $\\kappa L \\approx (8.573 \\times 10^{9}\\ \\text{m}^{-1})(3.0 \\times 10^{-10}\\ \\text{m}) \\approx 2.572$.",
     "Exponent: $2\\kappa L \\approx 2 \\times 2.572 = 5.144$.",
     "Estimate: $T \\approx e^{-5.144} \\approx 0.0058$, or about 0.58 percent.",
     "Prefactor check: $\\frac{16E}{V_0}\\left(1 - \\frac{E}{V_0}\\right) = 16 \\times \\frac{0.20}{3.0} \\times \\frac{2.8}{3.0} \\approx 0.996$, so the dropped prefactor is almost exactly 1 here."
    ],
    "answer": "The chance that the electron tunnels is about **0.58 percent**, or roughly **1 in 170**. That is small but not zero. Doubling the barrier width to 0.60 nm would make the chance roughly 170 times smaller."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/schrodinger-equation/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/born-rule/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/de-broglie-wavelength/"
   ],
   "sources": [
    {
     "title": "Quantum tunnelling, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Quantum_tunnelling"
    },
    {
     "title": "Scanning tunneling microscope, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Scanning_tunneling_microscope"
    },
    {
     "title": "Alpha decay, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Alpha_decay"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/wave-function-normalization",
   "title": "Wave Function Normalization",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/wave-function-normalization/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/wave-function-normalization.md",
   "latex": "\\int_{-\\infty}^{\\infty} |\\psi(x)|^2\\, dx = 1",
   "one_liner": "Normalizing a wave function means scaling it so the chances of finding the particle, added over every place, total exactly one.",
   "read_aloud": "The integral from minus infinity to plus infinity of the squared size of psi of x, times d x, equals 1. In words: add up the probability density over every position, and the total must be exactly one.",
   "symbols": [
    {
     "latex": "\\int_{-\\infty}^{\\infty}",
     "meaning": "The integral over all positions, from minus infinity to plus infinity. It adds up many thin slices, each of width $dx$."
    },
    {
     "latex": "|\\psi(x)|^2",
     "meaning": "The probability density at position $x$, the squared size of the wave function. In one dimension it has units of $\\text{m}^{-1}$."
    },
    {
     "latex": "\\psi(x)",
     "meaning": "The wave function at position $x$. It is a complex number with units of $\\text{m}^{-1/2}$ in one dimension."
    },
    {
     "latex": "x",
     "meaning": "The position along a line, in meters (m)."
    },
    {
     "latex": "dx",
     "meaning": "A very thin slice of position, of width $dx$, in meters (m). The integral adds these slices up."
    }
   ],
   "worked_example": {
    "title": "A particle spread over a 2.0 m track",
    "setup": "A particle moves along a track 2.0 m long. Its wave function is a constant $C$ between $x = 0$ and $x = 2.0$ m, and zero everywhere else. Find the value of $C$ that normalizes the wave function, then find the chance that the particle is in the first meter of the track.",
    "steps": [
     "Only the track contributes, because $\\psi = 0$ outside it: $\\int_{-\\infty}^{\\infty} |\\psi|^2\\, dx = \\int_{0}^{2.0} C^2\\, dx = 2.0\\, C^2$.",
     "Set the total to 1: $2.0\\, C^2 = 1$, so $C^2 = 0.5$.",
     "Take the square root: $C = \\sqrt{0.5} \\approx 0.707\\ \\text{m}^{-1/2}$.",
     "Chance in the first meter: $\\int_{0}^{1.0} C^2\\, dx = C^2 \\times 1.0\\ \\text{m} = 0.5 \\times 1.0 = 0.5$."
    ],
    "answer": "The normalizing constant is $C \\approx 0.707\\ \\text{m}^{-1/2}$. The chance of finding the particle in the first meter is **0.5**, or **50 percent**, which is half the track, as an even spread would give."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/born-rule/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/expectation-value/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/schrodinger-equation/"
   ],
   "sources": [
    {
     "title": "Wave function, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Wave_function"
    },
    {
     "title": "Born rule, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Born_rule"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/expectation-value",
   "title": "Expectation Value",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/expectation-value/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/expectation-value.md",
   "latex": "\\langle x \\rangle = \\int_{-\\infty}^{\\infty} x\\, |\\psi(x)|^2\\, dx",
   "one_liner": "The expectation value is the average result you would get if you repeated a measurement many times on identical particles.",
   "read_aloud": "The expectation value of x, written with angle brackets, equals the integral from minus infinity to plus infinity of x times the squared size of psi of x, times d x. It gives the average position.",
   "symbols": [
    {
     "latex": "\\langle x \\rangle",
     "meaning": "The expectation value of position: the average position over many measurements on identical particles, in meters (m)."
    },
    {
     "latex": "x",
     "meaning": "The position, in meters (m). Inside the integral it is the value being averaged."
    },
    {
     "latex": "|\\psi(x)|^2",
     "meaning": "The probability density at position $x$, which acts as the weight for each position. Its units are $\\text{m}^{-1}$."
    },
    {
     "latex": "\\psi(x)",
     "meaning": "The wave function at position $x$, a complex number. Its squared size gives the probability density."
    },
    {
     "latex": "dx",
     "meaning": "A thin slice of position, of width $dx$, in meters (m). The integral adds these slices up."
    },
    {
     "latex": "\\int_{-\\infty}^{\\infty}",
     "meaning": "The integral over all positions. It is the continuous version of a sum."
    },
    {
     "latex": "a_i",
     "meaning": "The possible result number $i$ of a measurement, such as one energy value. In the discrete version these are the only values that can come out."
    },
    {
     "latex": "P(a_i)",
     "meaning": "The probability of result $a_i$. All the probabilities add up to 1."
    }
   ],
   "worked_example": {
    "title": "Average energy from a measurement",
    "setup": "A measurement of the energy of a particle gives one of three values. The value 1 eV has probability 0.5, the value 2 eV has probability 0.3, and the value 4 eV has probability 0.2. Find the expectation value of the energy.",
    "steps": [
     "Check the probabilities: $0.5 + 0.3 + 0.2 = 1.0$.",
     "Multiply each value by its probability: $1 \\times 0.5 = 0.5$ eV, $2 \\times 0.3 = 0.6$ eV and $4 \\times 0.2 = 0.8$ eV.",
     "Add the three products: $\\langle E \\rangle = 0.5 + 0.6 + 0.8 = 1.9$ eV."
    ],
    "answer": "The expectation value of the energy is **1.9 eV**. No single measurement gives 1.9 eV, because the possible results are only 1, 2 and 4 eV. Over many measurements, though, the average of the results gets close to 1.9 eV."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/born-rule/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/wave-function-normalization/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/heisenberg-uncertainty-principle/"
   ],
   "sources": [
    {
     "title": "Expectation value (quantum mechanics), Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Expectation_value_(quantum_mechanics)"
    },
    {
     "title": "Expected value, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Expected_value"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/qubit-state",
   "title": "Qubit State",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/qubit-state/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/qubit-state.md",
   "latex": "|\\psi\\rangle = \\alpha|0\\rangle + \\beta|1\\rangle, \\qquad |\\alpha|^2 + |\\beta|^2 = 1",
   "one_liner": "A qubit is a quantum bit that can hold a mix of 0 and 1, described by two amplitudes whose squared sizes give the chances of each result.",
   "read_aloud": "Ket psi equals alpha times ket 0, plus beta times ket 1, where the squared size of alpha plus the squared size of beta equals 1. Psi is the qubit state, alpha and beta are its amplitudes, and 0 and 1 are the two basis states.",
   "symbols": [
    {
     "latex": "|\\psi\\rangle",
     "meaning": "The state of the qubit, written in Dirac's ket notation. It is described by two complex numbers, the amplitudes $\\alpha$ and $\\beta$."
    },
    {
     "latex": "|0\\rangle",
     "meaning": "The basis state 0, one of the two outcomes you can measure. Like a classical bit, it is one definite value."
    },
    {
     "latex": "|1\\rangle",
     "meaning": "The basis state 1, the other possible measurement outcome."
    },
    {
     "latex": "\\alpha",
     "meaning": "The amplitude of $|0\\rangle$. It is a complex number, with a size and a phase. Its squared size $|\\alpha|^2$ is the probability of measuring 0."
    },
    {
     "latex": "\\beta",
     "meaning": "The amplitude of $|1\\rangle$, also complex. Its squared size $|\\beta|^2$ is the probability of measuring 1."
    },
    {
     "latex": "|\\alpha|^2 + |\\beta|^2",
     "meaning": "The total probability. It must equal 1, because a measurement always gives 0 or 1."
    }
   ],
   "worked_example": {
    "title": "Measurement odds for an unequal qubit",
    "setup": "A qubit is prepared in the state $|\\psi\\rangle = \\alpha|0\\rangle + \\beta|1\\rangle$, with $\\alpha = \\frac{1}{\\sqrt{3}}$ and $\\beta = i\\sqrt{\\frac{2}{3}}$, where $i$ is the imaginary unit with $i^2 = -1$. Check that the state is valid, then find the chance of measuring 0 and the chance of measuring 1.",
    "steps": [
     "Probability of 0: $|\\alpha|^2 = \\left(\\frac{1}{\\sqrt{3}}\\right)^2 = \\frac{1}{3} \\approx 0.333$.",
     "Probability of 1: $|\\beta|^2 = \\left|i\\sqrt{\\frac{2}{3}}\\right|^2 = \\frac{2}{3} \\approx 0.667$. The factor $i$ has size 1, so it does not change the size of $\\beta$.",
     "Check the total: $\\frac{1}{3} + \\frac{2}{3} = 1$, so the state is normalized and valid."
    ],
    "answer": "The state is valid. There is a **33.3 percent** chance of measuring 0 and a **66.7 percent** chance of measuring 1. The factor $i$ in $\\beta$ does not change either number."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/bloch-sphere/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/born-rule/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/wave-function-normalization/"
   ],
   "sources": [
    {
     "title": "Qubit, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Qubit"
    },
    {
     "title": "Bra-ket notation, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Bra%E2%80%93ket_notation"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/bloch-sphere",
   "title": "Bloch Sphere",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/bloch-sphere/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/bloch-sphere.md",
   "latex": "|\\psi\\rangle = \\cos\\frac{\\theta}{2}|0\\rangle + e^{i\\varphi}\\sin\\frac{\\theta}{2}|1\\rangle, \\qquad P(0) = \\cos^2\\frac{\\theta}{2}",
   "one_liner": "The Bloch sphere is a ball whose points are all the possible single-qubit states, with the top and bottom poles as 0 and 1.",
   "read_aloud": "Ket psi equals cosine of theta over 2, times ket 0, plus e to the i phi times sine of theta over 2, times ket 1. The chance of measuring 0 is cosine squared of theta over 2. Theta is the angle from the top pole, and phi is the angle around the vertical axis.",
   "symbols": [
    {
     "latex": "|\\psi\\rangle",
     "meaning": "The qubit state. On the Bloch sphere, each point stands for one state, up to an overall phase that has no physical effect."
    },
    {
     "latex": "\\theta",
     "meaning": "The polar angle, measured from the top pole $|0\\rangle$ down to the bottom pole $|1\\rangle$. It runs from 0 to $\\pi$ radians, which is 0 to 180 degrees."
    },
    {
     "latex": "\\varphi",
     "meaning": "The azimuthal angle, the angle around the vertical axis. It sets the relative phase between $|0\\rangle$ and $|1\\rangle$, and runs from 0 to $2\\pi$ radians."
    },
    {
     "latex": "|0\\rangle",
     "meaning": "The basis state at the top pole, where $\\theta = 0$."
    },
    {
     "latex": "|1\\rangle",
     "meaning": "The basis state at the bottom pole, where $\\theta = \\pi$."
    },
    {
     "latex": "\\cos\\frac{\\theta}{2}",
     "meaning": "The amplitude of $|0\\rangle$. Its squared size is the probability of measuring 0."
    },
    {
     "latex": "e^{i\\varphi}",
     "meaning": "A phase factor with size 1. It turns the phase of the $|1\\rangle$ amplitude by the angle $\\varphi$ without changing its size."
    },
    {
     "latex": "\\sin\\frac{\\theta}{2}",
     "meaning": "The size of the amplitude of $|1\\rangle$. Its squared size is the probability of measuring 1."
    },
    {
     "latex": "P(0)",
     "meaning": "The probability of measuring 0. It equals $\\cos^2\\frac{\\theta}{2}$."
    }
   ],
   "worked_example": {
    "title": "A qubit at 60 degrees",
    "setup": "A qubit has $\\theta = 60^\\circ$ and $\\varphi = 90^\\circ$. Find the probability of measuring 0 and the probability of measuring 1. Start with the half angle, $\\frac{\\theta}{2} = 30^\\circ$.",
    "steps": [
     "Half angle: $\\frac{\\theta}{2} = \\frac{60^\\circ}{2} = 30^\\circ$.",
     "Amplitude of $|0\\rangle$: $\\cos 30^\\circ = \\frac{\\sqrt{3}}{2} \\approx 0.866$.",
     "Probability of 0: $P(0) = \\cos^2 30^\\circ = \\frac{3}{4} = 0.75$.",
     "Probability of 1: $\\sin^2 30^\\circ = \\frac{1}{4} = 0.25$, which also equals $1 - 0.75$.",
     "The angle $\\varphi = 90^\\circ$ gives $e^{i\\varphi} = i$. This factor has size 1, so it does not change either probability."
    ],
    "answer": "The chance of measuring 0 is **75 percent**, and the chance of measuring 1 is **25 percent**. The point sits closer to the top pole. Its height is $z = \\cos 60^\\circ = 0.5$, which equals $0.75 - 0.25$."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/qubit-state/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/born-rule/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/wave-function-normalization/"
   ],
   "sources": [
    {
     "title": "Bloch sphere, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Bloch_sphere"
    },
    {
     "title": "Qubit, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Qubit"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/stationary-state-time-evolution",
   "title": "Stationary State Time Evolution",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/stationary-state-time-evolution/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/stationary-state-time-evolution.md",
   "latex": "\\Psi(x, t) = \\psi(x)\\, e^{-i E t/\\hbar}, \\qquad |\\Psi(x, t)|^2 = |\\psi(x)|^2",
   "one_liner": "A stationary state has one fixed energy, and its chances of finding the particle stay the same even though its phase keeps turning.",
   "read_aloud": "Psi of x and t equals psi of x, times e to the power of minus i times E times t over h-bar. The probability density, the squared size of psi of x and t, equals the squared size of psi of x, so it does not change with time. Psi is the full wave function, psi is its position part, E is the energy and t is time.",
   "symbols": [
    {
     "latex": "\\Psi(x, t)",
     "meaning": "The full wave function, which depends on both position $x$ and time $t$. In one dimension its units are $\\text{m}^{-1/2}$."
    },
    {
     "latex": "\\psi(x)",
     "meaning": "The position part of the wave function. It does not depend on time and solves $\\hat{H}\\psi = E\\psi$."
    },
    {
     "latex": "e^{-i E t/\\hbar}",
     "meaning": "The time-dependent phase factor. It has size 1 at every time, so it only turns the phase of the wave."
    },
    {
     "latex": "E",
     "meaning": "The fixed energy of the stationary state, in joules (J). It is the same at every time."
    },
    {
     "latex": "t",
     "meaning": "Time, in seconds (s)."
    },
    {
     "latex": "\\hbar",
     "meaning": "The reduced Planck constant, $1.054571817 \\times 10^{-34}$ J s. It makes $E t / \\hbar$ a pure number."
    },
    {
     "latex": "|\\Psi(x, t)|^2",
     "meaning": "The probability density at position $x$ and time $t$. For a stationary state it equals $|\\psi(x)|^2$ at every time."
    }
   ],
   "worked_example": {
    "title": "A box electron at two times",
    "setup": "The electron in the lowest state of a 1.0 nm box has energy $E = 6.02 \\times 10^{-20}$ J (0.376 eV). Its position part is $\\psi(x) = \\sqrt{2/L}\\,\\sin(\\pi x / L)$ with $L = 1.0$ nm. Compare the probability density at $x = L/4$ at time $t = 0$ and at time $t = 1.0$ fs ($1.0 \\times 10^{-15}$ s).",
    "steps": [
     "Phase angle after 1.0 fs: $\\frac{E t}{\\hbar} = \\frac{(6.02 \\times 10^{-20}\\ \\text{J})(1.0 \\times 10^{-15}\\ \\text{s})}{1.054571817 \\times 10^{-34}\\ \\text{J s}} \\approx 0.571$ rad, about 33 degrees.",
     "Position part at $x = L/4$: $\\psi = \\sqrt{\\frac{2}{L}}\\sin\\frac{\\pi}{4} \\approx 3.16 \\times 10^{4}\\ \\text{m}^{-1/2}$, so $|\\psi|^2 = 1.00 \\times 10^{9}\\ \\text{m}^{-1}$.",
     "At $t = 0$ the phase factor is 1, so $|\\Psi|^2 = |\\psi|^2 = 1.00 \\times 10^{9}\\ \\text{m}^{-1}$.",
     "At $t = 1.0$ fs, $\\Psi = \\psi\\, e^{-0.571 i}$, so $|\\Psi|^2 = \\psi^2\\left(\\cos^2 0.571 + \\sin^2 0.571\\right) = \\psi^2 = 1.00 \\times 10^{9}\\ \\text{m}^{-1}$."
    ],
    "answer": "The density at $x = L/4$ is the same at both times, **$1.00 \\times 10^{9}\\ \\text{m}^{-1}$**. The phase of $\\Psi$ has turned by 0.571 rad, but the probability density has not changed."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/schrodinger-equation/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/particle-in-a-box/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/born-rule/"
   ],
   "sources": [
    {
     "title": "Schrödinger equation, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Schr%C3%B6dinger_equation"
    },
    {
     "title": "Stationary state, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Stationary_state"
    },
    {
     "title": "Wave packet, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Wave_packet"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/energy-time-uncertainty",
   "title": "Energy-Time Uncertainty Relation",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/energy-time-uncertainty/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/energy-time-uncertainty.md",
   "latex": "\\Delta E \\, \\Delta t \\gtrsim \\frac{\\hbar}{2}",
   "one_liner": "A state that lasts only a short time cannot have one sharp energy, so the light it gives off has a blurred color.",
   "read_aloud": "Delta E times delta t is greater than or about equal to h-bar divided by two. Delta E is the spread in energy, delta t is the time scale of the change, and h-bar is the reduced Planck constant.",
   "symbols": [
    {
     "latex": "\\Delta E",
     "meaning": "The spread in energy of the state, in joules (J) or electron volts (eV)."
    },
    {
     "latex": "\\Delta t",
     "meaning": "A time scale, in seconds (s). Read it as a lifetime, or as the time the state needs to change noticeably."
    },
    {
     "latex": "\\gtrsim",
     "meaning": "\"Greater than or about equal to\": the product can be a little smaller in rough estimates, but the number on the right sets the scale."
    },
    {
     "latex": "\\hbar",
     "meaning": "The reduced Planck constant, $h / 2\\pi = 1.054571817 \\times 10^{-34}$ J s (joule seconds)."
    }
   ],
   "worked_example": {
    "title": "The line width of a short-lived excited atom",
    "setup": "An excited atomic state has a lifetime of $\\tau = 1.0 \\times 10^{-8}$ s. This is an assumed round number for the example, not a measured value. Use $\\hbar = 1.054571817 \\times 10^{-34}$ J s, $h = 6.62607015 \\times 10^{-34}$ J s and $e = 1.602176634 \\times 10^{-19}$ C.",
    "steps": [
     "Smallest energy spread: $\\Delta E \\gtrsim \\frac{\\hbar}{2\\,\\tau} = \\frac{1.054571817 \\times 10^{-34}\\ \\text{J s}}{2 \\times 1.0 \\times 10^{-8}\\ \\text{s}} \\approx 5.27 \\times 10^{-27}$ J.",
     "Convert to electron volts: $\\frac{5.27 \\times 10^{-27}\\ \\text{J}}{1.602176634 \\times 10^{-19}\\ \\text{J/eV}} \\approx 3.29 \\times 10^{-8}$ eV.",
     "Frequency spread: $\\Delta \\nu = \\frac{\\Delta E}{h} = \\frac{5.27 \\times 10^{-27}\\ \\text{J}}{6.62607015 \\times 10^{-34}\\ \\text{J s}} \\approx 7.96 \\times 10^{6}$ Hz, about 8 MHz.",
     "Compare with the light itself. Light at 500 nm has a frequency of $c / \\lambda = 299792458 / 5.00 \\times 10^{-7} \\approx 6.0 \\times 10^{14}$ Hz, so the spread is a fraction $7.96 \\times 10^{6} / 6.0 \\times 10^{14} \\approx 1.3 \\times 10^{-8}$ of the light's frequency."
    ],
    "answer": "The light from this state covers a frequency range of at least about 8 MHz. That is about 1.3 parts in 100 million of the light's own frequency, so the line is very narrow but not infinitely sharp. A shorter lifetime would give a wider line."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/heisenberg-uncertainty-principle/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/stationary-state-time-evolution/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/radioactive-decay-law/"
   ],
   "sources": [
    {
     "title": "Uncertainty principle, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Uncertainty_principle"
    },
    {
     "title": "Spectral line, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Spectral_line"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/canonical-commutation-relation",
   "title": "Canonical Commutation Relation",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/canonical-commutation-relation/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/canonical-commutation-relation.md",
   "latex": "[\\hat{x}, \\hat{p}] = \\hat{x}\\hat{p} - \\hat{p}\\hat{x} = i\\hbar",
   "one_liner": "In quantum mechanics the order of measuring position and momentum changes the result, and that mismatch is the root of the uncertainty trade-off.",
   "read_aloud": "The commutator of x-hat and p-hat, which is x-hat times p-hat minus p-hat times x-hat, equals i times h-bar. Position and momentum do not commute, and the difference is i times h-bar.",
   "symbols": [
    {
     "latex": "\\hat{x}",
     "meaning": "The position operator. An operator is a rule that acts on a wave function. Position is measured in meters (m)."
    },
    {
     "latex": "\\hat{p}",
     "meaning": "The momentum operator, which acts as $-i\\hbar\\, d/dx$ on a wave function. Momentum is measured in kilogram meters per second (kg m/s)."
    },
    {
     "latex": "[\\hat{x}, \\hat{p}]",
     "meaning": "The commutator: the result of applying $\\hat{x}\\hat{p}$ minus the result of applying $\\hat{p}\\hat{x}$. It measures how much the order of the two operations matters."
    },
    {
     "latex": "i",
     "meaning": "The imaginary unit, with $i^2 = -1$. It is part of the result, so the commutator is a complex number."
    },
    {
     "latex": "\\hbar",
     "meaning": "The reduced Planck constant, $h / 2\\pi = 1.054571817 \\times 10^{-34}$ J s (joule seconds)."
    }
   ],
   "worked_example": {
    "title": "A minimum spread for a particle localized to 2.0 $\\times 10^{-10}$ m",
    "setup": "A particle has a position spread of $\\sigma_x = 2.0 \\times 10^{-10}$ m. Use $h = 6.62607015 \\times 10^{-34}$ J s and $m_e = 9.1093837 \\times 10^{-31}$ kg. Find the smallest momentum spread allowed by the commutator, and the matching speed spread for an electron.",
    "steps": [
     "Find $\\hbar$ from $h$: $\\hbar = \\frac{h}{2\\pi} = \\frac{6.62607015 \\times 10^{-34}}{2\\pi} \\approx 1.054571817 \\times 10^{-34}$ J s.",
     "Use the Robertson bound $\\sigma_x \\sigma_p \\ge \\frac{\\hbar}{2}$, so $\\sigma_p \\ge \\frac{\\hbar}{2\\,\\sigma_x} = \\frac{1.054571817 \\times 10^{-34}\\ \\text{J s}}{2 \\times 2.0 \\times 10^{-10}\\ \\text{m}} \\approx 2.64 \\times 10^{-25}$ kg m/s.",
     "Divide by the electron mass to get the speed spread: $\\sigma_v = \\frac{\\sigma_p}{m_e} = \\frac{2.64 \\times 10^{-25}}{9.1093837 \\times 10^{-31}} \\approx 2.89 \\times 10^{5}$ m/s."
    ],
    "answer": "The momentum spread must be at least about $2.64 \\times 10^{-25}$ kg m/s, which means the electron's speed spread is at least about $2.89 \\times 10^{5}$ m/s. Squeezing the position spread in half would double the minimum momentum spread, because the bound is a product."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/heisenberg-uncertainty-principle/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/schrodinger-equation/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/expectation-value/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/energy-time-uncertainty/"
   ],
   "sources": [
    {
     "title": "Canonical commutation relation, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Canonical_commutation_relation"
    },
    {
     "title": "Uncertainty principle, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Uncertainty_principle"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/angular-momentum-quantization",
   "title": "Orbital Angular Momentum Quantization",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/angular-momentum-quantization/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/angular-momentum-quantization.md",
   "latex": "|\\mathbf{L}| = \\sqrt{\\ell(\\ell + 1)}\\,\\hbar \\qquad L_z = m_\\ell\\,\\hbar \\qquad m_\\ell = -\\ell, \\ldots, \\ell",
   "one_liner": "An electron's orbital motion around a nucleus can only take certain fixed sizes and directions, like steps on a staircase.",
   "read_aloud": "The length of L equals the square root of l times l plus one, times h-bar. The z component of L equals m sub l times h-bar, where m sub l runs in whole steps from minus l up to plus l.",
   "symbols": [
    {
     "latex": "|\\mathbf{L}|",
     "meaning": "The length (magnitude) of the orbital angular momentum, in joule seconds (J s)."
    },
    {
     "latex": "\\ell",
     "meaning": "The orbital quantum number: a whole number 0, 1, 2, 3 and so on. It sets the size of the angular momentum. It has no unit."
    },
    {
     "latex": "L_z",
     "meaning": "The component of the angular momentum along the chosen z axis, in joule seconds (J s)."
    },
    {
     "latex": "m_\\ell",
     "meaning": "The magnetic quantum number: a whole number from $-\\ell$ to $+\\ell$. It sets the z component. It has no unit."
    },
    {
     "latex": "\\hbar",
     "meaning": "The reduced Planck constant, $h / 2\\pi = 1.054571817 \\times 10^{-34}$ J s (joule seconds)."
    }
   ],
   "worked_example": {
    "title": "A d electron with $\\ell = 2$",
    "setup": "A d electron has orbital quantum number $\\ell = 2$. Use $\\hbar = 1.054571817 \\times 10^{-34}$ J s. Find the length of its angular momentum, the number of allowed z values, and the largest z value.",
    "steps": [
     "Length: $|\\mathbf{L}| = \\sqrt{2 \\times 3}\\,\\hbar = \\sqrt{6}\\,\\hbar \\approx 2.449\\,\\hbar$.",
     "In joule seconds: $2.449 \\times 1.054571817 \\times 10^{-34}\\ \\text{J s} \\approx 2.58 \\times 10^{-34}$ J s.",
     "Allowed values: $m_\\ell = -2, -1, 0, 1, 2$, which is $2 \\times 2 + 1 = 5$ values.",
     "Largest z component: $L_z = 2\\hbar = 2 \\times 1.054571817 \\times 10^{-34}\\ \\text{J s} \\approx 2.11 \\times 10^{-34}$ J s."
    ],
    "answer": "The d electron has angular momentum of length about $2.58 \\times 10^{-34}$ J s. It has five allowed z values, from $-2\\hbar$ to $+2\\hbar$. The largest z value, $2.11 \\times 10^{-34}$ J s, is smaller than the full length, so the vector cannot point exactly along z."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/spin-one-half/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/zeeman-effect/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/hydrogen-energy-levels/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/electron-shell-capacity/"
   ],
   "sources": [
    {
     "title": "Angular momentum operator, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Angular_momentum_operator"
    },
    {
     "title": "Azimuthal quantum number, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Azimuthal_quantum_number"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/spin-one-half",
   "title": "Spin One-Half",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/spin-one-half/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/spin-one-half.md",
   "latex": "S_z = m_s\\,\\hbar, \\qquad m_s = \\pm\\frac{1}{2}, \\qquad |\\mathbf{S}| = \\frac{\\sqrt{3}}{2}\\,\\hbar",
   "one_liner": "An electron has a built-in angular momentum that can be measured along any direction as only one of two values, up or down.",
   "read_aloud": "S z equals m sub s times h-bar, where m sub s is plus or minus one half. The length of S equals the square root of three over two, times h-bar.",
   "symbols": [
    {
     "latex": "S_z",
     "meaning": "The component of the spin angular momentum along the chosen z axis, in joule seconds (J s)."
    },
    {
     "latex": "m_s",
     "meaning": "The spin projection quantum number. For an electron it is $+\\frac{1}{2}$ or $-\\frac{1}{2}$. It has no unit."
    },
    {
     "latex": "|\\mathbf{S}|",
     "meaning": "The length (magnitude) of the spin angular momentum, in joule seconds (J s)."
    },
    {
     "latex": "\\hbar",
     "meaning": "The reduced Planck constant, $h / 2\\pi = 1.054571817 \\times 10^{-34}$ J s (joule seconds)."
    }
   ],
   "worked_example": {
    "title": "How far the spin is tilted from the z axis",
    "setup": "An electron has spin $s = \\frac{1}{2}$, so its length is $|\\mathbf{S}| = \\frac{\\sqrt{3}}{2}\\hbar$. In the most extreme case its z component is $S_z = +\\frac{\\hbar}{2}$. Find the angle between the spin vector and the z axis, using the classical vector picture.",
    "steps": [
     "Use the cosine of the angle: $\\cos\\theta = \\frac{S_z}{|\\mathbf{S}|} = \\frac{\\hbar/2}{(\\sqrt{3}/2)\\hbar} = \\frac{1}{\\sqrt{3}} \\approx 0.577$.",
     "Take the inverse cosine: $\\theta = \\arccos(0.577) \\approx 54.7^\\circ$.",
     "Check the ratio: the largest z value is $0.5\\,\\hbar$ and the length is $0.866\\,\\hbar$, so the z value is about 58% of the length, which matches $0.577$."
    ],
    "answer": "In the vector picture the spin is tilted about $54.7^\\circ$ from the z axis. This angle is a picture to help you think, not a measured direction. Only the z component has a sharp value, and the spin has no sharp direction."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/angular-momentum-quantization/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/zeeman-effect/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/bloch-sphere/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/qubit-state/"
   ],
   "sources": [
    {
     "title": "Spin (physics), Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Spin_%28physics%29"
    },
    {
     "title": "Stern-Gerlach experiment, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Stern%E2%80%93Gerlach_experiment"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/zeeman-effect",
   "title": "Zeeman Effect",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/zeeman-effect/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/zeeman-effect.md",
   "latex": "\\Delta E = m_\\ell\\,\\mu_B\\,B",
   "one_liner": "A magnetic field shifts an atom's energy levels by small equal steps, so one spectral line splits into several.",
   "read_aloud": "Delta E equals m sub l times mu sub B times B. The energy shift equals the magnetic quantum number times the Bohr magneton times the magnetic field.",
   "symbols": [
    {
     "latex": "\\Delta E",
     "meaning": "The energy shift of the level caused by the magnetic field, in joules (J) or electron volts (eV)."
    },
    {
     "latex": "m_\\ell",
     "meaning": "The magnetic quantum number: a whole number from $-\\ell$ to $+\\ell$. It has no unit."
    },
    {
     "latex": "\\mu_B",
     "meaning": "The Bohr magneton, a natural unit of magnetic moment for an electron, $\\mu_B = 9.2740100783 \\times 10^{-24}$ J/T (joules per tesla)."
    },
    {
     "latex": "B",
     "meaning": "The magnetic field strength, in tesla (T). Earth's field at the surface is only tens of microtesla."
    }
   ],
   "worked_example": {
    "title": "The energy step in a 1 tesla field",
    "setup": "A magnetic field of $B = 1$ T acts on an atom. Use $\\mu_B = 9.2740100783 \\times 10^{-24}$ J/T and $e = 1.602176634 \\times 10^{-19}$ C. Find the energy step for $m_\\ell = +1$ in eV, and the matching frequency step.",
    "steps": [
     "Energy shift in joules: $\\Delta E = m_\\ell\\,\\mu_B\\,B = 1 \\times 9.2740100783 \\times 10^{-24}\\ \\text{J/T} \\times 1\\ \\text{T} = 9.27 \\times 10^{-24}$ J.",
     "Convert to electron volts: $\\frac{9.2740100783 \\times 10^{-24}\\ \\text{J}}{1.602176634 \\times 10^{-19}\\ \\text{J/eV}} \\approx 5.79 \\times 10^{-5}$ eV.",
     "Frequency step: $\\frac{\\Delta E}{h} = \\frac{9.27 \\times 10^{-24}\\ \\text{J}}{6.62607015 \\times 10^{-34}\\ \\text{J s}} \\approx 1.40 \\times 10^{10}$ Hz, about 14 GHz."
    ],
    "answer": "In a 1 T field each step is about $5.79 \\times 10^{-5}$ eV. That is very small compared with the energies of atomic transitions, which are a few electron volts, so the splitting needs a sensitive spectrometer to see. The frequency step is about 14 GHz."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/angular-momentum-quantization/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/spin-one-half/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/hydrogen-energy-levels/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/fine-structure-constant/"
   ],
   "sources": [
    {
     "title": "Zeeman effect, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Zeeman_effect"
    },
    {
     "title": "Bohr magneton, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Bohr_magneton"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/fine-structure-constant",
   "title": "Fine-Structure Constant",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/fine-structure-constant/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/fine-structure-constant.md",
   "latex": "\\alpha = \\frac{e^2}{4\\pi\\varepsilon_0\\,\\hbar c} \\approx \\frac{1}{137.036}",
   "one_liner": "The fine-structure constant is a pure number that sets how strongly charged particles and light interact, and its value is close to 1 over 137.",
   "read_aloud": "Alpha equals e squared divided by four pi times epsilon zero times h-bar times c. It is approximately one divided by one hundred thirty seven point zero three six.",
   "symbols": [
    {
     "latex": "\\alpha",
     "meaning": "The fine-structure constant. It is a pure number with no units, about $1/137.036$."
    },
    {
     "latex": "e",
     "meaning": "The elementary charge, the charge of a proton, $1.602176634 \\times 10^{-19}$ C (coulombs). It is exact by definition."
    },
    {
     "latex": "\\varepsilon_0",
     "meaning": "The vacuum permittivity, $8.8541878128 \\times 10^{-12}$ F/m (farads per meter)."
    },
    {
     "latex": "\\hbar",
     "meaning": "The reduced Planck constant, $1.054571817 \\times 10^{-34}$ J s (joule seconds)."
    },
    {
     "latex": "c",
     "meaning": "The speed of light in vacuum, $299792458$ m/s. It is exact by definition."
    },
    {
     "latex": "\\pi",
     "meaning": "The number pi, about 3.14159. It has no unit."
    }
   ],
   "worked_example": {
    "title": "Computing alpha from the constants, then the hydrogen energy",
    "setup": "Use $e = 1.602176634 \\times 10^{-19}$ C, $\\varepsilon_0 = 8.8541878128 \\times 10^{-12}$ F/m, $\\hbar = 1.054571817 \\times 10^{-34}$ J s, $c = 299792458$ m/s and $m_e = 9.1093837 \\times 10^{-31}$ kg. First find $\\alpha$, then use it to find the hydrogen ground-state energy.",
    "steps": [
     "Numerator: $e^2 = (1.602176634 \\times 10^{-19})^2 \\approx 2.56697 \\times 10^{-38}$ C$^2$.",
     "Denominator: $4\\pi\\varepsilon_0\\hbar c = 4\\pi \\times 8.8541878128 \\times 10^{-12} \\times 1.054571817 \\times 10^{-34} \\times 299792458 \\approx 3.51767 \\times 10^{-36}$ (units J m).",
     "Divide: $\\alpha = \\frac{2.56697 \\times 10^{-38}}{3.51767 \\times 10^{-36}} \\approx 0.00729735$, which means $1/\\alpha \\approx 137.036$.",
     "Hydrogen ground-state energy: $\\frac{\\alpha^2 m_e c^2}{2}$, with $m_e c^2 = 8.18711 \\times 10^{-14}$ J. This gives $\\frac{(0.00729735)^2 \\times 8.18711 \\times 10^{-14}}{2} \\approx 2.17987 \\times 10^{-18}$ J, which is about 13.6 eV."
    ],
    "answer": "The constant is $\\alpha \\approx 0.00729735$, or $1/137.036$, a pure number. Using it, the hydrogen ground-state binding energy is about 13.6 eV, the value expected for an electron held by a single proton."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/bohr-radius/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/hydrogen-like-atom-energy/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/rydberg-formula/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/zeeman-effect/"
   ],
   "sources": [
    {
     "title": "Fine-structure constant, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Fine-structure_constant"
    },
    {
     "title": "Fundamental physical constants, NIST",
     "url": "https://physics.nist.gov/cuu/Constants/"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/double-slit-interference",
   "title": "Double-Slit Interference",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/double-slit-interference/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/double-slit-interference.md",
   "latex": "d \\sin\\theta = m\\lambda",
   "one_liner": "Waves from two narrow openings overlap, and at certain places they add into bright bands while at others they cancel into dark ones.",
   "read_aloud": "d times sine theta equals m times lambda. d is the distance between the slits, theta is the angle to a bright fringe, m is a whole number, and lambda is the wavelength.",
   "symbols": [
    {
     "latex": "d",
     "meaning": "The distance between the centers of the two slits, in meters (m). It is not the width of one slit."
    },
    {
     "latex": "\\theta",
     "meaning": "The angle from the center line to the bright fringe, measured from the slits. Use radians or degrees, as long as the calculator matches."
    },
    {
     "latex": "m",
     "meaning": "The order of the bright fringe: a whole number 0, 1, 2 and so on, with sign for the side of the center. It is not a mass."
    },
    {
     "latex": "\\lambda",
     "meaning": "The wavelength of the wave, in meters (m)."
    },
    {
     "latex": "\\Delta y",
     "meaning": "The distance between neighboring bright fringes on a screen, in meters (m), used for small angles."
    },
    {
     "latex": "L",
     "meaning": "The distance from the slits to the screen, in meters (m)."
    }
   ],
   "worked_example": {
    "title": "Fringe spacing for green light",
    "setup": "Green light of wavelength $\\lambda = 500$ nm passes through two slits with $d = 0.50$ mm. The screen is $L = 1.0$ m away. Find the spacing between bright fringes on the screen, and the angle of the first bright fringe.",
    "steps": [
     "Convert the units: $\\lambda = 500\\ \\text{nm} = 5.00 \\times 10^{-7}$ m and $d = 0.50\\ \\text{mm} = 5.0 \\times 10^{-4}$ m.",
     "Fringe spacing: $\\Delta y = \\frac{\\lambda L}{d} = \\frac{5.00 \\times 10^{-7}\\ \\text{m} \\times 1.0\\ \\text{m}}{5.0 \\times 10^{-4}\\ \\text{m}} = 1.0 \\times 10^{-3}$ m, which is 1.0 mm.",
     "First bright fringe ($m = 1$): $\\sin\\theta = \\frac{\\lambda}{d} = \\frac{5.00 \\times 10^{-7}}{5.0 \\times 10^{-4}} = 1.0 \\times 10^{-3}$, so $\\theta \\approx 1.0 \\times 10^{-3}$ rad, about 0.057 degrees."
    ],
    "answer": "On a screen 1 m away, the bright fringes are about 1.0 mm apart. The first bright fringe sits at an angle of about 0.057 degrees from the center. The small angle is why the even spacing formula works here."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/de-broglie-wavelength/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/born-rule/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/bragg-law/"
   ],
   "sources": [
    {
     "title": "Double-slit experiment, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Double-slit_experiment"
    },
    {
     "title": "Thomas Young (scientist), Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Thomas_Young_%28scientist%29"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/bragg-law",
   "title": "Bragg's Law",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/bragg-law/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/bragg-law.md",
   "latex": "n\\lambda = 2d\\sin\\theta",
   "one_liner": "Waves bounce off the evenly spaced layers of a crystal, and they add into a strong reflection only at certain angles.",
   "read_aloud": "n times lambda equals two times d times sine theta. n is a whole number, lambda is the wavelength, d is the spacing between the crystal planes, and theta is the glancing angle.",
   "symbols": [
    {
     "latex": "n",
     "meaning": "The order of the reflection: a positive whole number 1, 2, 3 and so on. It is not the refractive index."
    },
    {
     "latex": "\\lambda",
     "meaning": "The wavelength of the incoming wave, in meters (m). For X-rays it is often about $10^{-10}$ m."
    },
    {
     "latex": "d",
     "meaning": "The spacing between neighboring parallel planes of atoms in the crystal, in meters (m)."
    },
    {
     "latex": "\\theta",
     "meaning": "The glancing angle: the angle between the incoming beam and the planes, not the surface normal. Use degrees or radians, as long as the calculator matches."
    }
   ],
   "worked_example": {
    "title": "First-order peak from an X-ray on a crystal",
    "setup": "An X-ray beam with wavelength $\\lambda = 0.150$ nm hits a crystal whose atomic planes are spaced $d = 0.250$ nm apart. Find the glancing angle of the first-order peak, $n = 1$, and the second-order peak, $n = 2$.",
    "steps": [
     "Solve for the sine: $\\sin\\theta = \\frac{n\\lambda}{2d}$. For $n = 1$: $\\sin\\theta = \\frac{1 \\times 0.150\\ \\text{nm}}{2 \\times 0.250\\ \\text{nm}} = 0.300$.",
     "Take the inverse sine: $\\theta = \\arcsin(0.300) \\approx 17.5^\\circ$.",
     "Second order, $n = 2$: $\\sin\\theta = \\frac{2 \\times 0.150}{2 \\times 0.250} = 0.600$, so $\\theta = \\arcsin(0.600) \\approx 36.9^\\circ$."
    ],
    "answer": "The first-order peak appears at a glancing angle of about $17.5^\\circ$, and the second-order peak at about $36.9^\\circ$. If $n\\lambda$ were larger than $2d$, the sine would be above 1 and no peak could appear at any angle."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/double-slit-interference/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/de-broglie-wavelength/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/planck-einstein-relation/"
   ],
   "sources": [
    {
     "title": "Bragg's law, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Bragg%27s_law"
    },
    {
     "title": "Davisson-Germer experiment, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Davisson%E2%80%93Germer_experiment"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/thermal-de-broglie-wavelength",
   "title": "Thermal de Broglie Wavelength",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/thermal-de-broglie-wavelength/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/thermal-de-broglie-wavelength.md",
   "latex": "\\lambda_{\\text{th}} = \\frac{h}{\\sqrt{2\\pi m k_B T}}",
   "one_liner": "When a gas gets cold enough, each atom's wave grows so long that neighboring atoms overlap, and quantum rules take over.",
   "read_aloud": "Lambda th equals h divided by the square root of 2 pi times m times k B times T. Lambda th is the thermal wavelength, h is Planck's constant, m is the mass of one particle, k B is the Boltzmann constant and T is the absolute temperature.",
   "symbols": [
    {
     "latex": "\\lambda_{\\text{th}}",
     "meaning": "The thermal de Broglie wavelength, in meters (m). It is a typical size of the quantum wave of a particle in a gas at temperature $T$."
    },
    {
     "latex": "h",
     "meaning": "Planck's constant, $6.62607015 \\times 10^{-34}$ J s (joule seconds)."
    },
    {
     "latex": "m",
     "meaning": "The mass of one particle, in kilograms (kg)."
    },
    {
     "latex": "k_B",
     "meaning": "The Boltzmann constant, $1.380649 \\times 10^{-23}$ J/K (joules per kelvin). It converts temperature into energy."
    },
    {
     "latex": "T",
     "meaning": "The absolute temperature, in kelvin (K). Zero kelvin is absolute zero."
    }
   ],
   "worked_example": {
    "title": "Rubidium-87 atoms at 100 nK",
    "setup": "A rubidium-87 atom has mass $m = 1.443 \\times 10^{-25}$ kg. Cool the gas to $T = 100$ nK, which is $100 \\times 10^{-9}$ K. Use $k_B = 1.380649 \\times 10^{-23}$ J/K and $h = 6.62607015 \\times 10^{-34}$ J s. For comparison, take a density of $n = 10^{20}$ atoms per cubic meter, a value chosen for this example.",
    "steps": [
     "Temperature in kelvin: $T = 100 \\times 10^{-9}$ K $= 1.00 \\times 10^{-7}$ K.",
     "Product under the square root: $2\\pi m k_B T = 2\\pi (1.443 \\times 10^{-25})(1.380649 \\times 10^{-23})(1.00 \\times 10^{-7}) \\approx 1.25 \\times 10^{-54}$ kg J. Its square root is about $1.12 \\times 10^{-27}$.",
     "Thermal wavelength: $\\lambda_{\\text{th}} = \\frac{6.62607015 \\times 10^{-34}}{1.12 \\times 10^{-27}} \\approx 5.92 \\times 10^{-7}$ m, which is 0.592 $\\mu$m.",
     "Spacing between atoms: $n^{-1/3} = (10^{20})^{-1/3} \\approx 2.15 \\times 10^{-7}$ m. The ratio $\\lambda_{\\text{th}} / n^{-1/3} \\approx 2.75$."
    ],
    "answer": "At 100 nK the thermal wavelength is about 0.592 $\\mu$m, about 2.75 times the spacing between atoms, so the atomic waves overlap and the gas is in the quantum regime. The same atom at 300 K has a thermal wavelength about 55,000 times shorter, because the wavelength scales with the inverse square root of the temperature."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/de-broglie-wavelength/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/bose-einstein-distribution/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/fermi-dirac-distribution/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/fermi-energy/"
   ],
   "sources": [
    {
     "title": "Bose-Einstein condensate, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Bose%E2%80%93Einstein_condensate"
    },
    {
     "title": "Thermal de Broglie wavelength, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Thermal_de_Broglie_wavelength"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/relativistic-energy-momentum",
   "title": "Energy-Momentum Relation",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/relativistic-energy-momentum/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/relativistic-energy-momentum.md",
   "latex": "E^2 = (p c)^2 + (m c^2)^2",
   "one_liner": "Energy, momentum and mass are linked by one equation, and a particle with no mass always carries energy only through its momentum.",
   "read_aloud": "E squared equals the quantity p c, squared, plus the quantity m c squared, squared. E is the total energy, p is momentum, m is the rest mass and c is the speed of light.",
   "symbols": [
    {
     "latex": "E",
     "meaning": "The total energy of the particle, in joules (J). Particle physicists often quote energy in electronvolts (eV) or MeV."
    },
    {
     "latex": "p",
     "meaning": "The momentum of the particle, in kilograms meters per second (kg m/s)."
    },
    {
     "latex": "c",
     "meaning": "The speed of light in vacuum, $299792458$ m/s. It is exact by definition of the meter."
    },
    {
     "latex": "m",
     "meaning": "The rest mass of the particle, in kilograms (kg). It is the mass the particle has when it is not moving."
    }
   ],
   "worked_example": {
    "title": "An electron with momentum 0.75 MeV/c",
    "setup": "An electron has rest energy $m c^2 = 0.51099895$ MeV and momentum energy $p c = 0.75$ MeV. Find its total energy $E$ and its kinetic energy $K = E - m c^2$.",
    "steps": [
     "Square the momentum term: $(pc)^2 = 0.75^2 = 0.5625$ MeV$^2$.",
     "Square the rest energy: $(mc^2)^2 = 0.51099895^2 \\approx 0.261119$ MeV$^2$.",
     "Add and take the square root: $E = \\sqrt{0.5625 + 0.261119} = \\sqrt{0.823619} \\approx 0.9075$ MeV.",
     "Kinetic energy: $K = E - mc^2 = 0.9075 - 0.5110 \\approx 0.3965$ MeV."
    ],
    "answer": "The electron's total energy is about 0.908 MeV. About 0.397 MeV of that is motion energy on top of its 0.511 MeV rest energy. The energies do not add directly, because the squares must be added before the root is taken."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/photon-momentum/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/planck-einstein-relation/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/compton-scattering/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/pair-production-threshold/"
   ],
   "sources": [
    {
     "title": "Energy-momentum relation, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Energy%E2%80%93momentum_relation"
    },
    {
     "title": "Mass-energy equivalence, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Mass%E2%80%93energy_equivalence"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/pair-production-threshold",
   "title": "Pair Production Threshold",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/pair-production-threshold/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/pair-production-threshold.md",
   "latex": "E_\\gamma \\ge 2 m_e c^2 \\approx 1.022 \\text{ MeV}",
   "one_liner": "A gamma ray with at least twice the rest energy of an electron can turn into an electron and its antiparticle, a positron.",
   "read_aloud": "E gamma is greater than or equal to 2 times m e c squared, which is about 1.022 MeV. E gamma is the photon energy, m e is the electron mass and c is the speed of light.",
   "symbols": [
    {
     "latex": "E_\\gamma",
     "meaning": "The energy of the photon, also called a gamma ray, in MeV (million electronvolts) or joules (J)."
    },
    {
     "latex": "m_e",
     "meaning": "The mass of the electron, $9.1093837 \\times 10^{-31}$ kg. The electron and the positron each have this mass."
    },
    {
     "latex": "c",
     "meaning": "The speed of light in vacuum, $299792458$ m/s."
    }
   ],
   "worked_example": {
    "title": "Gamma rays at 0.8 MeV and 1.5 MeV",
    "setup": "Compare two gamma rays near a nucleus, one with energy 0.8 MeV and one with energy 1.5 MeV. Use $m_e c^2 = 0.51099895$ MeV for the electron rest energy.",
    "steps": [
     "Threshold: $2 m_e c^2 = 2 \\times 0.51099895 = 1.0219979$ MeV, or about 1.022 MeV.",
     "The 0.8 MeV photon: $0.8 - 1.022 = -0.222$ MeV. The energy is below the threshold, so it cannot make a pair.",
     "The 1.5 MeV photon: $1.5 - 1.022 = 0.478$ MeV is left over after the rest energy of the pair is paid. The energy is above the threshold, so it can make a pair.",
     "The leftover 0.478 MeV is shared as kinetic energy of the electron and positron, while the nucleus takes a negligible share."
    ],
    "answer": "The 0.8 MeV gamma ray cannot create an electron-positron pair. The 1.5 MeV gamma ray can, and about 0.478 MeV is left over as motion energy of the pair."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/relativistic-energy-momentum/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/compton-scattering/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/photon-momentum/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/photoelectric-effect/"
   ],
   "sources": [
    {
     "title": "Pair production, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Pair_production"
    },
    {
     "title": "Positron, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Positron"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/radioactive-decay-law",
   "title": "Radioactive Decay Law",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/radioactive-decay-law/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/radioactive-decay-law.md",
   "latex": "N(t) = N_0\\, e^{-\\lambda t}",
   "one_liner": "An unstable sample loses a fixed fraction of its atoms in each time interval, so the count falls off in an exponential curve.",
   "read_aloud": "N of t equals N zero times e to the power of negative lambda t. N of t is the number of atoms left after time t, N zero is the starting number, e is Euler's number, lambda is the decay constant and t is the time.",
   "symbols": [
    {
     "latex": "N(t)",
     "meaning": "The number of undecayed atoms left at time $t$. It is a count, with no unit."
    },
    {
     "latex": "N_0",
     "meaning": "The number of undecayed atoms at time zero, when counting starts."
    },
    {
     "latex": "\\lambda",
     "meaning": "The decay constant: the chance per unit time that an atom decays. Its unit is the inverse of the time unit, such as per year."
    },
    {
     "latex": "t",
     "meaning": "The time elapsed, in the same units as $\\lambda$'s time, such as years."
    },
    {
     "latex": "e",
     "meaning": "Euler's number, about 2.71828. It is the base of natural logarithms."
    },
    {
     "latex": "t_{1/2}",
     "meaning": "The half-life: the time for half of the atoms to decay. It is related to the decay constant by $t_{1/2} = \\frac{\\ln 2}{\\lambda}$."
    }
   ],
   "worked_example": {
    "title": "Carbon-14 after 10,000 years",
    "setup": "Carbon-14 has a half-life of about 5730 years. Start with $N_0 = 1.0 \\times 10^{6}$ carbon-14 atoms and find how many remain after $t = 10{,}000$ years.",
    "steps": [
     "Decay constant: $\\lambda = \\frac{\\ln 2}{t_{1/2}} = \\frac{0.693147}{5730} \\approx 1.21 \\times 10^{-4}$ per year.",
     "Exponent: $\\lambda t = 1.20968 \\times 10^{-4} \\times 10000 \\approx 1.2097$.",
     "Remaining fraction: $e^{-1.2097} \\approx 0.2983$.",
     "Remaining atoms: $N = 1.0 \\times 10^{6} \\times 0.2983 \\approx 298{,}300$."
    ],
    "answer": "About 298,300 carbon-14 atoms remain, roughly 30 percent of the starting sample. The time is about 1.75 half-lives, and the fraction left lies between one half and one quarter, as the half-life idea predicts."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/quantum-tunneling-probability/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/energy-time-uncertainty/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/planck-einstein-relation/"
   ],
   "sources": [
    {
     "title": "Radioactive decay, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Radioactive_decay"
    },
    {
     "title": "Half-life, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Half-life"
    },
    {
     "title": "Carbon-14, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Carbon-14"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/fermi-dirac-distribution",
   "title": "Fermi-Dirac Distribution",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/fermi-dirac-distribution/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/fermi-dirac-distribution.md",
   "latex": "f(E) = \\frac{1}{e^{(E - \\mu)/(k_B T)} + 1}",
   "one_liner": "For electrons and other fermions, it gives the chance that an energy level is filled, from 1 for full down to 0 for empty.",
   "read_aloud": "f of E equals 1 divided by the quantity e to the power of E minus mu, divided by k B times T, plus 1. f of E is the chance that a state is occupied, E is the energy of the state, mu is the chemical potential, k B is the Boltzmann constant and T is the absolute temperature.",
   "symbols": [
    {
     "latex": "f(E)",
     "meaning": "The occupation probability of a single state with energy $E$. It is a number from 0 (empty) to 1 (full), with no unit."
    },
    {
     "latex": "E",
     "meaning": "The energy of the state, in joules (J) or electronvolts (eV)."
    },
    {
     "latex": "\\mu",
     "meaning": "The chemical potential, an energy in joules or electronvolts. A state at $E = \\mu$ is occupied with probability one half at any temperature."
    },
    {
     "latex": "k_B",
     "meaning": "The Boltzmann constant, $1.380649 \\times 10^{-23}$ J/K (joules per kelvin)."
    },
    {
     "latex": "T",
     "meaning": "The absolute temperature, in kelvin (K)."
    }
   ],
   "worked_example": {
    "title": "An electron state at room temperature",
    "setup": "Take $T = 300$ K and a state with energy $E = \\mu + 0.1$ eV, which is 0.1 eV above the chemical potential. Use $k_B = 1.380649 \\times 10^{-23}$ J/K and $e = 1.602176634 \\times 10^{-19}$ C to convert joules into electronvolts.",
    "steps": [
     "Thermal energy in eV: $k_B T = \\frac{1.380649 \\times 10^{-23} \\times 300}{1.602176634 \\times 10^{-19}} \\approx 0.025852$ eV.",
     "Exponent: $\\frac{E - \\mu}{k_B T} = \\frac{0.1}{0.025852} \\approx 3.868$.",
     "Exponential: $e^{3.868} \\approx 47.85$, so the denominator is $47.85 + 1 = 48.85$.",
     "Occupation: $f = \\frac{1}{48.85} \\approx 0.0205$."
    ],
    "answer": "A state 0.1 eV above $\\mu$ is occupied with probability about 0.0205, or about 2 percent, at room temperature. The state is almost always empty."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/fermi-energy/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/bose-einstein-distribution/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/electron-shell-capacity/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/spin-one-half/"
   ],
   "sources": [
    {
     "title": "Fermi-Dirac statistics, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Fermi%E2%80%93Dirac_statistics"
    },
    {
     "title": "Pauli exclusion principle, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Pauli_exclusion_principle"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/bose-einstein-distribution",
   "title": "Bose-Einstein Distribution",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/bose-einstein-distribution/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/bose-einstein-distribution.md",
   "latex": "n(E) = \\frac{1}{e^{(E - \\mu)/(k_B T)} - 1}",
   "one_liner": "For bosons such as photons, it gives the average number of particles that share a single energy level.",
   "read_aloud": "n of E equals 1 divided by the quantity e to the power of E minus mu, divided by k B times T, minus 1. n of E is the average number of particles in a state, E is the energy of the state, mu is the chemical potential, k B is the Boltzmann constant and T is the absolute temperature.",
   "symbols": [
    {
     "latex": "n(E)",
     "meaning": "The average number of bosons in one quantum state with energy $E$. It is a pure number with no unit, and it can be larger than 1."
    },
    {
     "latex": "E",
     "meaning": "The energy of the state, in joules (J) or electronvolts (eV)."
    },
    {
     "latex": "\\mu",
     "meaning": "The chemical potential, an energy in joules or electronvolts. For bosons it must stay below the lowest state energy. For photons it is zero."
    },
    {
     "latex": "k_B",
     "meaning": "The Boltzmann constant, $1.380649 \\times 10^{-23}$ J/K (joules per kelvin)."
    },
    {
     "latex": "T",
     "meaning": "The absolute temperature, in kelvin (K)."
    }
   ],
   "worked_example": {
    "title": "A photon mode at 300 K",
    "setup": "Take a mode, or state, with energy $E = 0.05$ eV at $T = 300$ K. For light the chemical potential is zero, so $\\mu = 0$. At room temperature the thermal energy is $k_B T \\approx 0.025852$ eV.",
    "steps": [
     "Exponent: $\\frac{E - \\mu}{k_B T} = \\frac{0.05}{0.025852} \\approx 1.934$.",
     "Exponential: $e^{1.934} \\approx 6.921$, so the denominator is $6.921 - 1 = 5.921$.",
     "Average occupation: $n = \\frac{1}{5.921} \\approx 0.169$."
    ],
    "answer": "This mode holds about 0.169 photons on average, so it is mostly empty. Unlike electrons, a bosonic mode can hold more than one particle, and lower-energy modes can hold more than one on average."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/plancks-law/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/fermi-dirac-distribution/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/fermi-energy/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/stefan-boltzmann-law/"
   ],
   "sources": [
    {
     "title": "Bose-Einstein statistics, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Bose%E2%80%93Einstein_statistics"
    },
    {
     "title": "Planck's law, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Planck%27s_law"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/fermi-energy",
   "title": "Fermi Energy",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/fermi-energy/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/fermi-energy.md",
   "latex": "E_F = \\frac{\\hbar^2}{2 m}\\left(3\\pi^2 n\\right)^{2/3}",
   "one_liner": "In a metal, electrons fill energy levels from the bottom up, and the Fermi energy is the height of the last level filled.",
   "read_aloud": "E F equals h bar squared divided by 2 m, times the quantity 3 pi squared n, raised to the power of two thirds. E F is the Fermi energy, h bar is the reduced Planck constant, m is the electron mass, pi is about 3.14159 and n is the electron density.",
   "symbols": [
    {
     "latex": "E_F",
     "meaning": "The Fermi energy, the energy of the highest filled electron level at absolute zero, in joules (J) or electronvolts (eV)."
    },
    {
     "latex": "\\hbar",
     "meaning": "The reduced Planck constant, $1.054571817 \\times 10^{-34}$ J s."
    },
    {
     "latex": "m",
     "meaning": "The mass of an electron, $9.1093837 \\times 10^{-31}$ kg."
    },
    {
     "latex": "n",
     "meaning": "The electron density: the number of free electrons per cubic meter (m$^{-3}$)."
    },
    {
     "latex": "\\pi",
     "meaning": "The ratio of a circle's circumference to its diameter, about 3.14159."
    }
   ],
   "worked_example": {
    "title": "Free electrons in copper",
    "setup": "Copper has an electron density of about $n = 8.5 \\times 10^{28}$ m$^{-3}$. Use $\\hbar = 1.054571817 \\times 10^{-34}$ J s, $m = 9.1093837 \\times 10^{-31}$ kg and $1$ eV $= 1.602176634 \\times 10^{-19}$ J.",
    "steps": [
     "Inside the bracket: $3\\pi^2 n = 3 \\times 9.8696 \\times 8.5 \\times 10^{28} \\approx 2.517 \\times 10^{30}$ m$^{-3}$.",
     "Two thirds power: $(2.517 \\times 10^{30})^{2/3} \\approx 1.850 \\times 10^{20}$ m$^{-2}$.",
     "Prefactor: $\\frac{\\hbar^2}{2m} = \\frac{(1.054571817 \\times 10^{-34})^2}{2 \\times 9.1093837 \\times 10^{-31}} \\approx 6.104 \\times 10^{-39}$ J m$^2$.",
     "Multiply: $E_F \\approx 6.104 \\times 10^{-39} \\times 1.850 \\times 10^{20} \\approx 1.129 \\times 10^{-18}$ J, which is $1.129 \\times 10^{-18} / 1.602 \\times 10^{-19} \\approx 7.05$ eV."
    ],
    "answer": "The Fermi energy of copper's free electrons is about 7.05 eV. Even at absolute zero, the most energetic electrons in copper move with this much energy. Dividing by the Boltzmann constant gives a temperature of about 82,000 K, which is why this energy is not a temperature."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/fermi-dirac-distribution/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/particle-in-a-box/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/electron-shell-capacity/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/bose-einstein-distribution/"
   ],
   "sources": [
    {
     "title": "Fermi energy, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Fermi_energy"
    },
    {
     "title": "Free electron model, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Free_electron_model"
    }
   ],
   "published": "2026-10-22"
  },
  {
   "id": "quantum-mechanics/chsh-inequality",
   "title": "CHSH Inequality",
   "category": "quantum-mechanics",
   "url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/chsh-inequality/",
   "markdown_url": "https://formulabro.yunusemrevurgun.com/quantum-mechanics/chsh-inequality.md",
   "latex": "S = E(a,b) - E(a,b') + E(a',b) + E(a',b')",
   "one_liner": "A Bell test combines four measurements into one number, and any theory with pre-set local answers must keep its size at 2 or below.",
   "read_aloud": "S equals E of a b, minus E of a b prime, plus E of a prime b, plus E of a prime b prime. S is the CHSH sum. E of two settings is the average correlation of the two measurements, from minus 1 to plus 1. Local hidden variable theories keep the size of S at 2 or less, while quantum mechanics can reach 2 times the square root of 2.",
   "symbols": [
    {
     "latex": "S",
     "meaning": "The CHSH sum, a pure number with no unit. Its size is at most 4 by construction and at most $2\\sqrt{2}$ in quantum mechanics."
    },
    {
     "latex": "E(a,b)",
     "meaning": "The correlation for detector settings $a$ and $b$: the average of the product of the two results, each +1 or -1, over many paired trials. It ranges from $-1$ to $+1$."
    },
    {
     "latex": "a",
     "meaning": "The first of two possible settings on the first detector, such as a polarizer angle or a magnet direction."
    },
    {
     "latex": "a'",
     "meaning": "The second setting on the first detector."
    },
    {
     "latex": "b",
     "meaning": "The first of two possible settings on the second detector."
    },
    {
     "latex": "b'",
     "meaning": "The second setting on the second detector."
    }
   ],
   "worked_example": {
    "title": "Singlet detectors at 0, 90, 45 and 135 degrees",
    "setup": "For a singlet pair the correlation is $E(a,b) = -\\cos(\\theta_a - \\theta_b)$. Use detector angles $a = 0^\\circ$, $a' = 90^\\circ$, $b = 45^\\circ$ and $b' = 135^\\circ$.",
    "steps": [
     "Correlation $E(a,b)$: the angle difference is $0 - 45 = -45^\\circ$, so $E(a,b) = -\\cos(45^\\circ) \\approx -0.7071$.",
     "Correlation $E(a,b')$: the difference is $0 - 135 = -135^\\circ$, so $E(a,b') = -\\cos(-135^\\circ) \\approx +0.7071$.",
     "Correlation $E(a',b)$: the difference is $90 - 45 = 45^\\circ$, so $E(a',b) = -\\cos(45^\\circ) \\approx -0.7071$.",
     "Correlation $E(a',b')$: the difference is $90 - 135 = -45^\\circ$, so $E(a',b') = -\\cos(45^\\circ) \\approx -0.7071$.",
     "Sum: $S = (-0.7071) - (+0.7071) + (-0.7071) + (-0.7071) \\approx -2.828$, so $|S| \\approx 2.828 = 2\\sqrt{2}$."
    ],
    "answer": "The size $|S| = 2\\sqrt{2} \\approx 2.828$ is above the local limit of 2, which is the violation a Bell test looks for. The minus sign only reflects the sign convention and the chosen settings, so the size is the number that matters. Other settings give a smaller $|S|$, so the choice of angles matters."
   },
   "related": [
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/born-rule/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/spin-one-half/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/qubit-state/",
    "https://formulabro.yunusemrevurgun.com/quantum-mechanics/bloch-sphere/"
   ],
   "sources": [
    {
     "title": "CHSH inequality, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/CHSH_inequality"
    },
    {
     "title": "Bell's theorem, Wikipedia",
     "url": "https://en.wikipedia.org/wiki/Bell%27s_theorem"
    },
    {
     "title": "The Nobel Prize in Physics 2022",
     "url": "https://www.nobelprize.org/prizes/physics/2022/summary/"
    }
   ],
   "published": "2026-10-22"
  }
 ]
}
