Math & Trig

SUMX2PY2 Formula

SUMX2PY2 returns the sum of the sums of squares of corresponding values in two arrays. For each pair, it calculates x²+y² and adds them together. This appears in statistical distance calculations and in computing measures like the total energy in paired physical measurements.

Syntax

SUMX2PY2(array_x, array_y)
ParameterDescription
array_x Parameter of the SUMX2PY2 function.
array_y Parameter of the SUMX2PY2 function.
Try SUMX2PY2 in Viztab — free, no signup

Examples

Total squared magnitude

Formula
=SUMX2PY2(A2:A4, B2:B4)
If A2:A4 is {1,2,3} and B2:B4 is {4,5,6}, returns (1+16)+(4+25)+(9+36) = 17+29+45 = 91. Sums x²+y² for each pair.

Distance-related metric

Formula
=SUMX2PY2({3,0}, {4,0})
Returns (9+16)+(0+0) = 25. For a single pair this is the squared Euclidean distance from the origin.

Multi-point analysis

Formula
=SUMX2PY2(C2:C10, D2:D10)
Sums x²+y² for 9 data pairs. Useful when computing total variance across two measured dimensions.

Common Errors

#N/A

Arrays must have equal length. Mismatched ranges like A1:A5 and B1:B3 produce #N/A.

#VALUE!

Any non-numeric value in either array will cause this error.

Tips

Think of it as total energy

In physics, x²+y² often represents energy or intensity. SUMX2PY2 gives you the total across all measurement pairs.

Equal-length arrays required

Double-check your ranges are the same size. A common mistake is selecting one extra row in one array.

Use for Euclidean norms

SQRT(SUMX2PY2(...)) gives the combined Euclidean norm of two vectors when treating them as components.

Try SUMX2PY2 in Viztab

Import your data and use SUMX2PY2 with 370+ other formulas. No signup required.

Open Viztab

Related Formulas