liveBook · Manning

Scalar

A scalar is a single numerical quantity with no vector or multidimensional components.

How 4 Manning books explain it

Geometry for Programmers

A scalar is a real number that scales a vector or participates in vector operations as a magnitude factor.

How it is used
Scales vectors and point-vector models, while naming the numeric results of selected vector products.
How deep it goes
Defines scalar multiplication coordinate by coordinate and connects it to scaling, basis vectors, dot products, and orthogonality.
Examples
Uses half-scaling of (1.5, 2), basis expansion of (0.5, 1.5), model scaling, and a dot product yielding 56.
What you can do after
Evaluate/understand scalar multiplication as geometric scaling and recognize scalar outputs from dot and triple products.

Read how Geometry for Programmers explains scalar →

Pandas Workout: 200 exercises to make you a stronger data analyst

A scalar is a single numeric or other atomic value, as opposed to an array or labeled collection.

How it is used
Uses scalar values to broadcast calculations across Series and assign values to selected DataFrame elements.
How deep it goes
Explains scalar broadcasting, Boolean comparisons, aggregate-derived scalars, and shape-sensitive assignment, without developing scalar internals.
Examples
Demonstrates score adjustment with s + 10 and s + (80 - s.mean()), plus conditional DataFrame assignments through loc.
What you can do after
Apply it via pandas to broadcast values across Series and update matching DataFrame selections.

Read how Pandas Workout: 200 exercises to make you a stronger data analyst explains scalar →

Deep Learning with PyTorch, Second Edition

A single numeric value, contrasted here with multi-dimensional feature representations.

How it is used
Uses scalars as PyTorch model parameters, broadcast operands, and reduced loss values.
How deep it goes
Explains zero-dimensional representation and broadcasting mechanics, while deferring additional broadcasting practice.
Examples
Demonstrates scalar addition, multiplication, model parameters, mean squared loss, and TensorBoard scalar plots.
What you can do after
Apply scalar parameters and operations in PyTorch models using broadcasting and tensor reduction.

Read how Deep Learning with PyTorch, Second Edition explains scalar →

Modern C

A scalar is a C value or type representing a single non-aggregate value rather than a collection of components.

How it is used
Uses scalar values to control if statements and initialize individual objects.
How deep it goes
Defines scalar categories and truth rules, then demonstrates initialization, while deferring the full set of condition primitives.
Examples
Demonstrates scalar conditions with loop indices, scalar declarations, formatted output, and the {0} initializer.
What you can do after
Apply scalar values in C conditions and initialize scalar objects with convertible expressions or {0}.

Read how Modern C explains scalar →

Also covered in

What to know first

Related concepts

Questions about scalar

What is scalar?

A scalar is a single numerical quantity with no vector or multidimensional components.

Which Manning books explain scalar?

Geometry for Programmers, Pandas Workout: 200 exercises to make you a stronger data analyst, Deep Learning with PyTorch, Second Edition and Modern C.

What should I know before learning scalar?

Manning books that teach scalar usually introduce array, tuple, angle and comparison first.

What kinds of scalar are there?

Kinds of scalar include inner product and reference.

What is scalar a kind of?

Scalar is a kind of attribute value. An attribute value is the scalar, set, or document data associated with a DynamoDB attribute.

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.