The Data
Point

X2

Y2

A

1

1

B

2

1

C

4

3

D

5

4

How does it work?
The Calculations
Centroid 1


Point

X2

Y2

X1

Y1


A

1

1

1

1


B

2

1

1

1


C

4

3

1

1


D

5

4

1

1


Point

X2

Y2

Centroid 2


A

1

1

2

1


B

2

1

2

1


C

4

3

2

1


D

5

4

2

1

But this format allows us to really clearly see the following mathematical operations:
1) Finding the difference from the centroids 2) Squaring these differences 3) Adding the squares 4) finding the square root.
Step 1

Step 2

Step 3

Step 4


Centroid Points

Centroid

Find the difference

Square the difference

Add the squares

Find the square root


1

1

Centre 1

0

0

0

0

0

0


1

1

Centre 1

1

0

1

0

1

1


1

1

Centre 1

3

2

9

4

13

3.605551275


1

1

Centre 1

4

3

16

9

25

5


2

1

Centre 2

0

0

0

0

0

0


2

1

Centre 2

0

0

0

0

0

0


2

1

Centre 2

2

2

4

4

8

2.828427125


2

1

Centre 2

3

3

9

9

18

4.242640687

When Do New Assignments Form?
Step 2

Compute new centroids (only centroid 2 here)


B

2

1


C

4

3


D

5

4


New centroid is the average

3.6667

2.6666667

Find the square root


Point

X2

Y2

X1

Y1


B

2

1

Centroid 2

3.666667

2.6667

2.357022604


C

4

3

Centroid 2

3.666667

2.6667

0.471404521


D

5

4

Centroid 2

3.666667

2.6667

1.885618083


B

2

1

Centroid 1

1

1

1


C

4

3

Centroid 1

1

1

3.605551275


D

5

4

Centroid 1

1

1

5
