# Formula Bro > Plain-English explanations of 28 formulas from AI and machine learning, computer science, electricity and quantum mechanics. Every page defines each symbol with its unit, says how to read the formula aloud, and works one numeric example whose numbers are recomputed by script on every build. A side project developed by Yunus Emre Vurgun (https://yunusemrevurgun.com). Quote freely with a link to the page you used. Content last updated 2026-10-22. Every HTML page has a Markdown copy at the same path with .md instead of the trailing slash (for example https://formulabro.yunusemrevurgun.com/ai-ml/softmax.md). Machine-readable copies: [all pages in one file](https://formulabro.yunusemrevurgun.com/llms-full.txt), [JSON of every formula with LaTeX and symbols](https://formulabro.yunusemrevurgun.com/formulas.json), [sitemap](https://formulabro.yunusemrevurgun.com/sitemap.xml), [Atom feed](https://formulabro.yunusemrevurgun.com/feed.xml), [notes for AI agents](https://formulabro.yunusemrevurgun.com/for-ai-agents/). ## AI & Machine Learning Hub: [AI & Machine Learning formulas](https://formulabro.yunusemrevurgun.com/ai-ml/). The core formulas behind neural networks and machine learning, from the artificial neuron to attention, explained in plain English with worked examples. - [Artificial Neuron (Weighted Sum)](https://formulabro.yunusemrevurgun.com/ai-ml/artificial-neuron/): An artificial neuron multiplies each input by a weight, adds them up with a bias, and then decides how strongly to fire. Formula: $z = \sum_{i=1}^{n} w_i x_i + b, \quad a = f(z)$. Markdown: https://formulabro.yunusemrevurgun.com/ai-ml/artificial-neuron.md - [Sigmoid Function](https://formulabro.yunusemrevurgun.com/ai-ml/sigmoid-function/): 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. Formula: $\sigma(z) = \frac{1}{1 + e^{-z}}$. Markdown: https://formulabro.yunusemrevurgun.com/ai-ml/sigmoid-function.md - [Softmax](https://formulabro.yunusemrevurgun.com/ai-ml/softmax/): Softmax takes a list of scores, any numbers at all, and turns them into percentages that add up to 100%. Formula: $\operatorname{softmax}(z)_i = \frac{e^{z_i}}{\sum_{j=1}^{K} e^{z_j}}$. Markdown: https://formulabro.yunusemrevurgun.com/ai-ml/softmax.md - [Mean Squared Error (MSE)](https://formulabro.yunusemrevurgun.com/ai-ml/mean-squared-error/): 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. Formula: $\mathrm{MSE} = \frac{1}{n}\sum_{i=1}^{n} (y_i - \hat{y}_i)^2$. Markdown: https://formulabro.yunusemrevurgun.com/ai-ml/mean-squared-error.md - [Cross-Entropy Loss](https://formulabro.yunusemrevurgun.com/ai-ml/cross-entropy-loss/): Cross-entropy loss gives a small score when the model was confident in the right answer and a big score when it was not. Formula: $L = -\sum_{i=1}^{K} y_i \ln(\hat{y}_i)$. Markdown: https://formulabro.yunusemrevurgun.com/ai-ml/cross-entropy-loss.md - [Gradient Descent](https://formulabro.yunusemrevurgun.com/ai-ml/gradient-descent/): Gradient descent nudges a model's settings a small step in the direction that lowers the error, then repeats until the error stops falling. Formula: $\theta_{\text{new}} = \theta_{\text{old}} - \eta \, \nabla L(\theta_{\text{old}})$. Markdown: https://formulabro.yunusemrevurgun.com/ai-ml/gradient-descent.md - [Bayes' Theorem](https://formulabro.yunusemrevurgun.com/ai-ml/bayes-theorem/): Bayes' theorem tells you how much to change your belief in something after you see new evidence. Formula: $P(A \mid B) = \frac{P(B \mid A)\, P(A)}{P(B)}$. Markdown: https://formulabro.yunusemrevurgun.com/ai-ml/bayes-theorem.md - [Scaled Dot-Product Attention](https://formulabro.yunusemrevurgun.com/ai-ml/scaled-dot-product-attention/): 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. Formula: $\operatorname{Attention}(Q, K, V) = \operatorname{softmax}\left(\frac{Q K^{\top}}{\sqrt{d_k}}\right) V$. Markdown: https://formulabro.yunusemrevurgun.com/ai-ml/scaled-dot-product-attention.md ## Computer Science Hub: [Computer Science formulas](https://formulabro.yunusemrevurgun.com/computer-science/). Computer science formulas made easy: binary numbers, binary search, Shannon entropy, Amdahl's law, De Morgan's laws and Little's law, with worked examples. - [Binary Number Value](https://formulabro.yunusemrevurgun.com/computer-science/binary-number-value/): Binary uses only the digits 0 and 1, and this formula turns a row of those digits into the ordinary number they stand for. Formula: $N = \sum_{i=0}^{n-1} b_i \cdot 2^{i}$. Markdown: https://formulabro.yunusemrevurgun.com/computer-science/binary-number-value.md - [Binary Search Steps](https://formulabro.yunusemrevurgun.com/computer-science/binary-search-steps/): 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. Formula: $\text{steps} = \lceil \log_2 (n + 1) \rceil$. Markdown: https://formulabro.yunusemrevurgun.com/computer-science/binary-search-steps.md - [Shannon Entropy](https://formulabro.yunusemrevurgun.com/computer-science/shannon-entropy/): 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. Formula: $H = -\sum_{i=1}^{n} p_i \log_2 p_i$. Markdown: https://formulabro.yunusemrevurgun.com/computer-science/shannon-entropy.md - [Amdahl's Law](https://formulabro.yunusemrevurgun.com/computer-science/amdahls-law/): 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. Formula: $S = \frac{1}{(1 - p) + \frac{p}{s}}$. Markdown: https://formulabro.yunusemrevurgun.com/computer-science/amdahls-law.md - [De Morgan's Laws](https://formulabro.yunusemrevurgun.com/computer-science/de-morgans-laws/): 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. Formula: $\neg(A \land B) = \neg A \lor \neg B \qquad \neg(A \lor B) = \neg A \land \neg B$. Markdown: https://formulabro.yunusemrevurgun.com/computer-science/de-morgans-laws.md - [Little's Law](https://formulabro.yunusemrevurgun.com/computer-science/littles-law/): Little's law says the number of things inside a system equals how fast they arrive, multiplied by how long each one stays. Formula: $L = \lambda W$. Markdown: https://formulabro.yunusemrevurgun.com/computer-science/littles-law.md ## Electricity Hub: [Electricity formulas](https://formulabro.yunusemrevurgun.com/electricity/). Electricity formulas for beginners: Ohm's law, power, kilowatt-hours, series and parallel resistors, Kirchhoff's current law, RC circuits and Coulomb's law. - [Ohm's Law](https://formulabro.yunusemrevurgun.com/electricity/ohms-law/): 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. Formula: $V = I R$. Markdown: https://formulabro.yunusemrevurgun.com/electricity/ohms-law.md - [Electric Power](https://formulabro.yunusemrevurgun.com/electricity/electric-power/): Electric power tells you how fast a device uses energy, and you get it by multiplying the volts by the amps to get watts. Formula: $P = V I$. Markdown: https://formulabro.yunusemrevurgun.com/electricity/electric-power.md - [Energy and Kilowatt-Hours](https://formulabro.yunusemrevurgun.com/electricity/energy-and-kilowatt-hours/): Energy is power multiplied by time, so a heater that uses 2 kilowatts for 3 hours uses 6 kilowatt-hours of energy. Formula: $E = P \, t$. Markdown: https://formulabro.yunusemrevurgun.com/electricity/energy-and-kilowatt-hours.md - [Resistors in Series and Parallel](https://formulabro.yunusemrevurgun.com/electricity/resistors-in-series-and-parallel/): Resistors in a line add up, and resistors side by side always give a total smaller than the smallest one. Formula: $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}$. Markdown: https://formulabro.yunusemrevurgun.com/electricity/resistors-in-series-and-parallel.md - [Kirchhoff's Current Law](https://formulabro.yunusemrevurgun.com/electricity/kirchhoffs-current-law/): Kirchhoff's current law says that whatever electricity flows into a junction has to flow out again, because nothing piles up there. Formula: $\sum I_{\text{in}} = \sum I_{\text{out}}$. Markdown: https://formulabro.yunusemrevurgun.com/electricity/kirchhoffs-current-law.md - [RC Time Constant](https://formulabro.yunusemrevurgun.com/electricity/rc-time-constant/): The RC time constant tells you how long a capacitor takes to fill up through a resistor: multiply the resistance by the capacitance. Formula: $\tau = R C$. Markdown: https://formulabro.yunusemrevurgun.com/electricity/rc-time-constant.md - [Coulomb's Law](https://formulabro.yunusemrevurgun.com/electricity/coulombs-law/): 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. Formula: $F = k_e \frac{|q_1 q_2|}{r^2}$. Markdown: https://formulabro.yunusemrevurgun.com/electricity/coulombs-law.md ## Quantum Mechanics Hub: [Quantum Mechanics formulas](https://formulabro.yunusemrevurgun.com/quantum-mechanics/). Quantum formulas for beginners: E = hf, photoelectric effect, de Broglie wavelength, uncertainty, Born rule, Schrödinger equation and hydrogen levels. - [Planck-Einstein Relation (E = hf)](https://formulabro.yunusemrevurgun.com/quantum-mechanics/planck-einstein-relation/): 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. Formula: $E = h f$. Markdown: https://formulabro.yunusemrevurgun.com/quantum-mechanics/planck-einstein-relation.md - [Photoelectric Effect](https://formulabro.yunusemrevurgun.com/quantum-mechanics/photoelectric-effect/): 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. Formula: $K_{\max} = h f - \phi$. Markdown: https://formulabro.yunusemrevurgun.com/quantum-mechanics/photoelectric-effect.md - [De Broglie Wavelength](https://formulabro.yunusemrevurgun.com/quantum-mechanics/de-broglie-wavelength/): Every moving object has a wavelength, and the heavier or faster it moves, the shorter that wavelength gets. Formula: $\lambda = \frac{h}{p} = \frac{h}{m v}$. Markdown: https://formulabro.yunusemrevurgun.com/quantum-mechanics/de-broglie-wavelength.md - [Heisenberg Uncertainty Principle](https://formulabro.yunusemrevurgun.com/quantum-mechanics/heisenberg-uncertainty-principle/): 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. Formula: $\Delta x \, \Delta p \ge \frac{\hbar}{2}$. Markdown: https://formulabro.yunusemrevurgun.com/quantum-mechanics/heisenberg-uncertainty-principle.md - [Born Rule](https://formulabro.yunusemrevurgun.com/quantum-mechanics/born-rule/): 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. Formula: $P(x) = |\psi(x)|^2$. Markdown: https://formulabro.yunusemrevurgun.com/quantum-mechanics/born-rule.md - [Schrödinger Equation](https://formulabro.yunusemrevurgun.com/quantum-mechanics/schrodinger-equation/): 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. Formula: $i \hbar \frac{\partial \psi}{\partial t} = \hat{H} \psi$. Markdown: https://formulabro.yunusemrevurgun.com/quantum-mechanics/schrodinger-equation.md - [Hydrogen Energy Levels](https://formulabro.yunusemrevurgun.com/quantum-mechanics/hydrogen-energy-levels/): 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. Formula: $E_n = -\frac{13.6\ \text{eV}}{n^2}$. Markdown: https://formulabro.yunusemrevurgun.com/quantum-mechanics/hydrogen-energy-levels.md ## Optional - [About Formula Bro](https://formulabro.yunusemrevurgun.com/about/): What Formula Bro is, who made it, how every formula page is written and checked, and how to report a mistake. - [Notes for AI Agents](https://formulabro.yunusemrevurgun.com/for-ai-agents/): How AI assistants, crawlers and agents can read Formula Bro: Markdown copies, llms.txt, a JSON file of every formula, URL patterns and citation rules.