liveBook · Manning

L2 norm

The L2 norm is the nonnegative Euclidean magnitude of a vector, equal to the square root of the sum of its components’ squares, and to absolute value for a scalar.

How 3 Manning books explain it

Grokking Machine Learning

The L2 norm of a vector is the square root of the sum of the squared values of its components.

How it is used
Uses squared model coefficients as a complexity measure in regularization to help reduce overfitting.
How deep it goes
Defines the complexity measure, explains coefficient shrinkage, and excludes model bias from the calculation.
Examples
Uses movie recommendation coefficients and a polynomial regression exercise to illustrate complexity and ridge error.
What you can do after
Apply L2 regularization by adding a coefficient-complexity measure to regression error during training.

Read how Grokking Machine Learning explains l2 norm →

Natural Language Processing in Action, Second Edition

The L2 norm of a vector is the square root of the sum of the squares of its components.

How it is used
Supports measuring vector length, Euclidean distance, normalization, and cosine-based comparison in NLP vector spaces.
How deep it goes
Defines the formula, explains geometric consequences, and demonstrates NumPy normalization without deriving deeper linear-algebra theory.
Examples
Uses two-dimensional vector geometry, a four-element NumPy vector, TF vectors, and normalized sentence embeddings.
What you can do after
Apply it via NumPy to calculate vector lengths, normalize embeddings, and support cosine-similarity computations.

Read how Natural Language Processing in Action, Second Edition explains l2 norm →

Math and Architectures of Deep Learning

The Euclidean norm measuring a vector's length by squaring components, summing them, and taking the square root.

How it is used
Measures vector magnitude, model prediction error, and weight size used for regularization.
How deep it goes
Defines the formula, dot-product relationship, geometric meaning, normalization use, and regularization role without deriving matrix norms.
Examples
Uses error vectors across training data, right-triangle geometry, unit-vector normalization, and weight penalties.
What you can do after
Evaluate vector magnitude, interpret prediction error, normalize vectors, and understand L2 weight regularization.

Read how Math and Architectures of Deep Learning explains l2 norm →

Related concepts

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.