Editorial and copyright principles
This English edition translates a Korean study-oriented reconstruction of ECE5992 Modern Artificial Intelligence Chapter 1 materials dated March 12 and 19, 2025. It does not reproduce the source’s sentence arrangement, page layout, or illustrations. Concepts are explained in new wording and diagrams are newly created. The mathematical content is preserved because changing an equation’s meaning would be unacceptable. Differences in equation numbering between versions and questionable source notation are documented separately.
No material was discarded in this consolidation.
Earlier provisional drafts on linear algebra, perceptrons, probability, and optimization, temporarily numbered 2–8, were merged into this first article. This integrated edition combines two Chapter 1 PDFs in one post.
#Preserving every equation
Each displayed equation has a unique MAI identifier. The integrated article currently contains 238 equation blocks. Identical equations repeated across source versions are explained once, while differences in notation or numbering receive notes. KaTeX rendering rather than equation images preserves copying, search, and accessibility.
#Series structure
The series follows ECE5992 materials actually obtained: this integrated Chapter 1 plus seven subsequent PDFs form eight articles. No empty posts are created merely to fill numbers.
The eight-part study map above presents this progression in one view.
Mathematical and probability foundations → Machine-learning generalization → Perceptrons and CNNs → Gradient optimization → Image classification → Semantic segmentation → VAEs and diffusion → Contrastive representation learning
Map entries become links as subsequent articles become available, so a duplicate table organized around PDF filenames is unnecessary here.
#Auditing source notation
Comparison of the two versions distinguishes source notation from standard mathematical notation in the following cases.
- The second equation in the two-variable linear-system example contains
x_2twice. The source equation is preserved and a general form is given separately. - If
A\in\mathbb{R}^{M\times N}andx\in\mathbb{R}^{N}, thenAx\in\mathbb{R}^{M}. A source sentence’s output dimension appears to be a typographical error in context; the text uses the correct dimension. - The geometric distance from the origin to a hyperplane is
|b|/\|w\|_2, whileb/\|w\|_2can represent signed distance. The source’sb/\|w\|_2is annotated as a signed expression. - The joint density of M independent Gaussian vectors requires normalization
|C|^{-M/2}. A source derivation appears to use|C|^{-1/2}, so both the preserved source expression and its correction are shown. - For complex random vectors, uncorrelatedness generally requires
E[\widetilde X_i\widetilde X_j^*]=0. One source version omits conjugation, and the difference is identified in the text.
#Part 1.0: Fields and the research ecosystem
Equation reading mode — Every displayed equation below opens
Explanation and calculations. Each card proceeds through the question → intermediate calculations → numerical example → checks → external references.
#2. AI, ML, and DL are different terms
Broadly, artificial intelligence concerns building systems that behave intelligently. Machine learning learns rules or representations from data within that field. Deep learning is a machine-learning family centered on multilayer neural networks.
In one line:
Artificial intelligence ⊃ Machine learning ⊃ Deep learning
This inclusion diagram is not a complete law of the field’s history. Rule-based AI, search, planning, and optimization can be non-learning approaches, while modern systems combine learned models with search, tools, external memory, and planners. It provides a starting view of field relationships rather than a complete account of contemporary architectures.
#3. What should you read?
The research ecosystem presented in the lectures remains useful. Following a field requires more than reading isolated papers: develop a habit of scanning journal and conference proceedings tables of contents.
#Representative journals
- IEEE Transactions on Pattern Analysis and Machine Intelligence
- Nature Machine Intelligence
- IEEE Transactions on Image Processing
- IEEE Transactions on Signal Processing
- IEEE Transactions on Medical Imaging
- IEEE Transactions on Computational Imaging
- IEEE Transactions on Intelligent Transportation Systems
- IEEE Transactions on Robotics
- Pattern Recognition
- Medical Image Analysis
- IEEE Signal Processing Letters
- IEEE Robotics and Automation Letters
#Representative conferences
- NeurIPS
- ICML
- ICLR
- CVPR
- ICCV
- ECCV
- MICCAI
- ICIP
- IROS
- ICRA
The important point is connections between fields, rather than the list alone. Imaging, signal processing, robotics, medical imaging, and machine learning overlap extensively in actual research.
#4. Image processing and computer vision
The lecture presents the imaging pipeline as follows.
Physical scene → Image formation → Raw measurements → Image processing → Improved image → Image analysis → Meaningful decisions
Two additional branches accompany this pipeline.
- Image display: representing images for human viewing
- Image compression: reducing storage and transmission costs
Traditionally, image processing was often called low-level vision, and image analysis high-level vision. Deep learning has weakened this boundary: one network can jointly learn restoration, feature extraction, detection, and classification.
#Low-level and high-level perspectives
| Perspective | Low-level emphasis | High-level emphasis |
|---|---|---|
| Main question | How should pixels be restored or transformed? | What is in the scene, and what does it mean? |
| Typical tasks | Denoising, super-resolution, restoration, calibration | Classification, detection, segmentation, tracking, reasoning |
| Traditional foundations | Signal processing, optimization, statistics | Pattern recognition, machine learning |
| Modern characteristic | Substantial overlap | Substantial overlap |
#5. An important caution from the lectures
One central message is that fundamental understanding of modern deep learning remains immature.
Better model performance differs from fully understanding why models generalize, what representations they learn, and when they fail. This motivates the linear algebra, probability, and optimization that follow.
#6. August 2026 update
These foundations remain necessary in 2026, while implementation practice has expanded substantially.
- The source article identifies the current stable PyTorch documentation as the 2.13 series, with
torch.linalg,torch.func,torch.compile, distributed training, and attention kernels alongside tensor operations in one ecosystem. - CNNs are no longer the only basic visual architecture. Since Vision Transformer, patch-based attention has become a standard choice, with CNNs, Transformers, and hybrids coexisting.
- “Modern AI equals a simple multilayer network” is therefore incomplete. Connect mathematical foundations → representation learning → large-scale optimization → efficient compilation and distributed execution.
#Current references in the source article
#7. Next section
Next comes linear algebra, beginning with vector and matrix notation and reconstructing inner products, outer products, matrix–vector products, and matrix–matrix products equation by equation.
#Part 1.1: Linear Algebra I — Vectors, Matrices, and Products
#1. Why begin with linear algebra?
Most modern neural networks ultimately execute operations on vectors and matrices. Linear algebra is more than a prerequisite: it connects forward passes, matrix representations of convolution, attention, optimization, and covariance calculations.
#1.1 A two-variable linear system
The lectures provide the following two equations. The second contains x_2 twice in the source. We preserve that notation and give a conventional two-variable system immediately below.
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
A general two-variable linear system is usually written as follows.
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Matrix notation makes it much more compact.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
#2. Basic notation
Always check column-vector and matrix dimensions first.
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Reference-quality follow-up
Explore this calculation further
Columnwise and rowwise notation are also common.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Reference-quality follow-up
Explore this calculation further
#3. Vectorizing an image
Flattening a multidimensional image into one long vector allows operations such as convolution to be expressed as matrix–vector multiplication.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which unknown vector makes every row's equation hold simultaneously?
Key idea
Read each row as an equation and solve using elimination, an inverse, or a factorization.
Calculation walkthrough
Calculation steps
- 1
Expand into rowwise equations
One matrix row dotted with the unknown vector produces one right-hand-side value.
- 2
Eliminate a variable
Add or subtract equations to reduce the unknown count. LU or QR factorizations play this role in larger problems.
- 3
Back-substitute the remaining value
Insert the solved value into an original equation to obtain other unknowns.
- 4
Substitute into every equation again
Check that the calculated solution satisfies every row.
Worked example
Work through the numbers — Solving a 2×2 system directly
Think of finding the intersection of two lines.
- 1
Problem
- 2
Add equations to eliminate y
- 3
Back-substitute into the second equation
- 4
Check
Result: The solution is therefore (x,y)=(2,1).
Sanity check
Checks
- Ax on the left and b on the right must have the same dimension.
- The inverse expression applies directly only when A is square and invertible.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Target or observation vector |
Reference-quality follow-up
Explore this calculation further
#4. Vector–vector products
#4.1 Inner product
An inner product reduces two vectors to one scalar.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Formula-specific lesson
Connect dot products, outer products, matrix products, norms, rank, and inverses in one numerical example
Use the same x, y, A, and B to calculate dot and outer products, Ax, AB, outer-sum decomposition, norms, determinants, rank, and inverses, connecting Part I's key linear-algebra identities.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Target or observation vector | |
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Target or observation vector |
Reference-quality follow-up
Explore this calculation further
#4.2 Outer product
An outer product forms a matrix from two vectors.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Formula-specific lesson
Connect dot products, outer products, matrix products, norms, rank, and inverses in one numerical example
Use the same x, y, A, and B to calculate dot and outer products, Ax, AB, outer-sum decomposition, norms, determinants, rank, and inverses, connecting Part I's key linear-algebra identities.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Target or observation vector |
Reference-quality follow-up
Explore this calculation further
#5. Two views of matrix–vector multiplication
Rowwise, each output component is the inner product of one matrix row with the input vector.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Formula-specific lesson
Connect dot products, outer products, matrix products, norms, rank, and inverses in one numerical example
Use the same x, y, A, and B to calculate dot and outer products, Ax, AB, outer-sum decomposition, norms, determinants, rank, and inverses, connecting Part I's key linear-algebra identities.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Target or observation vector |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
Columnwise, the output is a linear combination of A’s columns.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Target or observation vector |
Reference-quality follow-up
Explore this calculation further
A row vector can also multiply from the left.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Target or observation vector |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Target or observation vector |
Reference-quality follow-up
Explore this calculation further
#6. Matrix–matrix multiplication
Part I · Study equation
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Connect dot products, outer products, matrix products, norms, rank, and inverses in one numerical example
Use the same x, y, A, and B to calculate dot and outer products, Ax, AB, outer-sum decomposition, norms, determinants, rank, and inverses, connecting Part I's key linear-algebra identities.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How much direction do two vectors share?
Key idea
Summing component products gives one scalar, repeatedly used for prediction scores, similarity, and projection.
Formula-specific lesson
Connect dot products, outer products, matrix products, norms, rank, and inverses in one numerical example
Use the same x, y, A, and B to calculate dot and outer products, Ax, AB, outer-sum decomposition, norms, determinants, rank, and inverses, connecting Part I's key linear-algebra identities.
Calculation walkthrough
Calculation steps
- 1
Match the vector lengths
They must have the same number of components.
- 2
Multiply corresponding components
- 3
Sum all products
- 4
Interpret sign and magnitude
Positive generally indicates alignment, zero orthogonality, and negative opposition.
Worked example
Work through the numbers — Computing a weighted sum
Apply weights to two features.
- 1
Values
- 2
Componentwise products
- 3
Sum
Result: The final linear score is 2.
Sanity check
Checks
- The result is one scalar, not a vector.
- For quantities with units, product terms must share units to be added.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Collecting row–column inner products gives:
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
The column–row view expresses it as a sum of outer products.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How much direction do two vectors share?
Key idea
Summing component products gives one scalar, repeatedly used for prediction scores, similarity, and projection.
Formula-specific lesson
Connect dot products, outer products, matrix products, norms, rank, and inverses in one numerical example
Use the same x, y, A, and B to calculate dot and outer products, Ax, AB, outer-sum decomposition, norms, determinants, rank, and inverses, connecting Part I's key linear-algebra identities.
Calculation walkthrough
Calculation steps
- 1
Match the vector lengths
They must have the same number of components.
- 2
Multiply corresponding components
- 3
Sum all products
- 4
Interpret sign and magnitude
Positive generally indicates alignment, zero orthogonality, and negative opposition.
Worked example
Work through the numbers — Computing a weighted sum
Apply weights to two features.
- 1
Values
- 2
Componentwise products
- 3
Sum
Result: The final linear score is 2.
Sanity check
Checks
- The result is one scalar, not a vector.
- For quantities with units, product terms must share units to be added.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Viewing B by columns, each column of C is A multiplied by one column of B.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Viewing A by rows, each row of C is obtained as follows.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
#6.1 Basic multiplication properties
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
#7. Identity and diagonal matrices
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
#8. Transpose
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
#9. Implementation perspective in 2026
As of the source’s August 2026 update, PyTorch 2.13’s torch.linalg directly provides nearly all operations covered here, including norms, determinants, rank, solve, QR, and Cholesky.
In practice, solving the linear system Ax=b with torch.linalg.solve is often numerically and computationally preferable to explicitly forming A^{-1}b.
#10. Perspectives to remember
Rather than memorize multiplication as one formula, learn all four views.
- Row–column inner products
- A sum of outer products
- Applying A to each column of B
- Applying B to each row of A
These perspectives recur in fully connected layers, convolution’s im2col representation, and attention projections.
#Part 1.2: Linear Algebra II — Symmetry, Trace, Norms, Rank, and Determinants
#1. Symmetric and skew-symmetric matrices
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Any square matrix decomposes into symmetric and skew-symmetric parts.
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
#2. Trace
Trace is the sum of diagonal entries.
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
#3. Norms
#3.1 Euclidean norm
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How far is a vector or error from the origin?
Key idea
The L2 norm sums squared components and takes the square root. Squared norm omits the final square root.
Formula-specific lesson
Connect dot products, outer products, matrix products, norms, rank, and inverses in one numerical example
Use the same x, y, A, and B to calculate dot and outer products, Ax, AB, outer-sum decomposition, norms, determinants, rank, and inverses, connecting Part I's key linear-algebra identities.
Calculation walkthrough
Calculation steps
- 1
Square each component
Turn both negative and positive components into nonnegative contributions.
- 2
Sum the squares
- 3
Take the square root for a norm
- 4
Distinguish the squared norm
Worked example
Work through the numbers — The 3–4–5 vector
A familiar Pythagorean example.
- 1
Vector
- 2
Sum of squares
- 3
Square root
Result: Thus ||x||₂=5 and ||x||₂²=25.
Sanity check
Checks
- A norm is always nonnegative.
- Confusing a norm with its square changes units and derivative coefficients.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How far is a vector or error from the origin?
Key idea
The L2 norm sums squared components and takes the square root. Squared norm omits the final square root.
Formula-specific lesson
Connect dot products, outer products, matrix products, norms, rank, and inverses in one numerical example
Use the same x, y, A, and B to calculate dot and outer products, Ax, AB, outer-sum decomposition, norms, determinants, rank, and inverses, connecting Part I's key linear-algebra identities.
Calculation walkthrough
Calculation steps
- 1
Square each component
Turn both negative and positive components into nonnegative contributions.
- 2
Sum the squares
- 3
Take the square root for a norm
- 4
Distinguish the squared norm
Worked example
Work through the numbers — The 3–4–5 vector
A familiar Pythagorean example.
- 1
Vector
- 2
Sum of squares
- 3
Square root
Result: Thus ||x||₂=5 and ||x||₂²=25.
Sanity check
Checks
- A norm is always nonnegative.
- Confusing a norm with its square changes units and derivative coefficients.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
A norm generalizes length and satisfies four properties.
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Target or observation vector |
Reference-quality follow-up
Explore this calculation further
Other representative norms are included too.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How far is a vector or error from the origin?
Key idea
The L2 norm sums squared components and takes the square root. Squared norm omits the final square root.
Calculation walkthrough
Calculation steps
- 1
Square each component
Turn both negative and positive components into nonnegative contributions.
- 2
Sum the squares
- 3
Take the square root for a norm
- 4
Distinguish the squared norm
Worked example
Work through the numbers — The 3–4–5 vector
A familiar Pythagorean example.
- 1
Vector
- 2
Sum of squares
- 3
Square root
Result: Thus ||x||₂=5 and ||x||₂²=25.
Sanity check
Checks
- A norm is always nonnegative.
- Confusing a norm with its square changes units and derivative coefficients.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How far are predictions from targets on average?
Key idea
Subtract targets from predictions, square each residual, and divide by sample count. Larger errors receive greater penalties.
Calculation walkthrough
Calculation steps
- 1
Calculate predictions
For linear regression, predictions are Xw or wᵀx.
- 2
Calculate residuals
- 3
Square the residuals
Remove signs and emphasize larger errors.
- 4
Sum and divide by sample count
Worked example
Work through the numbers — MSE for two samples
Compare predictions and targets directly.
- 1
Targets and predictions
- 2
Residual
- 3
Square
- 4
Average
Result: MSE is 5. The second sample's error of 3 substantially increases it.
Sanity check
Checks
- Check whether the expression divides by sample count or is merely a sum of squares.
- MSE has squared output units.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How far is a vector or error from the origin?
Key idea
The L2 norm sums squared components and takes the square root. Squared norm omits the final square root.
Calculation walkthrough
Calculation steps
- 1
Square each component
Turn both negative and positive components into nonnegative contributions.
- 2
Sum the squares
- 3
Take the square root for a norm
- 4
Distinguish the squared norm
Worked example
Work through the numbers — The 3–4–5 vector
A familiar Pythagorean example.
- 1
Vector
- 2
Sum of squares
- 3
Square root
Result: Thus ||x||₂=5 and ||x||₂²=25.
Sanity check
Checks
- A norm is always nonnegative.
- Confusing a norm with its square changes units and derivative coefficients.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
For matrices, the Frobenius norm frequently appears.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How far is a vector or error from the origin?
Key idea
The L2 norm sums squared components and takes the square root. Squared norm omits the final square root.
Formula-specific lesson
Connect dot products, outer products, matrix products, norms, rank, and inverses in one numerical example
Use the same x, y, A, and B to calculate dot and outer products, Ax, AB, outer-sum decomposition, norms, determinants, rank, and inverses, connecting Part I's key linear-algebra identities.
Calculation walkthrough
Calculation steps
- 1
Square each component
Turn both negative and positive components into nonnegative contributions.
- 2
Sum the squares
- 3
Take the square root for a norm
- 4
Distinguish the squared norm
Worked example
Work through the numbers — The 3–4–5 vector
A familiar Pythagorean example.
- 1
Vector
- 2
Sum of squares
- 3
Square root
Result: Thus ||x||₂=5 and ||x||₂²=25.
Sanity check
Checks
- A norm is always nonnegative.
- Confusing a norm with its square changes units and derivative coefficients.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
#4. Linear independence and rank
If one vector can be expressed as a linear combination of the others, the set is linearly dependent.
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learning rate, mixture coefficient, or dual coefficient | |
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
The lecture gives these three example vectors.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
Basic rank properties follow.
Part I · Study equation
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Connect dot products, outer products, matrix products, norms, rank, and inverses in one numerical example
Use the same x, y, A, and B to calculate dot and outer products, Ax, AB, outer-sum decomposition, norms, determinants, rank, and inverses, connecting Part I's key linear-algebra identities.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
#5. Matrix inverse
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How can the vector before applying A be recovered?
Key idea
Using A^{-1}A=I, left-multiplying Ax=b by the inverse gives x=A^{-1}b.
Formula-specific lesson
Connect dot products, outer products, matrix products, norms, rank, and inverses in one numerical example
Use the same x, y, A, and B to calculate dot and outer products, Ax, AB, outer-sum decomposition, norms, determinants, rank, and inverses, connecting Part I's key linear-algebra identities.
Calculation walkthrough
Calculation steps
- 1
Check invertibility
A classical inverse requires a square matrix with nonzero determinant.
- 2
Left-multiply both sides by the same matrix
- 3
Replace A^{-1}A with the identity
- 4
Use a linear-system solver in practice
Numerically, solve, LU, or QR is preferable to explicitly forming an inverse.
Worked example
Work through the numbers — Checking a 2×2 inverse
Verify reversal directly with a small matrix.
- 1
Matrix
- 2
Inverse
- 3
Product
Result: Taking reciprocals of diagonal entries reverses the original scaling.
Sanity check
Checks
- If det(A)=0, a pseudoinverse or least-squares solution is needed instead.
- Check both AB=I and BA=I.
Reference-quality follow-up
Explore this calculation further
Even a square matrix has no inverse if singular. For nonsingular matrices, the following properties hold.
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
#6. Orthogonality and orthogonal matrices
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Target or observation vector |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How far is a vector or error from the origin?
Key idea
The L2 norm sums squared components and takes the square root. Squared norm omits the final square root.
Calculation walkthrough
Calculation steps
- 1
Square each component
Turn both negative and positive components into nonnegative contributions.
- 2
Sum the squares
- 3
Take the square root for a norm
- 4
Distinguish the squared norm
Worked example
Work through the numbers — The 3–4–5 vector
A familiar Pythagorean example.
- 1
Vector
- 2
Sum of squares
- 3
Square root
Result: Thus ||x||₂=5 and ||x||₂²=25.
Sanity check
Checks
- A norm is always nonnegative.
- Confusing a norm with its square changes units and derivative coefficients.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
A square orthogonal matrix U has orthonormal columns and satisfies:
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
If only a rectangular matrix’s columns are orthonormal, just one multiplication order yields an identity.
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Orthogonal transformations preserve Euclidean length.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How far is a vector or error from the origin?
Key idea
The L2 norm sums squared components and takes the square root. Squared norm omits the final square root.
Formula-specific lesson
Connect dot products, outer products, matrix products, norms, rank, and inverses in one numerical example
Use the same x, y, A, and B to calculate dot and outer products, Ax, AB, outer-sum decomposition, norms, determinants, rank, and inverses, connecting Part I's key linear-algebra identities.
Calculation walkthrough
Calculation steps
- 1
Square each component
Turn both negative and positive components into nonnegative contributions.
- 2
Sum the squares
- 3
Take the square root for a norm
- 4
Distinguish the squared norm
Worked example
Work through the numbers — The 3–4–5 vector
A familiar Pythagorean example.
- 1
Vector
- 2
Sum of squares
- 3
Square root
Result: Thus ||x||₂=5 and ||x||₂²=25.
Sanity check
Checks
- A norm is always nonnegative.
- Confusing a norm with its square changes units and derivative coefficients.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
#7. Determinant
The determinant’s absolute value represents the volume of the parallelotope formed by the row vectors.
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Learning rate, mixture coefficient, or dual coefficient | |
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
The lecture’s 2×2 example follows.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Connect dot products, outer products, matrix products, norms, rank, and inverses in one numerical example
Use the same x, y, A, and B to calculate dot and outer products, Ax, AB, outer-sum decomposition, norms, determinants, rank, and inverses, connecting Part I's key linear-algebra identities.
Reference-quality follow-up
Explore this calculation further
The key determinant properties are listed in full.
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
#8. Numerical computation in 2026
An important practical refinement is to distinguish mathematical definitions from numerical code.
- Inverses matter mathematically, but explicitly forming
inv(A) @ bevery time is not a good default computational habit. For linear systems,solveis more direct. - Small determinants can underflow and large ones overflow, making the log determinant
slogdetuseful. - Treat rank as numerical rank depending on floating-point tolerance, rather than exact symbolic rank.
Current PyTorch’s torch.linalg includes solve, slogdet, matrix_rank, qr, svd, and eigh.
#Part 1.3: Linear Algebra III — Quadratic Forms, Eigenvalues, and Derivatives
#1. Quadratic forms
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which unknown vector makes every row's equation hold simultaneously?
Key idea
Read each row as an equation and solve using elimination, an inverse, or a factorization.
Formula-specific lesson
Quadratic forms, eigenvalues, covariance, and PCA axes
Use one symmetric matrix and a 2D sample cloud to calculate quadratic forms, eigenpairs, trace/determinant identities, covariance symmetry, and principal axes together.
Calculation walkthrough
Calculation steps
- 1
Expand into rowwise equations
One matrix row dotted with the unknown vector produces one right-hand-side value.
- 2
Eliminate a variable
Add or subtract equations to reduce the unknown count. LU or QR factorizations play this role in larger problems.
- 3
Back-substitute the remaining value
Insert the solved value into an original equation to obtain other unknowns.
- 4
Substitute into every equation again
Check that the calculated solution satisfies every row.
Worked example
Work through the numbers — Solving a 2×2 system directly
Think of finding the intersection of two lines.
- 1
Problem
- 2
Add equations to eliminate y
- 3
Back-substitute into the second equation
- 4
Check
Result: The solution is therefore (x,y)=(2,1).
Sanity check
Checks
- Ax on the left and b on the right must have the same dimension.
- The inverse expression applies directly only when A is square and invertible.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
Only A’s symmetric part contributes to a quadratic form.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which unknown vector makes every row's equation hold simultaneously?
Key idea
Read each row as an equation and solve using elimination, an inverse, or a factorization.
Calculation walkthrough
Calculation steps
- 1
Expand into rowwise equations
One matrix row dotted with the unknown vector produces one right-hand-side value.
- 2
Eliminate a variable
Add or subtract equations to reduce the unknown count. LU or QR factorizations play this role in larger problems.
- 3
Back-substitute the remaining value
Insert the solved value into an original equation to obtain other unknowns.
- 4
Substitute into every equation again
Check that the calculated solution satisfies every row.
Worked example
Work through the numbers — Solving a 2×2 system directly
Think of finding the intersection of two lines.
- 1
Problem
- 2
Add equations to eliminate y
- 3
Back-substitute into the second equation
- 4
Check
Result: The solution is therefore (x,y)=(2,1).
Sanity check
Checks
- Ax on the left and b on the right must have the same dimension.
- The inverse expression applies directly only when A is square and invertible.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
#2. Positive definiteness and semidefiniteness
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which unknown vector makes every row's equation hold simultaneously?
Key idea
Read each row as an equation and solve using elimination, an inverse, or a factorization.
Calculation walkthrough
Calculation steps
- 1
Expand into rowwise equations
One matrix row dotted with the unknown vector produces one right-hand-side value.
- 2
Eliminate a variable
Add or subtract equations to reduce the unknown count. LU or QR factorizations play this role in larger problems.
- 3
Back-substitute the remaining value
Insert the solved value into an original equation to obtain other unknowns.
- 4
Substitute into every equation again
Check that the calculated solution satisfies every row.
Worked example
Work through the numbers — Solving a 2×2 system directly
Think of finding the intersection of two lines.
- 1
Problem
- 2
Add equations to eliminate y
- 3
Back-substitute into the second equation
- 4
Check
Result: The solution is therefore (x,y)=(2,1).
Sanity check
Checks
- Ax on the left and b on the right must have the same dimension.
- The inverse expression applies directly only when A is square and invertible.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which unknown vector makes every row's equation hold simultaneously?
Key idea
Read each row as an equation and solve using elimination, an inverse, or a factorization.
Calculation walkthrough
Calculation steps
- 1
Expand into rowwise equations
One matrix row dotted with the unknown vector produces one right-hand-side value.
- 2
Eliminate a variable
Add or subtract equations to reduce the unknown count. LU or QR factorizations play this role in larger problems.
- 3
Back-substitute the remaining value
Insert the solved value into an original equation to obtain other unknowns.
- 4
Substitute into every equation again
Check that the calculated solution satisfies every row.
Worked example
Work through the numbers — Solving a 2×2 system directly
Think of finding the intersection of two lines.
- 1
Problem
- 2
Add equations to eliminate y
- 3
Back-substitute into the second equation
- 4
Check
Result: The solution is therefore (x,y)=(2,1).
Sanity check
Checks
- Ax on the left and b on the right must have the same dimension.
- The inverse expression applies directly only when A is square and invertible.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which unknown vector makes every row's equation hold simultaneously?
Key idea
Read each row as an equation and solve using elimination, an inverse, or a factorization.
Calculation walkthrough
Calculation steps
- 1
Expand into rowwise equations
One matrix row dotted with the unknown vector produces one right-hand-side value.
- 2
Eliminate a variable
Add or subtract equations to reduce the unknown count. LU or QR factorizations play this role in larger problems.
- 3
Back-substitute the remaining value
Insert the solved value into an original equation to obtain other unknowns.
- 4
Substitute into every equation again
Check that the calculated solution satisfies every row.
Worked example
Work through the numbers — Solving a 2×2 system directly
Think of finding the intersection of two lines.
- 1
Problem
- 2
Add equations to eliminate y
- 3
Back-substitute into the second equation
- 4
Check
Result: The solution is therefore (x,y)=(2,1).
Sanity check
Checks
- Ax on the left and b on the right must have the same dimension.
- The inverse expression applies directly only when A is square and invertible.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which unknown vector makes every row's equation hold simultaneously?
Key idea
Read each row as an equation and solve using elimination, an inverse, or a factorization.
Calculation walkthrough
Calculation steps
- 1
Expand into rowwise equations
One matrix row dotted with the unknown vector produces one right-hand-side value.
- 2
Eliminate a variable
Add or subtract equations to reduce the unknown count. LU or QR factorizations play this role in larger problems.
- 3
Back-substitute the remaining value
Insert the solved value into an original equation to obtain other unknowns.
- 4
Substitute into every equation again
Check that the calculated solution satisfies every row.
Worked example
Work through the numbers — Solving a 2×2 system directly
Think of finding the intersection of two lines.
- 1
Problem
- 2
Add equations to eliminate y
- 3
Back-substitute into the second equation
- 4
Check
Result: The solution is therefore (x,y)=(2,1).
Sanity check
Checks
- Ax on the left and b on the right must have the same dimension.
- The inverse expression applies directly only when A is square and invertible.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
Indefinite means positive in some directions and negative in others.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which unknown vector makes every row's equation hold simultaneously?
Key idea
Read each row as an equation and solve using elimination, an inverse, or a factorization.
Calculation walkthrough
Calculation steps
- 1
Expand into rowwise equations
One matrix row dotted with the unknown vector produces one right-hand-side value.
- 2
Eliminate a variable
Add or subtract equations to reduce the unknown count. LU or QR factorizations play this role in larger problems.
- 3
Back-substitute the remaining value
Insert the solved value into an original equation to obtain other unknowns.
- 4
Substitute into every equation again
Check that the calculated solution satisfies every row.
Worked example
Work through the numbers — Solving a 2×2 system directly
Think of finding the intersection of two lines.
- 1
Problem
- 2
Add equations to eliminate y
- 3
Back-substitute into the second equation
- 4
Check
Result: The solution is therefore (x,y)=(2,1).
Sanity check
Checks
- Ax on the left and b on the right must have the same dimension.
- The inverse expression applies directly only when A is square and invertible.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
#3. Eigenvalues and eigenvectors
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which unknown vector makes every row's equation hold simultaneously?
Key idea
Read each row as an equation and solve using elimination, an inverse, or a factorization.
Formula-specific lesson
Quadratic forms, eigenvalues, covariance, and PCA axes
Use one symmetric matrix and a 2D sample cloud to calculate quadratic forms, eigenpairs, trace/determinant identities, covariance symmetry, and principal axes together.
Calculation walkthrough
Calculation steps
- 1
Expand into rowwise equations
One matrix row dotted with the unknown vector produces one right-hand-side value.
- 2
Eliminate a variable
Add or subtract equations to reduce the unknown count. LU or QR factorizations play this role in larger problems.
- 3
Back-substitute the remaining value
Insert the solved value into an original equation to obtain other unknowns.
- 4
Substitute into every equation again
Check that the calculated solution satisfies every row.
Worked example
Work through the numbers — Solving a 2×2 system directly
Think of finding the intersection of two lines.
- 1
Problem
- 2
Add equations to eliminate y
- 3
Back-substitute into the second equation
- 4
Check
Result: The solution is therefore (x,y)=(2,1).
Sanity check
Checks
- Ax on the left and b on the right must have the same dimension.
- The inverse expression applies directly only when A is square and invertible.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Regularization strength or eigenvalue |
Reference-quality follow-up
Explore this calculation further
Eigenvalues connect directly with trace, determinant, and rank.
Part I · Study equation
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Quadratic forms, eigenvalues, covariance, and PCA axes
Use one symmetric matrix and a 2D sample cloud to calculate quadratic forms, eigenpairs, trace/determinant identities, covariance symmetry, and principal axes together.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Regularization strength or eigenvalue | |
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 5 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which class scores highest after observing several features?
Key idea
Multiply class priors by successive conditional feature likelihoods and compare classes.
Formula-specific lesson
Quadratic forms, eigenvalues, covariance, and PCA axes
Use one symmetric matrix and a 2D sample cloud to calculate quadratic forms, eigenpairs, trace/determinant identities, covariance symmetry, and principal axes together.
Calculation walkthrough
Calculation steps
- 1
Prepare class priors
- 2
Calculate conditional feature likelihoods
- 3
Multiply all terms
- 4
Use sums of logarithms for numerical stability
- 5
Select the highest-scoring class
Worked example
Work through the numbers — Two features and two classes
S₁: prior=.6, likelihoods=.8,.5; S₂: prior=.4, likelihoods=.3,.9.
- 1
S₁ score
- 2
S₂ score
Result: Since 0.24>0.108, select S₁.
Sanity check
Checks
- A general MAP expression includes class prior P(S_c).
- Many multiplied features can underflow, so use log-domain calculations.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Regularization strength or eigenvalue | |
| Multiply all specified terms |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Quadratic forms, eigenvalues, covariance, and PCA axes
Use one symmetric matrix and a 2D sample cloud to calculate quadratic forms, eigenpairs, trace/determinant identities, covariance symmetry, and principal axes together.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Regularization strength or eigenvalue |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Regularization strength or eigenvalue |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Regularization strength or eigenvalue | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
Collecting all eigenvector equations gives:
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Regularization strength or eigenvalue | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
If X is invertible, A is diagonalizable.
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Data matrix collecting samples | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
#4. Eigendecomposition of symmetric matrices
A symmetric matrix has real eigenvalues and can have orthonormal eigenvectors.
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
This structure lets eigenvalue signs determine definiteness.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which unknown vector makes every row's equation hold simultaneously?
Key idea
Read each row as an equation and solve using elimination, an inverse, or a factorization.
Calculation walkthrough
Calculation steps
- 1
Expand into rowwise equations
One matrix row dotted with the unknown vector produces one right-hand-side value.
- 2
Eliminate a variable
Add or subtract equations to reduce the unknown count. LU or QR factorizations play this role in larger problems.
- 3
Back-substitute the remaining value
Insert the solved value into an original equation to obtain other unknowns.
- 4
Substitute into every equation again
Check that the calculated solution satisfies every row.
Worked example
Work through the numbers — Solving a 2×2 system directly
Think of finding the intersection of two lines.
- 1
Problem
- 2
Add equations to eliminate y
- 3
Back-substitute into the second equation
- 4
Check
Result: The solution is therefore (x,y)=(2,1).
Sanity check
Checks
- Ax on the left and b on the right must have the same dimension.
- The inverse expression applies directly only when A is square and invertible.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Target or observation vector | |
| Regularization strength or eigenvalue | |
| Sum over all specified terms | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Target or observation vector |
Reference-quality follow-up
Explore this calculation further
#5. Gradients with respect to matrices
For a scalar-valued function of a matrix, the gradient is a matrix of partial derivatives matching the input’s shape.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| A gradient collecting derivatives in each variable direction | |
| Partial derivative with respect to a particular variable |
Reference-quality follow-up
Explore this calculation further
For vector inputs, this becomes the familiar gradient.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| A gradient collecting derivatives in each variable direction | |
| Partial derivative with respect to a particular variable |
Reference-quality follow-up
Explore this calculation further
Linearity is preserved as well.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| A gradient collecting derivatives in each variable direction |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| A gradient collecting derivatives in each variable direction |
Reference-quality follow-up
Explore this calculation further
#6. Hessian
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| A gradient collecting derivatives in each variable direction | |
| Partial derivative with respect to a particular variable |
Reference-quality follow-up
Explore this calculation further
For sufficiently smooth functions, mixed partial derivatives agree and the Hessian is symmetric.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Partial derivative with respect to a particular variable |
Reference-quality follow-up
Explore this calculation further
#7. Derivative formulas for linear and quadratic functions
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| A gradient collecting derivatives in each variable direction |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| A gradient collecting derivatives in each variable direction |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| A gradient collecting derivatives in each variable direction |
Reference-quality follow-up
Explore this calculation further
#8. Automatic differentiation in 2026
PyTorch can calculate these gradients, Jacobians, and Hessians without manual expansion. Autodifferentiation does not eliminate mathematics: without understanding shape, symmetry, positive definiteness, and conditioning, results are easy to misinterpret.
As of the source’s August 2026 update, PyTorch 2.13’s torch.func directly provides:
gradvjp,jvpjacrev,jacfwdhessianvmap
Hessians involve second derivatives, so memory and compute can grow rapidly. Large-scale models often use Hessian–vector products rather than a full Hessian.
#Part 1.4: Perceptrons, Convolution, and DNNs
#1. From biological neurons to perceptrons
A perceptron does not faithfully reproduce a biological neuron. It abstracts a computational structure: inputs → weighted sum → nonlinear or threshold function → output.
One neuron in a multilayer network can be written using the lecture diagram’s equation as follows.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which event or observation interval's probability is required?
Key idea
Define the event, add mutually exclusive cases, and multiply chained conditions using conditional probabilities.
Calculation walkthrough
Calculation steps
- 1
Translate events and conditions into words
P(A|B) is the probability of A given B.
- 2
Choose a sum rule or product rule
Add mutually exclusive alternatives; multiply sequential conditions.
- 3
Use total probability for the denominator if needed
- 4
Check 0≤P≤1 and total probability 1
Worked example
Work through the numbers — Conditional probability
P(A∩B)=0.15 and P(B)=0.30.
- 1
Apply the definition
- 2
Substitute values
Result: Among cases where B occurs, A occurs half the time.
Sanity check
Checks
- The conditioning event's probability in the denominator must be nonzero.
- Distinguish density p(x) from event probability P(X∈A).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
#2. From a two-dimensional line to an N-dimensional hyperplane
A two-dimensional line can be written as:
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Rearranging into a general linear boundary gives:
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
In N dimensions, it becomes a hyperplane.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which event or observation interval's probability is required?
Key idea
Define the event, add mutually exclusive cases, and multiply chained conditions using conditional probabilities.
Calculation walkthrough
Calculation steps
- 1
Translate events and conditions into words
P(A|B) is the probability of A given B.
- 2
Choose a sum rule or product rule
Add mutually exclusive alternatives; multiply sequential conditions.
- 3
Use total probability for the denominator if needed
- 4
Check 0≤P≤1 and total probability 1
Worked example
Work through the numbers — Conditional probability
P(A∩B)=0.15 and P(B)=0.30.
- 1
Apply the definition
- 2
Substitute values
Result: Among cases where B occurs, A occurs half the time.
Sanity check
Checks
- The conditioning event's probability in the denominator must be nonzero.
- Distinguish density p(x) from event probability P(X∈A).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learned weight vector |
Reference-quality follow-up
Explore this calculation further
#3. The perceptron’s discriminant function
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which side of the decision boundary contains input x?
Key idea
Calculate wᵀx+b: positive assigns one class, negative the other, and zero lies on the boundary.
Calculation walkthrough
Calculation steps
- 1
Multiply corresponding features and weights
- 2
Sum the products and add bias
- 3
Check the sign
- 4
Calculate boundary distance if needed
Worked example
Work through the numbers — Classifying one point
w=[1,-2], x=[3,1], and b=0.5.
- 1
Weighted sum
- 2
Class
- 3
Distance to the boundary
Result: The point is on the positive-class side, approximately 0.67 from the boundary.
Sanity check
Checks
- w and x must have the same dimension.
- Geometric distance requires |g(x)|, while signed distance may retain its sign.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learned weight vector |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which side of the decision boundary contains input x?
Key idea
Calculate wᵀx+b: positive assigns one class, negative the other, and zero lies on the boundary.
Calculation walkthrough
Calculation steps
- 1
Multiply corresponding features and weights
- 2
Sum the products and add bias
- 3
Check the sign
- 4
Calculate boundary distance if needed
Worked example
Work through the numbers — Classifying one point
w=[1,-2], x=[3,1], and b=0.5.
- 1
Weighted sum
- 2
Class
- 3
Distance to the boundary
Result: The point is on the positive-class side, approximately 0.67 from the boundary.
Sanity check
Checks
- w and x must have the same dimension.
- Geometric distance requires |g(x)|, while signed distance may retain its sign.
Reference-quality follow-up
Explore this calculation further
#3.1 Decision-boundary geometry
- The boundary is perpendicular to weight vector
\mathbf{w}. - Bias shifts the boundary’s location.
- The source’s
b/\|w\|_2can be read as signed distance. Nonnegative geometric distance is|b|/\|w\|_2.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How far are predictions from targets on average?
Key idea
Subtract targets from predictions, square each residual, and divide by sample count. Larger errors receive greater penalties.
Calculation walkthrough
Calculation steps
- 1
Calculate predictions
For linear regression, predictions are Xw or wᵀx.
- 2
Calculate residuals
- 3
Square the residuals
Remove signs and emphasize larger errors.
- 4
Sum and divide by sample count
Worked example
Work through the numbers — MSE for two samples
Compare predictions and targets directly.
- 1
Targets and predictions
- 2
Residual
- 3
Square
- 4
Average
Result: MSE is 5. The second sample's error of 3 substantially increases it.
Sanity check
Checks
- Check whether the expression divides by sample count or is merely a sum of squares.
- MSE has squared output units.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Learned weight vector |
Reference-quality follow-up
Explore this calculation further
Including the sign, a point x’s position relative to the boundary is expressed by:
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How far are predictions from targets on average?
Key idea
Subtract targets from predictions, square each residual, and divide by sample count. Larger errors receive greater penalties.
Calculation walkthrough
Calculation steps
- 1
Calculate predictions
For linear regression, predictions are Xw or wᵀx.
- 2
Calculate residuals
- 3
Square the residuals
Remove signs and emphasize larger errors.
- 4
Sum and divide by sample count
Worked example
Work through the numbers — MSE for two samples
Compare predictions and targets directly.
- 1
Targets and predictions
- 2
Residual
- 3
Square
- 4
Average
Result: MSE is 5. The second sample's error of 3 substantially increases it.
Sanity check
Checks
- Check whether the expression divides by sample count or is merely a sum of squares.
- MSE has squared output units.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learned weight vector |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
#4. Linearly separable training sets and zero error
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
In one line:
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
#5. Nonlinear discriminants and convolution
Begin with continuous convolution, one of the DNN’s key building blocks.
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
These two discrete forms are equivalent.
Part I · Study equation
Explanation and calculations 5 calculation steps · Numerical example · Checks included
The question this equation answers
How do filter weights summarize each location's neighborhood?
Key idea
Flip and shift the kernel, then sum products of overlapping entries. CNN implementations commonly use unflipped cross-correlation.
Calculation walkthrough
Calculation steps
- 1
Check kernel orientation and boundary conditions
First distinguish mathematical convolution from CNN-style cross-correlation.
- 2
Align the kernel with an output position
Stride and padding determine the overlapping input region.
- 3
Multiply overlapping entries
- 4
Sum the products
- 5
Move to the next position and repeat
In 2D, perform the same operation over horizontal and vertical indices.
Worked example
Work through the numbers — 1D full convolution
Use signal [1,2,3] and kernel [1,1].
- 1
First position
- 2
Second position
- 3
Third position
- 4
Last position
Result: The full output is [1,3,5,3].
Note: Same or valid padding changes output length.
Sanity check
Checks
- Output size depends on kernel, padding, stride, and dilation.
- Keep kernel-flipping conventions consistent between code and equations.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 5 calculation steps · Numerical example · Checks included
The question this equation answers
How do filter weights summarize each location's neighborhood?
Key idea
Flip and shift the kernel, then sum products of overlapping entries. CNN implementations commonly use unflipped cross-correlation.
Calculation walkthrough
Calculation steps
- 1
Check kernel orientation and boundary conditions
First distinguish mathematical convolution from CNN-style cross-correlation.
- 2
Align the kernel with an output position
Stride and padding determine the overlapping input region.
- 3
Multiply overlapping entries
- 4
Sum the products
- 5
Move to the next position and repeat
In 2D, perform the same operation over horizontal and vertical indices.
Worked example
Work through the numbers — 1D full convolution
Use signal [1,2,3] and kernel [1,1].
- 1
First position
- 2
Second position
- 3
Third position
- 4
Last position
Result: The full output is [1,3,5,3].
Note: Same or valid padding changes output length.
Sanity check
Checks
- Output size depends on kernel, padding, stride, and dilation.
- Keep kernel-flipping conventions consistent between code and equations.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
#6. Common DNN modules
The lecture’s PyTorch module list is reorganized by function below.
| Module | Role |
|---|---|
nn.Linear | Fully connected linear transformation |
nn.Conv2d | Two-dimensional convolution |
nn.ConvTranspose2d | Transposed-convolution upsampling |
nn.ReLU | Nonlinear activation |
nn.MaxPool2d | Max pooling |
nn.AvgPool2d | Average pooling |
nn.Upsample | Interpolation-based upsampling |
nn.Dropout | Regularization through random deactivation during training |
#7. 2026 update: what followed CNNs?
CNN mathematics has not become obsolete, but visual-model choices have broadened substantially.
- Vision Transformer treats images as patch sequences and demonstrated strong image recognition with attention alone.
- PyTorch 2.13 provides
scaled_dot_product_attentionand can dispatch to several backends, including FlashAttention-2-family implementations. torch.compileis a central PyTorch execution path capturing model code as graphs for optimization.- CNNs remain widely used for low-level features, embedded vision, restoration, medical imaging, and hybrid architectures.
The lecture’s perceptron → convolution → DNN progression is a historical foundation, extended by attention and foundation models.
#Part 1.5: Random Variables, Conditional Probability, and Conditional Expectation
#1. CDF and PDF of a real random variable
Part I · Study equation
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
From PMFs to expectation, variance, and conditional laws
Use a small discrete distribution and joint table to connect normalization, expectation, variance, conditional distributions, and conditional expectation.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
From PMFs to expectation, variance, and conditional laws
Use a small discrete distribution and joint table to connect normalization, expectation, variance, conditional distributions, and conditional expectation.
Reference-quality follow-up
Explore this calculation further
#2. Discrete and continuous distributions
The lecture’s discrete examples are Bernoulli, binomial, and Poisson; continuous examples are uniform, Gaussian, and Laplace.
The Poisson PMF is:
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Regularization strength or eigenvalue |
Reference-quality follow-up
Explore this calculation further
A univariate Gaussian PDF with mean μ and variance σ² is:
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How widely does a random variable spread around its mean?
Key idea
Subtract the mean from each value, square, and take the probability-weighted average.
Calculation walkthrough
Calculation steps
- 1
Calculate the mean
- 2
Calculate deviations from the mean
- 3
Square the deviations
- 4
Take the expectation
Worked example
Work through the numbers — X∈{1,2,3} with probabilities {0.2,0.5,0.3}
Use mean μ=2.1 from the preceding example.
- 1
Squared deviations
- 2
Probability-weighted sum
Result: Variance is 0.49 and standard deviation is √0.49=0.7.
Sanity check
Checks
- Variance cannot be negative.
- Standard deviation shares the variable's units; variance has squared units.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Average | |
| Standard deviation or sigmoid notation |
Reference-quality follow-up
Explore this calculation further
#3. Independence
Part I · Study equation
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
From PMFs to expectation, variance, and conditional laws
Use a small discrete distribution and joint table to connect normalization, expectation, variance, conditional distributions, and conditional expectation.
Reference-quality follow-up
Explore this calculation further
#4. Mean, expectation, variance, and correlation
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Formula-specific lesson
From PMFs to expectation, variance, and conditional laws
Use a small discrete distribution and joint table to connect normalization, expectation, variance, conditional distributions, and conditional expectation.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Average | |
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Formula-specific lesson
From PMFs to expectation, variance, and conditional laws
Use a small discrete distribution and joint table to connect normalization, expectation, variance, conditional distributions, and conditional expectation.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How widely does a random variable spread around its mean?
Key idea
Subtract the mean from each value, square, and take the probability-weighted average.
Calculation walkthrough
Calculation steps
- 1
Calculate the mean
- 2
Calculate deviations from the mean
- 3
Square the deviations
- 4
Take the expectation
Worked example
Work through the numbers — X∈{1,2,3} with probabilities {0.2,0.5,0.3}
Use mean μ=2.1 from the preceding example.
- 1
Squared deviations
- 2
Probability-weighted sum
Result: Variance is 0.49 and standard deviation is √0.49=0.7.
Sanity check
Checks
- Variance cannot be negative.
- Standard deviation shares the variable's units; variance has squared units.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
Expanding real and imaginary parts of complex random variables makes the correlation integral four-dimensional.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
#5. Covariance
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
When X exceeds its mean, does Y tend to increase too?
Key idea
Multiply centered deviations and average. Positive indicates a same-direction tendency; negative indicates opposite directions.
Formula-specific lesson
From PMFs to expectation, variance, and conditional laws
Use a small discrete distribution and joint table to connect normalization, expectation, variance, conditional distributions, and conditional expectation.
Calculation walkthrough
Calculation steps
- 1
Calculate each variable's mean
- 2
Calculate deviations
- 3
Multiply paired deviations
- 4
Take an expectation or sample average
Worked example
Work through the numbers — Covariance direction with two samples
X=[1,3], Y=[2,6], with means 2 and 4.
- 1
Deviations
- 2
Products of deviations
- 3
Average
Result: Positive covariance indicates the variables tend to increase together.
Sanity check
Checks
- Cov(X,X)=Var(X).
- Zero covariance does not generally guarantee independence.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Expectation: the probability-weighted average of possible values | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Distinguish ensemble mean from a finite-sample mean.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which event or observation interval's probability is required?
Key idea
Define the event, add mutually exclusive cases, and multiply chained conditions using conditional probabilities.
Calculation walkthrough
Calculation steps
- 1
Translate events and conditions into words
P(A|B) is the probability of A given B.
- 2
Choose a sum rule or product rule
Add mutually exclusive alternatives; multiply sequential conditions.
- 3
Use total probability for the denominator if needed
- 4
Check 0≤P≤1 and total probability 1
Worked example
Work through the numbers — Conditional probability
P(A∩B)=0.15 and P(B)=0.30.
- 1
Apply the definition
- 2
Substitute values
Result: Among cases where B occurs, A occurs half the time.
Sanity check
Checks
- The conditioning event's probability in the denominator must be nonzero.
- Distinguish density p(x) from event probability P(X∈A).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
The covariance properties are listed in full.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
When X exceeds its mean, does Y tend to increase too?
Key idea
Multiply centered deviations and average. Positive indicates a same-direction tendency; negative indicates opposite directions.
Calculation walkthrough
Calculation steps
- 1
Calculate each variable's mean
- 2
Calculate deviations
- 3
Multiply paired deviations
- 4
Take an expectation or sample average
Worked example
Work through the numbers — Covariance direction with two samples
X=[1,3], Y=[2,6], with means 2 and 4.
- 1
Deviations
- 2
Products of deviations
- 3
Average
Result: Positive covariance indicates the variables tend to increase together.
Sanity check
Checks
- Cov(X,X)=Var(X).
- Zero covariance does not generally guarantee independence.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Average | |
| Expectation: the probability-weighted average of possible values | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
When X exceeds its mean, does Y tend to increase too?
Key idea
Multiply centered deviations and average. Positive indicates a same-direction tendency; negative indicates opposite directions.
Calculation walkthrough
Calculation steps
- 1
Calculate each variable's mean
- 2
Calculate deviations
- 3
Multiply paired deviations
- 4
Take an expectation or sample average
Worked example
Work through the numbers — Covariance direction with two samples
X=[1,3], Y=[2,6], with means 2 and 4.
- 1
Deviations
- 2
Products of deviations
- 3
Average
Result: Positive covariance indicates the variables tend to increase together.
Sanity check
Checks
- Cov(X,X)=Var(X).
- Zero covariance does not generally guarantee independence.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
When X exceeds its mean, does Y tend to increase too?
Key idea
Multiply centered deviations and average. Positive indicates a same-direction tendency; negative indicates opposite directions.
Calculation walkthrough
Calculation steps
- 1
Calculate each variable's mean
- 2
Calculate deviations
- 3
Multiply paired deviations
- 4
Take an expectation or sample average
Worked example
Work through the numbers — Covariance direction with two samples
X=[1,3], Y=[2,6], with means 2 and 4.
- 1
Deviations
- 2
Products of deviations
- 3
Average
Result: Positive covariance indicates the variables tend to increase together.
Sanity check
Checks
- Cov(X,X)=Var(X).
- Zero covariance does not generally guarantee independence.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
When X exceeds its mean, does Y tend to increase too?
Key idea
Multiply centered deviations and average. Positive indicates a same-direction tendency; negative indicates opposite directions.
Calculation walkthrough
Calculation steps
- 1
Calculate each variable's mean
- 2
Calculate deviations
- 3
Multiply paired deviations
- 4
Take an expectation or sample average
Worked example
Work through the numbers — Covariance direction with two samples
X=[1,3], Y=[2,6], with means 2 and 4.
- 1
Deviations
- 2
Products of deviations
- 3
Average
Result: Positive covariance indicates the variables tend to increase together.
Sanity check
Checks
- Cov(X,X)=Var(X).
- Zero covariance does not generally guarantee independence.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
When X exceeds its mean, does Y tend to increase too?
Key idea
Multiply centered deviations and average. Positive indicates a same-direction tendency; negative indicates opposite directions.
Calculation walkthrough
Calculation steps
- 1
Calculate each variable's mean
- 2
Calculate deviations
- 3
Multiply paired deviations
- 4
Take an expectation or sample average
Worked example
Work through the numbers — Covariance direction with two samples
X=[1,3], Y=[2,6], with means 2 and 4.
- 1
Deviations
- 2
Products of deviations
- 3
Average
Result: Positive covariance indicates the variables tend to increase together.
Sanity check
Checks
- Cov(X,X)=Var(X).
- Zero covariance does not generally guarantee independence.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Standard deviation or sigmoid notation | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
When X exceeds its mean, does Y tend to increase too?
Key idea
Multiply centered deviations and average. Positive indicates a same-direction tendency; negative indicates opposite directions.
Calculation walkthrough
Calculation steps
- 1
Calculate each variable's mean
- 2
Calculate deviations
- 3
Multiply paired deviations
- 4
Take an expectation or sample average
Worked example
Work through the numbers — Covariance direction with two samples
X=[1,3], Y=[2,6], with means 2 and 4.
- 1
Deviations
- 2
Products of deviations
- 3
Average
Result: Positive covariance indicates the variables tend to increase together.
Sanity check
Checks
- Cov(X,X)=Var(X).
- Zero covariance does not generally guarantee independence.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Average | |
| Expectation: the probability-weighted average of possible values | |
| Total class count or a matrix; check context | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
The converse does not generally hold. Jointly Gaussian variables are a special case where uncorrelatedness implies independence.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
When X exceeds its mean, does Y tend to increase too?
Key idea
Multiply centered deviations and average. Positive indicates a same-direction tendency; negative indicates opposite directions.
Calculation walkthrough
Calculation steps
- 1
Calculate each variable's mean
- 2
Calculate deviations
- 3
Multiply paired deviations
- 4
Take an expectation or sample average
Worked example
Work through the numbers — Covariance direction with two samples
X=[1,3], Y=[2,6], with means 2 and 4.
- 1
Deviations
- 2
Products of deviations
- 3
Average
Result: Positive covariance indicates the variables tend to increase together.
Sanity check
Checks
- Cov(X,X)=Var(X).
- Zero covariance does not generally guarantee independence.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
#6. A vector proof of Cauchy–Schwarz
The lecture footnote’s derivation is retained too.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which event or observation interval's probability is required?
Key idea
Define the event, add mutually exclusive cases, and multiply chained conditions using conditional probabilities.
Calculation walkthrough
Calculation steps
- 1
Translate events and conditions into words
P(A|B) is the probability of A given B.
- 2
Choose a sum rule or product rule
Add mutually exclusive alternatives; multiply sequential conditions.
- 3
Use total probability for the denominator if needed
- 4
Check 0≤P≤1 and total probability 1
Worked example
Work through the numbers — Conditional probability
P(A∩B)=0.15 and P(B)=0.30.
- 1
Apply the definition
- 2
Substitute values
Result: Among cases where B occurs, A occurs half the time.
Sanity check
Checks
- The conditioning event's probability in the denominator must be nonzero.
- Distinguish density p(x) from event probability P(X∈A).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which event or observation interval's probability is required?
Key idea
Define the event, add mutually exclusive cases, and multiply chained conditions using conditional probabilities.
Calculation walkthrough
Calculation steps
- 1
Translate events and conditions into words
P(A|B) is the probability of A given B.
- 2
Choose a sum rule or product rule
Add mutually exclusive alternatives; multiply sequential conditions.
- 3
Use total probability for the denominator if needed
- 4
Check 0≤P≤1 and total probability 1
Worked example
Work through the numbers — Conditional probability
P(A∩B)=0.15 and P(B)=0.30.
- 1
Apply the definition
- 2
Substitute values
Result: Among cases where B occurs, A occurs half the time.
Sanity check
Checks
- The conditioning event's probability in the denominator must be nonzero.
- Distinguish density p(x) from event probability P(X∈A).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
#7. Conditional probability
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which event or observation interval's probability is required?
Key idea
Define the event, add mutually exclusive cases, and multiply chained conditions using conditional probabilities.
Formula-specific lesson
From PMFs to expectation, variance, and conditional laws
Use a small discrete distribution and joint table to connect normalization, expectation, variance, conditional distributions, and conditional expectation.
Calculation walkthrough
Calculation steps
- 1
Translate events and conditions into words
P(A|B) is the probability of A given B.
- 2
Choose a sum rule or product rule
Add mutually exclusive alternatives; multiply sequential conditions.
- 3
Use total probability for the denominator if needed
- 4
Check 0≤P≤1 and total probability 1
Worked example
Work through the numbers — Conditional probability
P(A∩B)=0.15 and P(B)=0.30.
- 1
Apply the definition
- 2
Substitute values
Result: Among cases where B occurs, A occurs half the time.
Sanity check
Checks
- The conditioning event's probability in the denominator must be nonzero.
- Distinguish density p(x) from event probability P(X∈A).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Event probability |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
The density-function form may be more familiar.
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Under independence, conditioning does not change X’s distribution.
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
#8. Conditional expectation
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Formula-specific lesson
From PMFs to expectation, variance, and conditional laws
Use a small discrete distribution and joint table to connect normalization, expectation, variance, conditional distributions, and conditional expectation.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Formula-specific lesson
From PMFs to expectation, variance, and conditional laws
Use a small discrete distribution and joint table to connect normalization, expectation, variance, conditional distributions, and conditional expectation.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
Conditional expectation is a function of Y and therefore itself a random variable.
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
#8.1 Filtration property
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
The integral expansion of the filtration property in the lecture footnote is also retained.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
#8.2 Conditioning on an already known quantity
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
#9. Deterministic or random?
The lecture’s check questions are retained as equations too.
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Average | |
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
Interpret them as follows.
Y=f(X): generally a random variable\mu=E[X]: a deterministic scalar once its distribution is fixedE[X\mid Z]: a random variable because it is a function of ZE[X\mid Z=z_0]: a deterministic quantity when conditioned on a particular z₀
#10. Implementation perspective in 2026
As of the source’s August 2026 update, PyTorch 2.13’s torch.distributions treats Bernoulli, normal, and Poisson distributions as more than sampling tools. Through log_prob, entropy, and reparameterized sampling, it connects probabilistic models to computation graphs.
Conditional probability and expectation are therefore both classical statistical language and foundations for implementing VAEs, stochastic policies, Bayesian layers, and uncertainty estimation.
#Part 1.6: Random Vectors, Joint Gaussians, WSS, and Power Spectra
#1. Random vectors
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Data matrix collecting samples | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Data matrix collecting samples |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Data matrix collecting samples |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Data matrix collecting samples | |
| Partial derivative with respect to a particular variable |
Reference-quality follow-up
Explore this calculation further
#2. Multivariate Gaussian distributions
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How plausible is observation x under mean μ and covariance Σ?
Key idea
Calculate a covariance-scaled distance from the mean and a normalization constant to obtain density.
Calculation walkthrough
Calculation steps
- 1
Calculate the difference from the mean
- 2
Adjust distance using variance or covariance
- 3
Calculate exponential decay
- 4
Divide by the normalization constant
Worked example
Work through the numbers — x=1 under a standard normal
A one-dimensional Gaussian with μ=0 and σ=1.
- 1
Standardized distance
- 2
Exponential term
- 3
Normalization
Result: Density at x=1 is approximately 0.242. A density value is not itself an event probability.
Sanity check
Checks
- Σ must be symmetric positive definite for the inverse and positive density to be stably defined.
- Obtain probabilities through interval integration, distinct from pointwise density.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Data matrix collecting samples | |
| Average | |
| Gaussian distribution | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Data matrix collecting samples | |
| Average | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Learning rate, mixture coefficient, or dual coefficient | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
#3. Expectation, correlation, and covariance of random vectors
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Data matrix collecting samples | |
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Data matrix collecting samples | |
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Data matrix collecting samples | |
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
When X exceeds its mean, does Y tend to increase too?
Key idea
Multiply centered deviations and average. Positive indicates a same-direction tendency; negative indicates opposite directions.
Calculation walkthrough
Calculation steps
- 1
Calculate each variable's mean
- 2
Calculate deviations
- 3
Multiply paired deviations
- 4
Take an expectation or sample average
Worked example
Work through the numbers — Covariance direction with two samples
X=[1,3], Y=[2,6], with means 2 and 4.
- 1
Deviations
- 2
Products of deviations
- 3
Average
Result: Positive covariance indicates the variables tend to increase together.
Sanity check
Checks
- Cov(X,X)=Var(X).
- Zero covariance does not generally guarantee independence.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Data matrix collecting samples | |
| Expectation: the probability-weighted average of possible values | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Formula-specific lesson
Quadratic forms, eigenvalues, covariance, and PCA axes
Use one symmetric matrix and a 2D sample cloud to calculate quadratic forms, eigenpairs, trace/determinant identities, covariance symmetry, and principal axes together.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Data matrix collecting samples | |
| Expectation: the probability-weighted average of possible values | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Independent components yield a diagonal covariance matrix.
Part I · Study equation
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Quadratic forms, eigenvalues, covariance, and PCA axes
Use one symmetric matrix and a 2D sample cloud to calculate quadratic forms, eigenpairs, trace/determinant identities, covariance symmetry, and principal axes together.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Data matrix collecting samples | |
| Standard deviation or sigmoid notation | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
The quadratic form of a positive-definite matrix appears again.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How far is a vector or error from the origin?
Key idea
The L2 norm sums squared components and takes the square root. Squared norm omits the final square root.
Formula-specific lesson
Quadratic forms, eigenvalues, covariance, and PCA axes
Use one symmetric matrix and a 2D sample cloud to calculate quadratic forms, eigenpairs, trace/determinant identities, covariance symmetry, and principal axes together.
Calculation walkthrough
Calculation steps
- 1
Square each component
Turn both negative and positive components into nonnegative contributions.
- 2
Sum the squares
- 3
Take the square root for a norm
- 4
Distinguish the squared norm
Worked example
Work through the numbers — The 3–4–5 vector
A familiar Pythagorean example.
- 1
Vector
- 2
Sum of squares
- 3
Square root
Result: Thus ||x||₂=5 and ||x||₂²=25.
Sanity check
Checks
- A norm is always nonnegative.
- Confusing a norm with its square changes units and derivative coefficients.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
#4. Orthogonal covariance diagonalization and decorrelation
Part I · Study equation
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Quadratic forms, eigenvalues, covariance, and PCA axes
Use one symmetric matrix and a 2D sample cloud to calculate quadratic forms, eigenpairs, trace/determinant identities, covariance symmetry, and principal axes together.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Total class count or a matrix; check context | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Quadratic forms, eigenvalues, covariance, and PCA axes
Use one symmetric matrix and a 2D sample cloud to calculate quadratic forms, eigenpairs, trace/determinant identities, covariance symmetry, and principal axes together.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Data matrix collecting samples |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Data matrix collecting samples | |
| Expectation: the probability-weighted average of possible values | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
For complex vectors, conjugation is ordinarily included as follows.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
For jointly Gaussian variables, uncorrelated components are jointly independent.
#5. Conditional expectation for jointly Gaussian variables
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Data matrix collecting samples | |
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Data matrix collecting samples | |
| Expectation: the probability-weighted average of possible values | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
#6. An example with M i.i.d. Gaussian vectors
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Data matrix collecting samples |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How plausible is observation x under mean μ and covariance Σ?
Key idea
Calculate a covariance-scaled distance from the mean and a normalization constant to obtain density.
Calculation walkthrough
Calculation steps
- 1
Calculate the difference from the mean
- 2
Adjust distance using variance or covariance
- 3
Calculate exponential decay
- 4
Divide by the normalization constant
Worked example
Work through the numbers — x=1 under a standard normal
A one-dimensional Gaussian with μ=0 and σ=1.
- 1
Standardized distance
- 2
Exponential term
- 3
Normalization
Result: Density at x=1 is approximately 0.242. A density value is not itself an event probability.
Sanity check
Checks
- Σ must be symmetric positive definite for the inverse and positive density to be stably defined.
- Obtain probabilities through interval integration, distinct from pointwise density.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Data matrix collecting samples | |
| Average | |
| Multiply all specified terms | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How plausible is observation x under mean μ and covariance Σ?
Key idea
Calculate a covariance-scaled distance from the mean and a normalization constant to obtain density.
Calculation walkthrough
Calculation steps
- 1
Calculate the difference from the mean
- 2
Adjust distance using variance or covariance
- 3
Calculate exponential decay
- 4
Divide by the normalization constant
Worked example
Work through the numbers — x=1 under a standard normal
A one-dimensional Gaussian with μ=0 and σ=1.
- 1
Standardized distance
- 2
Exponential term
- 3
Normalization
Result: Density at x=1 is approximately 0.242. A density value is not itself an event probability.
Sanity check
Checks
- Σ must be symmetric positive definite for the inverse and positive density to be stably defined.
- Obtain probabilities through interval integration, distinct from pointwise density.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Data matrix collecting samples | |
| Average | |
| Sum over all specified terms | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
The equation above preserves the source notation. Since each density contributes one |C|^{-1/2}, normalization for M independent vectors is corrected as follows.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How plausible is observation x under mean μ and covariance Σ?
Key idea
Calculate a covariance-scaled distance from the mean and a normalization constant to obtain density.
Calculation walkthrough
Calculation steps
- 1
Calculate the difference from the mean
- 2
Adjust distance using variance or covariance
- 3
Calculate exponential decay
- 4
Divide by the normalization constant
Worked example
Work through the numbers — x=1 under a standard normal
A one-dimensional Gaussian with μ=0 and σ=1.
- 1
Standardized distance
- 2
Exponential term
- 3
Normalization
Result: Density at x=1 is approximately 0.242. A density value is not itself an event probability.
Sanity check
Checks
- Σ must be symmetric positive definite for the inverse and positive density to be stably defined.
- Obtain probabilities through interval integration, distinct from pointwise density.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Data matrix collecting samples | |
| Average | |
| Sum over all specified terms | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
The lecture defines its two sample statistics as sums. Notice that the first lacks the 1/M of a conventional sample mean. Here, it is best read as a sum used to derive sufficient statistics.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which event or observation interval's probability is required?
Key idea
Define the event, add mutually exclusive cases, and multiply chained conditions using conditional probabilities.
Calculation walkthrough
Calculation steps
- 1
Translate events and conditions into words
P(A|B) is the probability of A given B.
- 2
Choose a sum rule or product rule
Add mutually exclusive alternatives; multiply sequential conditions.
- 3
Use total probability for the denominator if needed
- 4
Check 0≤P≤1 and total probability 1
Worked example
Work through the numbers — Conditional probability
P(A∩B)=0.15 and P(B)=0.30.
- 1
Apply the definition
- 2
Substitute values
Result: Among cases where B occurs, A occurs half the time.
Sanity check
Checks
- The conditioning event's probability in the denominator must be nonzero.
- Distinguish density p(x) from event probability P(X∈A).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Data matrix collecting samples | |
| Average | |
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which event or observation interval's probability is required?
Key idea
Define the event, add mutually exclusive cases, and multiply chained conditions using conditional probabilities.
Calculation walkthrough
Calculation steps
- 1
Translate events and conditions into words
P(A|B) is the probability of A given B.
- 2
Choose a sum rule or product rule
Add mutually exclusive alternatives; multiply sequential conditions.
- 3
Use total probability for the denominator if needed
- 4
Check 0≤P≤1 and total probability 1
Worked example
Work through the numbers — Conditional probability
P(A∩B)=0.15 and P(B)=0.30.
- 1
Apply the definition
- 2
Substitute values
Result: Among cases where B occurs, A occurs half the time.
Sanity check
Checks
- The conditioning event's probability in the denominator must be nonzero.
- Distinguish density p(x) from event probability P(X∈A).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Data matrix collecting samples | |
| Sum over all specified terms | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How plausible is observation x under mean μ and covariance Σ?
Key idea
Calculate a covariance-scaled distance from the mean and a normalization constant to obtain density.
Calculation walkthrough
Calculation steps
- 1
Calculate the difference from the mean
- 2
Adjust distance using variance or covariance
- 3
Calculate exponential decay
- 4
Divide by the normalization constant
Worked example
Work through the numbers — x=1 under a standard normal
A one-dimensional Gaussian with μ=0 and σ=1.
- 1
Standardized distance
- 2
Exponential term
- 3
Normalization
Result: Density at x=1 is approximately 0.242. A density value is not itself an event probability.
Sanity check
Checks
- Σ must be symmetric positive definite for the inverse and positive density to be stably defined.
- Obtain probabilities through interval integration, distinct from pointwise density.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Data matrix collecting samples | |
| Average | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which event or observation interval's probability is required?
Key idea
Define the event, add mutually exclusive cases, and multiply chained conditions using conditional probabilities.
Calculation walkthrough
Calculation steps
- 1
Translate events and conditions into words
P(A|B) is the probability of A given B.
- 2
Choose a sum rule or product rule
Add mutually exclusive alternatives; multiply sequential conditions.
- 3
Use total probability for the denominator if needed
- 4
Check 0≤P≤1 and total probability 1
Worked example
Work through the numbers — Conditional probability
P(A∩B)=0.15 and P(B)=0.30.
- 1
Apply the definition
- 2
Substitute values
Result: Among cases where B occurs, A occurs half the time.
Sanity check
Checks
- The conditioning event's probability in the denominator must be nonzero.
- Distinguish density p(x) from event probability P(X∈A).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
#7. Two-dimensional discrete random processes
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Average | |
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Average | |
| Expectation: the probability-weighted average of possible values | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
#8. WSS
For a second-order random process, shift-invariant mean and covariance define wide-sense stationarity.
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Average |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
The WSS properties are listed in full.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Where does the average tend after many repetitions of the same experiment?
Key idea
Multiply each outcome by its probability and sum. For continuous variables, integrate instead.
Calculation walkthrough
Calculation steps
- 1
Pair possible values with their probabilities
- 2
Multiply each value by its probability
- 3
Add all terms
- 4
Check that probabilities sum to one
Worked example
Work through the numbers — Mean of a discrete random variable
X takes 1,2,3 with probabilities 0.2,0.5,0.3 respectively.
- 1
Weighted values
- 2
Sum
Result: E[X]=2.1. It need not be an observable outcome itself.
Sanity check
Checks
- Probabilities or densities must be normalized.
- E[g(X)] generally differs from g(E[X]).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Expectation: the probability-weighted average of possible values |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Average |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How widely does a random variable spread around its mean?
Key idea
Subtract the mean from each value, square, and take the probability-weighted average.
Calculation walkthrough
Calculation steps
- 1
Calculate the mean
- 2
Calculate deviations from the mean
- 3
Square the deviations
- 4
Take the expectation
Worked example
Work through the numbers — X∈{1,2,3} with probabilities {0.2,0.5,0.3}
Use mean μ=2.1 from the preceding example.
- 1
Squared deviations
- 2
Probability-weighted sum
Result: Variance is 0.49 and standard deviation is √0.49=0.7.
Sanity check
Checks
- Variance cannot be negative.
- Standard deviation shares the variable's units; variance has squared units.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How widely does a random variable spread around its mean?
Key idea
Subtract the mean from each value, square, and take the probability-weighted average.
Calculation walkthrough
Calculation steps
- 1
Calculate the mean
- 2
Calculate deviations from the mean
- 3
Square the deviations
- 4
Take the expectation
Worked example
Work through the numbers — X∈{1,2,3} with probabilities {0.2,0.5,0.3}
Use mean μ=2.1 from the preceding example.
- 1
Squared deviations
- 2
Probability-weighted sum
Result: Variance is 0.49 and standard deviation is √0.49=0.7.
Sanity check
Checks
- Variance cannot be negative.
- Standard deviation shares the variable's units; variance has squared units.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Average |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation Core explanation
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Reference-quality follow-up
Explore this calculation further
#9. Two-dimensional power spectral density
The power spectrum is the DSFT of autocorrelation, rather than a directly defined DSFT of the WSS process itself.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
Which event or observation interval's probability is required?
Key idea
Define the event, add mutually exclusive cases, and multiply chained conditions using conditional probabilities.
Calculation walkthrough
Calculation steps
- 1
Translate events and conditions into words
P(A|B) is the probability of A given B.
- 2
Choose a sum rule or product rule
Add mutually exclusive alternatives; multiply sequential conditions.
- 3
Use total probability for the denominator if needed
- 4
Check 0≤P≤1 and total probability 1
Worked example
Work through the numbers — Conditional probability
P(A∩B)=0.15 and P(B)=0.30.
- 1
Apply the definition
- 2
Substitute values
Result: Among cases where B occurs, A occurs half the time.
Sanity check
Checks
- The conditioning event's probability in the denominator must be nonzero.
- Distinguish density p(x) from event probability P(X∈A).
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Average | |
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
This relationship is the core of the Wiener–Khinchin theorem.
#9.1 A zero-mean WSS white process
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How widely does a random variable spread around its mean?
Key idea
Subtract the mean from each value, square, and take the probability-weighted average.
Calculation walkthrough
Calculation steps
- 1
Calculate the mean
- 2
Calculate deviations from the mean
- 3
Square the deviations
- 4
Take the expectation
Worked example
Work through the numbers — X∈{1,2,3} with probabilities {0.2,0.5,0.3}
Use mean μ=2.1 from the preceding example.
- 1
Squared deviations
- 2
Probability-weighted sum
Result: Variance is 0.49 and standard deviation is √0.49=0.7.
Sanity check
Checks
- Variance cannot be negative.
- Standard deviation shares the variable's units; variance has squared units.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Standard deviation or sigmoid notation | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How widely does a random variable spread around its mean?
Key idea
Subtract the mean from each value, square, and take the probability-weighted average.
Calculation walkthrough
Calculation steps
- 1
Calculate the mean
- 2
Calculate deviations from the mean
- 3
Square the deviations
- 4
Take the expectation
Worked example
Work through the numbers — X∈{1,2,3} with probabilities {0.2,0.5,0.3}
Use mean μ=2.1 from the preceding example.
- 1
Squared deviations
- 2
Probability-weighted sum
Result: Variance is 0.49 and standard deviation is √0.49=0.7.
Sanity check
Checks
- Variance cannot be negative.
- Standard deviation shares the variable's units; variance has squared units.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Average | |
| Standard deviation or sigmoid notation |
Reference-quality follow-up
Explore this calculation further
#9.2 Nonzero mean
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How widely does a random variable spread around its mean?
Key idea
Subtract the mean from each value, square, and take the probability-weighted average.
Calculation walkthrough
Calculation steps
- 1
Calculate the mean
- 2
Calculate deviations from the mean
- 3
Square the deviations
- 4
Take the expectation
Worked example
Work through the numbers — X∈{1,2,3} with probabilities {0.2,0.5,0.3}
Use mean μ=2.1 from the preceding example.
- 1
Squared deviations
- 2
Probability-weighted sum
Result: Variance is 0.49 and standard deviation is √0.49=0.7.
Sanity check
Checks
- Variance cannot be negative.
- Standard deviation shares the variable's units; variance has squared units.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Standard deviation or sigmoid notation | |
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How widely does a random variable spread around its mean?
Key idea
Subtract the mean from each value, square, and take the probability-weighted average.
Calculation walkthrough
Calculation steps
- 1
Calculate the mean
- 2
Calculate deviations from the mean
- 3
Square the deviations
- 4
Take the expectation
Worked example
Work through the numbers — X∈{1,2,3} with probabilities {0.2,0.5,0.3}
Use mean μ=2.1 from the preceding example.
- 1
Squared deviations
- 2
Probability-weighted sum
Result: Variance is 0.49 and standard deviation is √0.49=0.7.
Sanity check
Checks
- Variance cannot be negative.
- Standard deviation shares the variable's units; variance has squared units.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Average | |
| Standard deviation or sigmoid notation |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How plausible is observation x under mean μ and covariance Σ?
Key idea
Calculate a covariance-scaled distance from the mean and a normalization constant to obtain density.
Calculation walkthrough
Calculation steps
- 1
Calculate the difference from the mean
- 2
Adjust distance using variance or covariance
- 3
Calculate exponential decay
- 4
Divide by the normalization constant
Worked example
Work through the numbers — x=1 under a standard normal
A one-dimensional Gaussian with μ=0 and σ=1.
- 1
Standardized distance
- 2
Exponential term
- 3
Normalization
Result: Density at x=1 is approximately 0.242. A density value is not itself an event probability.
Sanity check
Checks
- Σ must be symmetric positive definite for the inverse and positive density to be stably defined.
- Obtain probabilities through interval integration, distinct from pointwise density.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Average | |
| Standard deviation or sigmoid notation | |
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
#10. Implementation perspective in 2026
Frequency analysis remains a direct tool for two-dimensional images. As of the source’s August 2026 update, PyTorch 2.13’s torch.fft.fft2 provides the 2D DFT, and its documentation notes Hermitian symmetry in Fourier representations of real signals.
WSS does not assert that a real finite image is a perfectly stationary finite object. As the lecture notes, it models a finite image as part of an observed infinite WSS process.
#Part 1.7: Losses, Gradient Descent, Minibatches, and Generalization
#1. Minimize expected loss
In statistical machine learning, model D maps input x to prediction D(x), and a loss measures its discrepancy from target y.
Versions of the lecture number this equation (4) or (5). This series tracks the equation itself, rather than relying on numbering alone.
Part I · Study equation
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
gradient field·step size·mini-batch update
Run gradient descent on a 2D positive-definite quadratic, inspect the stable step-size bound, and calculate minibatch sums of sample gradients in the same view.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Target or observation vector | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
#2. Approximate expectations with finite-sample averages
The true joint data distribution is usually unknown. Training samples (\mathbf{x}_l,\mathbf{y}_l) approximate expected loss through an empirical average.
Part I · Study equation
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
gradient field·step size·mini-batch update
Run gradient descent on a 2D positive-definite quadratic, inspect the stable step-size bound, and calculate minibatch sums of sample gradients in the same view.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Target or observation vector | |
| Sum over all specified terms | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
The March 19, 2025 version presents the right side as ?? for students to complete. The expression above is completed using the earlier version and surrounding context.
#3. MSE example
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How far are predictions from targets on average?
Key idea
Subtract targets from predictions, square each residual, and divide by sample count. Larger errors receive greater penalties.
Formula-specific lesson
gradient field·step size·mini-batch update
Run gradient descent on a 2D positive-definite quadratic, inspect the stable step-size bound, and calculate minibatch sums of sample gradients in the same view.
Calculation walkthrough
Calculation steps
- 1
Calculate predictions
For linear regression, predictions are Xw or wᵀx.
- 2
Calculate residuals
- 3
Square the residuals
Remove signs and emphasize larger errors.
- 4
Sum and divide by sample count
Worked example
Work through the numbers — MSE for two samples
Compare predictions and targets directly.
- 1
Targets and predictions
- 2
Residual
- 3
Square
- 4
Average
Result: MSE is 5. The second sample's error of 3 substantially increases it.
Sanity check
Checks
- Check whether the expression divides by sample count or is merely a sum of squares.
- MSE has squared output units.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Target or observation vector | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included
The question this equation answers
How far is a vector or error from the origin?
Key idea
The L2 norm sums squared components and takes the square root. Squared norm omits the final square root.
Calculation walkthrough
Calculation steps
- 1
Square each component
Turn both negative and positive components into nonnegative contributions.
- 2
Sum the squares
- 3
Take the square root for a norm
- 4
Distinguish the squared norm
Worked example
Work through the numbers — The 3–4–5 vector
A familiar Pythagorean example.
- 1
Vector
- 2
Sum of squares
- 3
Square root
Result: Thus ||x||₂=5 and ||x||₂²=25.
Sanity check
Checks
- A norm is always nonnegative.
- Confusing a norm with its square changes units and derivative coefficients.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
#4. Gradient
The gradient of f:\mathbb{R}^N\to\mathbb{R} points toward steepest increase and is perpendicular to level curves.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Formula-specific lesson
gradient field·step size·mini-batch update
Run gradient descent on a 2D positive-definite quadratic, inspect the stable step-size bound, and calculate minibatch sums of sample gradients in the same view.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| A gradient collecting derivatives in each variable direction | |
| Partial derivative with respect to a particular variable |
Reference-quality follow-up
Explore this calculation further
#5. Conditions for a local minimum
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Formula-specific lesson
gradient field·step size·mini-batch update
Run gradient descent on a 2D positive-definite quadratic, inspect the stable step-size bound, and calculate minibatch sums of sample gradients in the same view.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| A gradient collecting derivatives in each variable direction |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Formula-specific lesson
gradient field·step size·mini-batch update
Run gradient descent on a 2D positive-definite quadratic, inspect the stable step-size bound, and calculate minibatch sums of sample gradients in the same view.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Target or observation vector | |
| A gradient collecting derivatives in each variable direction |
Reference-quality follow-up
Explore this calculation further
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Formula-specific lesson
gradient field·step size·mini-batch update
Run gradient descent on a 2D positive-definite quadratic, inspect the stable step-size bound, and calculate minibatch sums of sample gradients in the same view.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| A gradient collecting derivatives in each variable direction | |
| Partial derivative with respect to a particular variable |
Reference-quality follow-up
Explore this calculation further
#6. Gradient descent
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Where should parameters move next to reduce loss?
Key idea
Calculate the gradient at current parameters, multiply by the learning rate, and subtract to obtain new parameters.
Formula-specific lesson
gradient field·step size·mini-batch update
Run gradient descent on a 2D positive-definite quadratic, inspect the stable step-size bound, and calculate minibatch sums of sample gradients in the same view.
Calculation walkthrough
Calculation steps
- 1
Calculate the current loss gradient
- 2
Determine the step size
- 3
Move opposite the direction of increase
- 4
Check the new loss and repeat
Too large a learning rate can diverge; too small is very slow.
Worked example
Work through the numbers — One update
f(w)=(w-3)², current w=5, and learning rate α=0.1.
- 1
Gradient
- 2
Step size
- 3
Update
- 4
Compare losses
Result: One step reduces loss from 4 to 2.56.
Sanity check
Checks
- Check for the minus sign.
- Recording loss before and after updates alongside gradient norm helps detect divergence early.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learning rate, mixture coefficient, or dual coefficient | |
| A gradient collecting derivatives in each variable direction |
Reference-quality follow-up
Explore this calculation further
A learning rate \alpha that is too small slows convergence; one that is too large can cause divergence.
Computing each gradient from the full dataset is expensive for large L. The MSE example requires the following gradient across every sample.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Formula-specific lesson
gradient field·step size·mini-batch update
Run gradient descent on a 2D positive-definite quadratic, inspect the stable step-size bound, and calculate minibatch sums of sample gradients in the same view.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Target or observation vector | |
| A gradient collecting derivatives in each variable direction | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
#7. Stochastic minibatch gradient descent
First shuffle sample indices randomly and divide them into batches of size B.
Part I · Study equation
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
gradient field·step size·mini-batch update
Run gradient descent on a 2D positive-definite quadratic, inspect the stable step-size bound, and calculate minibatch sums of sample gradients in the same view.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
Update for each batch as follows.
Part I · Study equation
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Formula-specific lesson
gradient field·step size·mini-batch update
Run gradient descent on a 2D positive-definite quadratic, inspect the stable step-size bound, and calculate minibatch sums of sample gradients in the same view.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learning rate, mixture coefficient, or dual coefficient | |
| A gradient collecting derivatives in each variable direction | |
| Sum over all specified terms | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
The lecture defines total empirical loss by this sum.
Part I · Study equation
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
gradient field·step size·mini-batch update
Run gradient descent on a 2D positive-definite quadratic, inspect the stable step-size bound, and calculate minibatch sums of sample gradients in the same view.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Sum over all specified terms | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
#8. The batch-size debate
The lecture introduces Keskar and colleagues’ ICLR 2017 findings: an empirical observation that large batches can approach sharper minimizers and generalize worse.
However, “sharp minima always generalize poorly” is not a theorem. A 2017 response already showed reparameterizations changing sharpness without changing the function, and 2025 research also reported sharp minima that generalize well.
A more careful 2026 reading is:
- Evaluate batch size together with gradient noise, throughput, memory, and learning-rate schedules.
- Sharpness is one useful diagnostic but can depend on parameterization.
- Large-scale training jointly optimizes hardware utilization and optimization stability, rather than assuming smaller batches are always better.
#9. Connecting MIDAS research topics to the lecture
The lecture closes with examples of MIDAS Lab’s research directions.
- Self-supervised and unsupervised learning
- Iterative AI and iterative neural networks
- Multimodal analysis
- Nonconvex optimization
- Compressed sensing
- X-ray CT, MRI, PET, SPECT
- Camera imaging, 3D reconstruction, and super-resolution
- Vision-based autonomous systems
- Digital healthcare
The first version presents improved RMSE in self-supervised regression for low-dose CT alongside neural view synthesis and NeRF-family examples. Read these as connections between foundational mathematics and actual research.
#10. 2026 update: large-scale training in practice
The lecture’s SGD equations remain a starting point, with many systems techniques layered above them in large-scale training.
#10.1 Optimizer
AdamW, which decouples weight decay from gradient updates, is widely used. The source’s PyTorch 2.13 discussion includes Muon alongside AdamW in the official optimizer API.
#10.2 Mixed precision
The source describes NVIDIA Transformer Engine 2.16 as supporting FP8 on Hopper, Ada, and Blackwell, with MXFP8 and NVFP4 also documented for Blackwell. Modern training therefore combines mathematical gradient descent, low-precision numerical representations, and scale management.
#10.3 Compilation and distributed training
PyTorch 2.13 provides torch.compile, FSDP/FSDP2, tensor parallelism, and distributed checkpoints in one ecosystem.
#11. Reconnecting Chapter 1 in one line
Represent data as vectors and matrices → Model it probabilistically → Construct functions with neural networks → Define losses → Differentiate to obtain gradients → Optimize repeatedly with minibatches → Validate generalization.
This progression is the core of Chapter 1.