Weighted sum
A weighted sum is an expression formed by multiplying quantities by corresponding scalar coefficients and adding the resulting products.
Math and Architectures of Deep Learning
A linear combination of values multiplied by coefficients.
- How it is used
- Combines input features into an interpretable model score before training estimates its weights.
- How deep it goes
- Defines scalar and vector forms, then connects them to dependence, bases, nonlinear models, and perceptrons.
- Examples
- Uses hardness and sharpness threat scores, binary logic gates, and probability-weighted expected values.
- What you can do after
- Evaluate/understand how weights and bias turn features or vectors into scores, decisions, and linear combinations.
Read how Math and Architectures of Deep Learning explains weighted sum →
Data Without Labels
A weighted sum is the sum obtained by multiplying each input by its corresponding coefficient and adding the results.
- How it is used
- Uses weighted sums to combine perceptron inputs and to form principal components from original variables.
- How deep it goes
- Explains multiplication by weights and subsequent activation, while illustrating PCA coefficients without detailing how to calculate them.
- Examples
- Uses a thresholded two-input perceptron and a home-variable equation combining area, bedrooms, distance, and schools.
- What you can do after
- Evaluate/understand how weighted inputs feed a perceptron’s output or become a PCA component.
Grokking AI Algorithms, Second Edition
A weighted sum is a sum of values after each value has been multiplied by a corresponding numerical weight, optionally incorporating a bias term.
- How it is used
- Calculates neuron inputs during forward propagation and blends Value vectors into context vectors during self-attention.
- How deep it goes
- Explains multiplication, addition, dot products, matrix multiplication, and activation, but stops short of theoretical proofs.
- Examples
- Uses scaled car-collision features, five hidden nodes, and attention-weighted token Value vectors as concrete calculation examples.
- What you can do after
- Build it from scratch by expressing one-neuron calculations as dot products and whole-layer calculations as matrix multiplications.
Read how Grokking AI Algorithms, Second Edition explains weighted sum →
Hacking Cryptography
A linear combination is an expression formed by multiplying values by coefficients and adding the resulting terms.
- How it is used
- Uses weighted sums to express LFSR output and recover unknown taps from observed bits.
- How deep it goes
- Explains recurrence equations, matrix inversion, Boolean arithmetic, and executable recovery code, stopping at LFSR exploitation.
- Examples
- Demonstrates three-bit LFSR recurrences, matrix equations, Go recovery functions, and timestamped known-plaintext decryption.
- What you can do after
- Diagnose weak LFSR constructions and recover their taps from sufficient observed or known-plaintext-derived bits.
Timeless Algorithms, The Foundational Ideas
A linear combination is a sum of quantities multiplied by scalar coefficients.
- How it is used
- Computes node inputs during neural-network forward passes, before activation functions transform them.
- How deep it goes
- Works through scalar pre-activation calculations and sigmoid transformations in a two-hidden-node example.
- Examples
- Uses input 2.0 with weight 0.8 and bias −0.5 to calculate a pre-activation value of 1.1.
- What you can do after
- Understand how an input, weight, and bias combine into a node’s pre-activation value.
Read how Timeless Algorithms, The Foundational Ideas explains weighted sum →
Also covered in
- Deep Learning with Python, Third Edition
- Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI
- Math for Web Design
- AI Recommender SystemsIn early access (MEAP)
- Build a DeepSeek Model (From Scratch)In early access (MEAP)
What to know first
- embeddingAn embedding is a numerical vector representation of an item in a feature space, encoding selected properties or relationships for computational tasks such as comparison or retrieval.
- linear regressionLinear regression is a statistical method that models a numeric response as a linear function of one or more predictor variables with fitted parameters.
- tokenA token is a discrete unit of text, such as a word, subword, punctuation mark, or symbol, produced by tokenization and processed by a language model.
- baselineA baseline is a reference model, result, measurement, or level used to compare performance or assess change.
Related concepts
- inner productequivalent to · An inner product is a scalar-valued operation on two vectors that generalizes the dot product, which for real coordinate vectors is the sum of products of corresponding components.
- attentionused by · Attention is a neural-network mechanism that computes input-dependent relevance weights to combine information from representations for a context-dependent computation.
- Gaussian mixture modelused by · A Gaussian mixture model is a probabilistic model that represents a distribution as a weighted combination of Gaussian component distributions.
- modeincludes · The statistical mode is the value or category occurring most frequently in a set of observations or outcomes.
- matrix-matrix multiplicationproduced by · Matrix multiplication is an operation on compatible matrices in which each entry of the product is the dot product of a row of the first matrix and a column of the second.
- moving average modelused by · A moving average model is a time-series model in which observations depend on a mean level and current and past error terms.
Questions about weighted sum
What is weighted sum?
A weighted sum is an expression formed by multiplying quantities by corresponding scalar coefficients and adding the resulting products.
Which Manning books explain weighted sum?
Math and Architectures of Deep Learning, Data Without Labels, Grokking AI Algorithms, Second Edition, Hacking Cryptography and Timeless Algorithms, The Foundational Ideas.
What should I know before learning weighted sum?
Manning books that teach weighted sum usually introduce embedding, linear regression, token and baseline first.
What kinds of weighted sum are there?
Kinds of weighted sum include mode.
What is weighted sum also called?
Weighted sum is also called linear combination or weighted combination.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.




