WHY MATHEMATICS?
Why Mathematics? | Direct Orthogonalization for Calibration: Irrelevant Factors, Projection Matrices, Corrected Spectra and Transfer Checks
How a projection removes structured variation judged irrelevant to a calibration target, and how to prove that the cleaner-looking model really transfers.
Why mathematics is important becomes easier to see when a real decision depends on it. This guide follows the mechanism from definitions and dimensions to a worked calculation, validation, practical learning and responsible use. It keeps factual evidence separate from interpretation and treats every illustrative scenario as an example rather than a promise of results.
Choose a reading route
- Understand relevant and irrelevant variation
- Build the orthogonal projection
- Follow correction into PCR or PLS
- Validate new samples, outliers and transfer
Chapter map
- 1. The calibration problem behind the method
- 2. Write X and y with dimensions
- 3. Relevant versus orthogonal subspaces
- 4. Centring sets the geometry
- 5. Finding structured nuisance factors
- 6. Projection onto a nuisance basis
- 7. A two-dimensional worked projection
- 8. Removing several factors
- 9. Corrected spectra and original variables
- 10. Coupling with PCR
- 11. Coupling with PLS
- 12. Selecting projection rank
- 13. Outlier information
- 14. New-sample transformation
- 15. Leakage-safe validation
- 16. Transfer between instruments
- 17. Comparing nearby corrections
- 18. A student learning route
- 19. Parent and teacher guidance
- 20. Deployment and governance
Visit the How Mathematics Works hub for the wider series and its connections to education, reasoning, science, computing, design and careers.
1. The calibration problem behind the method
The useful question is not only how to calculate, but what the calculation assumes. Spectra and dense sensors often contain large structured effects that do not help predict the chosen property. Direct orthogonalization uses linear algebra to estimate such factors and project them out before PCR or PLS calibration.
A concrete situation
Dry powder spectra can vary with scatter or handling while the response is degree of esterification. A regression may otherwise spend latent components following scatter.
What the mathematics does not license
Irrelevant means irrelevant to this target under this sample and model, not meaningless in nature. The same reasoning helps students move from an exercise to a real dataset.
Try it, check it, transfer it
List likely chemical, physical and instrument sources of X variation and mark which could also influence Y. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
2. Write X and y with dimensions
A small example makes the mechanism visible. Let X have n samples as rows and p measured variables as columns; y has n centred response values. Fixing orientation prevents silent transposition errors in projections.
A concrete situation
For 120 samples and 800 wavenumbers, X is 120 by 800. A new spectrum has 800 entries.
What the mathematics does not license
Published and software conventions differ. A formula copied across orientations can remain syntactically plausible but wrong. That distinction matters because a correct formula can still answer the wrong operational question.
Try it, check it, transfer it
Write dimensions for the nuisance scores, loadings, basis and p-by-p projection before computing. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
3. Relevant versus orthogonal subspaces
This is where modelling choices begin to affect evidence. A response-relevant direction changes with y; an orthogonal direction has zero inner product with centred y in sample space. Direct orthogonalization seeks structured X factors on the latter side.
A concrete situation
A baseline offset can dominate spectral variance while having little covariance with concentration.
What the mathematics does not license
Sample orthogonality is not statistical independence and may not persist in future batches. The habit of checking assumptions is one of the practical benefits of learning mathematics.
Try it, check it, transfer it
Create two centred vectors, compute their dot product and explain what zero does and does not mean. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
4. Centring sets the geometry
The central mathematical idea is concrete. Subtract training means before estimating directions. The origin then represents the training centre, and dot products describe variation around it.
A concrete situation
If a large mean spectrum is left in X, the first factor can reflect level rather than sample differences.
What the mathematics does not license
Validation and new samples must use stored training means; recentering a test batch changes the model. The same reasoning helps students move from an exercise to a real dataset.
Try it, check it, transfer it
Verify that training column means are near zero and that single-sample scoring matches batch scoring. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.
5. Finding structured nuisance factors
Here the geometry becomes operational. The method identifies factors in X that describe systematic variation while being irrelevant to the calibration response under its criterion. Scores locate samples; loadings describe the variable pattern.
A concrete situation
A smooth loading across neighbouring wavelengths can suggest baseline or scatter behaviour.
What the mathematics does not license
A smooth shape is interpretable evidence, not proof of a physical cause. That distinction matters because a correct formula can still answer the wrong operational question.
Try it, check it, transfer it
Plot scores against run order and loadings against wavelength, then compare with instrument records. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
6. Projection onto a nuisance basis
This step deserves a careful pause. If columns of B form an orthonormal nuisance basis in variable space, P_perp=I-BBᵀ projects a row vector away from that span. Corrected data are X_corr=XP_perp.
A concrete situation
For one unit vector b, x_corr=x-(x·b)b removes the component of x along b.
What the mathematics does not license
If B is not orthonormal, BBᵀ is not the correct projector without additional matrix terms. The habit of checking assumptions is one of the practical benefits of learning mathematics.
Try it, check it, transfer it
Check BᵀB numerically and verify P_perp is symmetric and approximately idempotent. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
7. A two-dimensional worked projection
The useful question is not only how to calculate, but what the calculation assumes. Take b=(1,1)/sqrt(2) and x=(4,2). The projection along b is (x·b)b=(3,3), so x_corr=(1,-1), orthogonal to b.
A concrete situation
The corrected dot product (1,-1)·(1,1)/sqrt(2)=0.
What the mathematics does not license
This toy chooses the nuisance direction; real data must estimate it without seeing evaluation answers. The same reasoning helps students move from an exercise to a real dataset.
Try it, check it, transfer it
Repeat with x=(5,5) and explain why the corrected vector becomes zero. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
8. Removing several factors
A small example makes the mechanism visible. With several orthonormal columns in B, BBᵀ projects onto their span and I-BBᵀ removes the whole span. Rank controls how much variation is discarded.
A concrete situation
One factor may capture offset; a second may capture slope.
What the mathematics does not license
Extra factors can begin to remove weak target information or fit noise. That distinction matters because a correct formula can still answer the wrong operational question.
Try it, check it, transfer it
Plot external error and basis stability for ranks zero through a defensible maximum. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.
9. Corrected spectra and original variables
This is where modelling choices begin to affect evidence. Projection preserves the p-variable grid, so corrected spectra can still be plotted against wavelength. Each corrected variable is influenced by the whole projection.
A concrete situation
A local peak can change because the removed factor has support across many wavelengths.
What the mathematics does not license
Do not interpret a corrected wavelength as an untouched physical measurement. The habit of checking assumptions is one of the practical benefits of learning mathematics.
Try it, check it, transfer it
Compare raw, removed and corrected curves for representative samples and account for their sum. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
10. Coupling with PCR
The central mathematical idea is concrete. PCR models high-variance directions of corrected X and then regresses y on selected scores. Orthogonalization can stop irrelevant factors from occupying early components.
A concrete situation
A corrected dataset may need fewer principal components for similar prediction.
What the mathematics does not license
PCR still selects directions by X variance, not directly by y relevance. The same reasoning helps students move from an exercise to a real dataset.
Try it, check it, transfer it
Compare PCR before and after correction using the same grouped folds and component search. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
11. Coupling with PLS
Here the geometry becomes operational. PLS seeks covariance with y after correction. Direct orthogonalization and PLS therefore form one pipeline whose stages interact.
A concrete situation
Removing scatter can let an early PLS score align more clearly with the response.
What the mathematics does not license
A more attractive score plot is not enough; external predictions must improve. That distinction matters because a correct formula can still answer the wrong operational question.
Try it, check it, transfer it
Save the complete preprocessing-plus-PLS object and test it on untouched batches. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
12. Selecting projection rank
This step deserves a careful pause. Rank can be chosen through nested validation, prediction performance, factor stability and physical plausibility. Training fit alone rewards excessive removal.
A concrete situation
A one-factor correction may lower external RMSE; three factors may lower calibration error but worsen transfer.
What the mathematics does not license
Repeated inspection of the final test turns it into tuning data. The habit of checking assumptions is one of the practical benefits of learning mathematics.
Try it, check it, transfer it
Use inner folds for rank and regression components, then open the final test once. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.
13. Outlier information
The useful question is not only how to calculate, but what the calculation assumes. Removed scores and projection residuals can expose samples whose nuisance behaviour differs from training. The original paper also discusses outlier identification possibilities.
A concrete situation
An extreme scatter score may indicate unusual particle presentation or an instrument problem.
What the mathematics does not license
An outlier flag does not tell whether the product property is wrong. The same reasoning helps students move from an exercise to a real dataset.
Try it, check it, transfer it
Review raw data, removed score, corrected prediction and laboratory result as separate evidence. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
14. New-sample transformation
A small example makes the mechanism visible. A future spectrum is aligned, centred with training means, multiplied by the stored projection and passed to the stored regression.
A concrete situation
The same sample should receive the same result whether scored alone or with others.
What the mathematics does not license
Any transform requiring future batch means is unsuitable for immediate single-sample prediction. That distinction matters because a correct formula can still answer the wrong operational question.
Try it, check it, transfer it
Write a deterministic scoring contract and unit-test it on archived samples. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
15. Leakage-safe validation
This is where modelling choices begin to affect evidence. Every learned centring, nuisance basis, rank choice and regression parameter belongs inside the training fold. Group splits by batch, instrument or time.
A concrete situation
Holding out an entire campaign tests future-campaign transfer better than random rows.
What the mathematics does not license
Near-duplicate spectra across folds can make a fragile correction look stable. The habit of checking assumptions is one of the practical benefits of learning mathematics.
Try it, check it, transfer it
Draw the nested validation loop and label every fitted quantity. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
16. Transfer between instruments
The central mathematical idea is concrete. A nuisance basis learned on one instrument may not span another instrument’s variation. Direct orthogonalization is not automatically a calibration-transfer guarantee.
A concrete situation
A second spectrometer can introduce wavelength shifts rather than the baseline pattern removed in training.
What the mathematics does not license
Applying the projection may produce numbers while leaving the new effect untouched. The same reasoning helps students move from an exercise to a real dataset.
Try it, check it, transfer it
Test an external instrument and monitor distance to the original nuisance and calibration subspaces. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.
17. Comparing nearby corrections
Here the geometry becomes operational. Derivatives, scatter correction, OSC, direct orthogonalization and external-parameter methods use different information and objectives.
A concrete situation
A measured temperature design supports EPO; response-guided filtering supports OSC; direct orthogonalization estimates irrelevant factors from calibration structure.
What the mathematics does not license
Similar plots do not make the methods interchangeable. That distinction matters because a correct formula can still answer the wrong operational question.
Try it, check it, transfer it
Build a table of information used, projector, new-sample rule, tuning and chief leakage risk. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
18. A student learning route
This step deserves a careful pause. Start with dot products and a 2D projector, then verify symmetry and idempotence before using spectra.
A concrete situation
A spreadsheet can reproduce x-(x·b)b; code can scale to matrices.
What the mathematics does not license
Package output without the projector idea is hard to transfer. The habit of checking assumptions is one of the practical benefits of learning mathematics.
Try it, check it, transfer it
Keep a notebook of dimensions, assumptions, calculations and one failure case. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
19. Parent and teacher guidance
The useful question is not only how to calculate, but what the calculation assumes. Ask why a large pattern can be irrelevant to one response and important to another. Connect the answer to vectors and evidence.
A concrete situation
The topic links school algebra to chemistry, computing and engineering measurement.
What the mathematics does not license
No technique guarantees grades, admission or a career. The same reasoning helps students move from an exercise to a real dataset.
Try it, check it, transfer it
Praise precise language such as “orthogonal in this training sample after centring.” Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
20. Deployment and governance
A small example makes the mechanism visible. Version the raw-data rules, means, nuisance basis, projection, regression, applicability rule and validation evidence.
A concrete situation
Monitor score drift, removed-factor drift, residual bias and instrument changes.
What the mathematics does not license
Automatic refitting can absorb deterioration or redefine useful signal as nuisance. That distinction matters because a correct formula can still answer the wrong operational question.
Try it, check it, transfer it
Require review, rollback criteria and preserved raw data for every update. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.
A seven-day practice lab
- Day 1: define the decision, observation unit, X variables and Y or reference condition.
- Day 2: reproduce the smallest worked example and check every dimension, unit and sign.
- Day 3: build a transparent baseline and write what it assumes.
- Day 4: fit the main method inside a training-only pipeline; record every parameter.
- Day 5: challenge one assumption with a deliberately difficult dataset or operating regime.
- Day 6: compare validation metrics with the practical workload created by errors.
- Day 7: present one supported conclusion, one unresolved uncertainty and one safe next experiment.
Questions for a student, parent or mentor
- Which part of the model is a mathematical definition, and which part is a choice?
- What small calculation would catch a sign, scale or dimension error?
- What evidence comes from training, validation and the untouched test?
- What benign condition could look like a fault or prediction failure?
- How would the answer change for another response, asset, school project or time period?
- What should a human review before acting on the score?
A method-specific audit before deployment
A direct-orthogonalization audit should save the nuisance basis, the projection matrix and the evidence used to label the removed subspace irrelevant. Plot removed scores against batch, instrument, humidity and acquisition order. A strong association can support a physical interpretation, but it does not prove the direction will remain irrelevant to the response in a new campaign. Recheck response association on untouched validation data without changing the filter.
Compare the complete chain—raw preprocessing, direct orthogonalization and regression—with no correction and with physically motivated corrections. Use identical grouped splits and tuning budgets. Report component counts, external error, bias, rejected samples and loading stability. A lower training dimension is useful only when the corrected model transfers. Keep raw spectra and removed components, because a direction irrelevant to one calibration target may matter for another target or an instrument diagnostic.
Reproduce the transform outside the modelling package. For several ordinary and boundary samples, calculate the corrected vector from stored training quantities and confirm that batch scoring matches one-at-a-time scoring. Record the order of alignment, centring, projection and regression. These operations do not generally commute. A deployable method needs an unambiguous new-sample transform, a coverage check and a fallback when the sample lies far outside the calibration evidence.
Frequently asked questions
What is direct orthogonalization?
It is a projection-based calibration preprocessing method designed to remove systematic X variation considered irrelevant to the response.
How is “irrelevant” decided?
It is estimated from the calibration data and method construction. The label is conditional on the response, samples, centring and chosen rank, so external validation remains necessary.
Is the projection the same as deleting wavelengths?
No. The method generally removes directions spanning combinations of variables while retaining the original variable grid.
Can it be fitted before cross-validation?
No when response or calibration structure from held-out observations influences the filter. Fit every learned stage within the training fold.
Does a smaller number of PLS components prove improvement?
No. Simplicity is useful, but transfer error, bias, stability and applicability provide the decisive evidence.
Can removed variation be useful elsewhere?
Yes. It may carry another target, instrument state or fault signal. Preserve raw and removed data for audit and future questions.
Primary source and fact-check note
Claus A. Andersson, “Direct orthogonalization,” Chemometrics and Intelligent Laboratory Systems 47(1), 51–63 (1999), DOI 10.1016/S0169-7439(98)00158-0. Definitions and core claims in this article were checked against this primary publication. Calculations shown here were independently recomputed. Examples are educational illustrations; they are not reported industrial performance results.
Useful next reading
Keep the options open. Mathematics education supports clearer questions, transferable problem-solving skills and informed choices across science, engineering, computing, AI, statistics, design and many other careers. It does not guarantee intelligence, income, admission or employment; those outcomes depend on far more than one subject or model.
Extended laboratory: evidence, transfer and decisions
A reconstruction identity worth checking
For every corrected sample, store or recompute the relation x = x_removed + x_corrected, subject to numerical tolerance and the stated centring convention. This identity catches order-of-operation errors and makes the filter tangible. Plot the norm of each part by sample. An observation dominated by the removed term deserves investigation even when its corrected prediction is ordinary, because it may represent unusual scatter, an instrument event or a condition absent from the calibration design.
Subspace angles rather than signed loadings
Loading vectors can flip sign without changing a subspace, and nearly tied factors can rotate within a stable span. Compare fitted nuisance spaces with principal angles or projection-matrix distances across resamples. This avoids declaring instability merely because a line changed sign. If the subspace itself changes substantially when one batch is removed, the correction is fragile and the claimed irrelevant factors need a narrower interpretation.
Response measurement uncertainty
The response y is often a laboratory measurement with repeatability limits, sampling error and reference-method bias. A factor that appears orthogonal to noisy y may still relate to the underlying property. Compare prediction residuals with replicate laboratory variation and examine whether orthogonalization is chasing response noise. No projection can produce a calibration more certain than the evidence in the reference measurement supports.
Nonlinear nuisance behaviour
A linear projection removes a fixed subspace. Scatter or instrument effects may bend with concentration, wavelength or environmental condition. Several linear factors can approximate that behaviour locally, but increasing rank can also remove target information. Inspect residual nuisance patterns after correction and across the validated range. When structure remains, collect a better experiment or consider a model whose assumptions match the curvature rather than adding factors until training plots look clean.
Did You Know? A projection can be algebraically exact and still answer the wrong scientific question. Validation design decides whether the calculation supports the intended decision.
Applicability after correction
A corrected vector can look close to the calibration centre even when its raw spectrum is unprecedented. Monitor both raw-space and corrected-space coverage. The raw check protects against a new nuisance mechanism; the corrected check protects the regression. If only the corrected view is used, the projection can hide a large unfamiliar component and allow an unjustified prediction. Define which coverage failures cause review, rejection or fallback.
Batch-aware uncertainty
Repeated scans of one specimen do not create the same evidence as independent specimens. Estimate uncertainty and validation error using the independent unit that matches deployment, such as batches, lots or instruments. A row-level confidence interval can be far too narrow when within-batch spectra are similar. Report the number of independent groups, not only the number of spectra, and keep those groups intact during resampling.
A fair baseline ladder
Start with a mean or simple linear baseline, then ordinary PCR or PLS, then physically motivated correction, and finally direct orthogonalization. Use the same outer splits for every rung. This ladder shows whether improvement comes from the new projection or simply from careful scaling and validation. Include training time, new-sample cost and the number of choices tuned, because a tiny error reduction may not justify a fragile operational chain.
Communicating the claim
A defensible statement names the response, population, conditions and evaluation: for example, the correction improved held-out prediction of one property across specified batches and instruments. Avoid saying it removed noise universally. The removed subspace is a model object, not a permanent label on nature. This disciplined phrasing helps students see how mathematical precision improves scientific communication and prevents a local result from becoming an exaggerated promise.
Did You Know? A projection can be algebraically exact and still answer the wrong scientific question. Validation design decides whether the calculation supports the intended decision.
A maintenance scenario
Suppose a spectrometer lamp is replaced and raw scores shift strongly along the old nuisance basis. The correction may still work if the new effect lies in the learned span. If it introduces wavelength-dependent changes outside that span, prediction can fail silently. Run a controlled transfer panel after maintenance, compare raw and corrected coverage, and keep the previous model available until the evidence supports release.
A final pre-publication checklist
Confirm the DOI and source, matrix orientation, centring convention, projector formula, rank-selection procedure, external split and worked arithmetic. Check that every internal link resolves and that examples are labelled illustrative. Review language for causal overreach, guaranteed outcomes and unmeasured uncertainty. This last pass is not cosmetic: it connects mathematical correctness, reader trust and safe use of a calibration model.
Final evidence note 1
When results are reported, separate three statements: the factor is orthogonal to the observed response after training preprocessing; removing it improved a stated external metric; and engineering evidence suggests a nuisance mechanism. These are different levels of evidence. Keeping them separate prevents a mathematical property from becoming a causal story and lets a later reader update one conclusion without discarding the others.
Final evidence note 2
For reproducible teaching, provide the tiny two-dimensional projection before the industrial-scale example. The hand calculation reveals the essence, while the larger case shows why software and validation are needed. Students can then transfer the idea to geometry, regression and signal processing. The aim is not to memorise one chemometric method but to recognise projection as a general tool whose value depends on what the removed subspace represents.