## How to use the SUMXMY2 function

**What is the SUMXMY2 function?**

The SUMXMY2 function calculates the sum of squares of differences of corresponding values in two arrays.

**What is the square?**

In mathematics, the square of a number is the result of multiplying the number by itself. Squaring a number is denoted by x^{2}. For example, 5^{2}Â means 5 * 5 = 25.

Squaring a number results in a positive result as negative signs are removed in multiplication. (-5)^{2}Â = 25 Squares grow very rapidly. Already x^{2}Â reaches large values quickly as x increases, higher powers grow even faster.

The square root is the inverse operation of squaring. âˆš25 = 5, since squaring 5 gives 25. Squaring is used in geometry to calculate area of squares, side length squared = area. Squaring is also used when calculating the area of a circle.

For example,Â A = Ï€ rÂ²

A is the area.

r is the radius.

Ï€ is pi.

The graph of y = x2 is a parabola, symmetric about the origin.

Squares appear frequently in equations in physics, math, statistics, and other fields.

**What is the sum of squares of differences of corresponding values in two arrays?**

SUMXMY2 stands for the sum of (x - y)^{2}

or

SUMX2MY2 = âˆ‘Â (x_{1} - y_{1})^{2} + (x_{2} - y_{2})^{2} + ... + (x_{n}Â - y_{n})^{2}

**What is the difference between SUMXMY2 function and SUMX2MY2 function?**

The main difference between the SUMXMY2 and SUMX2MY2 functions in Excel is that the SUMXMY2 calculate the sum of squares of differences of corresponding values in two arrays while the SUMX2MY2 sums the of squares of differences of two arrays.

For example:

Array1 = {1, 3, 5}

Array2 = {2, 4, 6}

SUMXMY2(Array1, Array2) = (1 - 2)^{2} + (3 - 4)^{2} + (5 - 6)^{2} = 3

SUMX2MY2(Array1, Array2) = (1^{2} - 2^{2}) + (3^{2} - 4^{2}) + (5^{2} - 6^{2}) = -3 + (-7) + (-11) = -21

So SUMXMY2 is a direct difference, while SUMX2MY2 differences the squares.

### SUMXMY2 function Syntax

SUMX2MY2(*array_x*, *array_y*)

### SUMXMY2 function Arguments

array_x |
Required. The first array or range of values. |

array_y |
Required. The second array or range of values. |

### SUMXMY2 function example

The image above shows two arrays specified in cells B3:B5 and D3:D5, the first cell range contains 4, 3, and 4 and the second contains 2, 3, and 4.

Formula in cell F3:

(4-2)^{2} + (3-3)^{2} + (4-4)^{2} = 4 + 0 + 0 = 4

### Functions in 'Math and trigonometry' category

The SUMXMY2 function function is one of many functions in the 'Math and trigonometry' category.

## How to comment

How to add a formula to your comment<code>Insert your formula here.</code>

Convert less than and larger than signsUse html character entities instead of less than and larger than signs.

< becomes < and > becomes >

How to add VBA code to your comment[vb 1="vbnet" language=","]

Put your VBA code here.

[/vb]

How to add a picture to your comment:Upload picture to postimage.org or imgur

Paste image link to your comment.

Contact OscarYou can contact me through this contact form