AI Glossary / Computer vision and multimodal AI / Advanced

Scatter matrix

Definition

A scatter matrix summarizes multivariate variation through sums of outer products of centered observation vectors. Under the common unnormalized convention, S=Σ(xᵢ−μ)(xᵢ−μ)ᵀ, where μ is the sample mean. It records variation along individual coordinates and joint variation between coordinates. The centering, weighting and normalization conventions must be stated because related uses of the term can differ.

What it means

A cloud of measurements can spread more in one direction than another. A scatter matrix captures aspects of that shape numerically, making it useful for dimensionality reduction, classification and geometric analysis. It is not a plot of the observations and does not retain their complete distribution. Different datasets can share the same matrix while having different clusters or unusual observations. Understanding the matrix therefore requires both its mathematical convention and the context of the measurements it summarizes.

How it works

Subtract the chosen center from each observation, form the outer product of the resulting vector with itself, then add these matrices. For ordinary mean-centered data, the result is symmetric and positive semidefinite. Dividing by n−1 gives the usual sample covariance matrix when n>1. Within-class scatter instead centers observations around their respective class means; between-class scatter summarizes class-mean differences with suitable class-size weights. The orientation of a data matrix determines whether the corresponding matrix product is XᵀX or XXᵀ, so dimensions should be checked rather than copied mechanically.

Three practical examples

  • A vision researcher summarizes the joint variation of two measured shape features before examining principal directions.
  • A classification exercise compares within-class spread with separation between class means.
  • A data-quality review checks whether one feature's much larger numeric scale dominates a multivariate analysis.

Think of it this way

Imagine a collection of pins on a board. Instead of listing every pin, you describe how broadly they spread horizontally, vertically and along tilted directions. A scatter matrix provides a compact numerical description of that kind. It does not reveal every gap or separate group in the pin arrangement. The analogy explains why the matrix helps describe overall variation while remaining insufficient as a complete portrait of the underlying observations.

Worked example

Consider three original two-dimensional observations: (1,1), (2,2) and (3,3). Their mean is (2,2), giving centered vectors (−1,−1), (0,0) and (1,1). Adding their outer products yields S=[[2,2],[2,2]]. Dividing by n−1=2 gives the sample covariance [[1,1],[1,1]]. The scatter matrix has eigenvalues 4 and 0: all observed variation lies along the direction (1,1), with none along (1,−1). This exact alignment describes these three constructed observations; it does not establish that future measurements will follow the same line or that one coordinate causes the other.

Illustrative case study

A fictional parts-inspection team records width and height measurements for manufactured components. An analysis of their joint scatter reveals a dominant direction, but the team discovers that one column was recorded in millimeters and another in centimeters. After resolving the unit convention, it recomputes the summary and compares production groups separately. The scenario illustrates why a mathematically correct calculation can still mislead when feature representation is inconsistent. It does not claim that standardizing every feature is always appropriate; that decision depends on which physical differences the analysis should preserve.

Common misconceptions and mistakes

A scatter matrix is not a scatterplot matrix, which is a grid of visual plots. Nor is unnormalized scatter numerically identical to covariance. Omitting centering produces a different second-moment quantity. Another mistake is comparing raw scatter across datasets of different sizes without considering its dependence on observation count. Extreme observations can strongly affect the conventional calculation, and near-singularity can make inversion unstable. Finally, zero off-diagonal entries indicate a particular absence of linear cross-variation under the convention, not general statistical independence without additional assumptions.

Business use

Scatter summaries can support feature analysis, inspection and model development when teams document units, centering and normalization. Compare groups using a consistent definition and investigate whether changes reflect process variation, sample size or data preparation. Before using an inverse, check whether there is enough independent information in the features and whether regularization is warranted. Pair the matrix with visual or distributional checks to reveal patterns it compresses away. The practical value comes from making joint variation understandable, not from treating a compact matrix as a complete explanation of a process.

People also ask

Is scatter the same as covariance?

Under the stated convention, sample covariance is scatter divided by n−1.

Can the matrix be singular?

Yes. Dependent features or insufficient observations can prevent full rank.

Why do units matter?

Rescaling a coordinate changes its contributions and cross-products, which can alter the apparent dominant directions.

Check your understanding

Answer: What was the example's scatter matrix? [[2,2],[2,2]].

Why did dividing by 2 produce sample covariance?

Answer: There were three observations, so n−1=2.

What did the zero eigenvalue mean here?

Answer: The constructed centered observations had no variation along the perpendicular direction, not that all possible future observations must behave identically.

Related terms

  • Covariance matrix
  • Principal component analysis
  • outer product
  • within-class scatter
  • between-class scatter
  • feature scaling

Learn next

Compute centered outer products for three two-dimensional points and add them by hand. Rescale one coordinate and repeat. Then compare total scatter with within-group scatter for a labeled example, keeping the centering and normalization conventions explicit throughout the calculation.

  • Labeled example

More in Computer vision and multimodal AI

  • Scale space - Scale space is a framework for representing an image or signal at multiple levels of spatial detail.
  • Scale-space axioms - Scale-space axioms are mathematical requirements used to define what a family of progressively coarser image representations should do.
  • Scanpath - A scanpath is an ordered description of where a person's gaze moves while viewing a stimulus, often represented as a sequence of fixations linked by saccades.
  • Scene text
  • Seam carving - Seam carving is a content-aware image-resizing technique that removes or inserts connected paths of pixels called seams.
  • Segmentation - In computer vision, segmentation divides an image or related visual representation into regions or assigns labels at a fine spatial level, commonly per pixel.

Sources

Northeastern University, CS6220 lecture on clustering evaluation and scatter criteria: https://course.khoury.northeastern.edu/cs6220f16/sec3/assets/slides/cs6220-lecture-10.pdf The three-point calculation, pin-board analogy and inspection case are original educational illustrations. The entry uses an explicitly unnormalized, mean-centered scatter convention; other scatter estimators and normalizations should be identified separately. Vilalta, Stepinski and Achari, An Efficient Approach to External Cluster Assessment, equations 13–14 (centered scatter construction): https://www.uh.edu/nsm/_docs/cosc/technical-reports/2005/05_08.pdf

Previous: Scanpath Next: Scatter plot

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer