CalcWorldHub
Free online calculator · no signup

Two feature principal components calculator

Center two measured features, compute their sample covariance matrix, and find the principal variance directions.

4,000 tools
Two feature principal components calculator — First feature values, Second feature values and calculation method
Two feature principal components calculator: inputs and calculation method.

How to use this calculator

Center two measured features, compute their sample covariance matrix, and find the principal variance directions.

  1. Enter First feature values, Second feature values. Match the units shown beside each field and review the result together with the assumptions below.
  2. Read the worked example below to check the expected input format and result.
  3. Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Calculation guide

Two feature principal components explained

Center two measured features, compute their sample covariance matrix, and find the principal variance directions.

First principal variance5variance
First principal variance: 5 variance in the worked scenario.

A numerical walkthrough

First feature values = 1, 2, 3; Second feature values = 2, 4, 6.

  • First principal variance: 5 variance
  • Second principal variance: 0 variance
  • First explained-variance ratio: 1
  • First axis angle: 63.434949 degrees

The model behind the numbers

Sample covariance eigenanalysis

Center the paired observations, divide the cross-products by n−1 for sample covariance, then use its two eigenvalues as principal variances. No automatic standardization; results therefore depend on feature units.

What to enter

x — First feature values
First feature observations, one value per case. Entry order must match the second-feature list.
y — Second feature values
Second feature observations paired position by position with x; the calculation uses sample covariance and does not standardize unlike units.

Interpreting the result

No automatic standardization; results therefore depend on feature units. At least two paired observations and nonzero total variance are required.

Frequently asked questions

Are principal directions sign unique?

No, reversing a component vector describes the same axis.

Does PCA automatically normalize feature scales?

Not here; preprocess if that is your intended model.

Why use n−1?

The displayed covariance is the sample covariance.

How do I use the Two feature principal components calculator?

Enter First feature values, Second feature values. Match the units shown beside each field and review the result together with the assumptions below.

What is a worked example of Two feature principal components?

First feature values = 1, 2, 3; Second feature values = 2, 4, 6. First principal variance: 5 variance Second principal variance: 0 variance First explained-variance ratio: 1 First axis angle: 63.434949 degrees

Method reference: NIST/SEMATECH e-Handbook: properties of principal components.