# Difference between XYZPoint and XYZVector

**URL:** <https://root-forum.cern.ch/t/difference-between-xyzpoint-and-xyzvector/44717>\
**Category:** Newbie\
**Created:** [May 4, 2021, 3:08pm UTC](https://root-forum.cern.ch/t/difference-between-xyzpoint-and-xyzvector/44717 "2021-05-04T15:08:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Duque](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/daniel_duque/32/25894_2.png) [@Daniel\_Duque](https://root-forum.cern.ch/u/Daniel_Duque)\
**Post date:** [May 4, 2021, 3:08pm UTC](https://root-forum.cern.ch/t/difference-between-xyzpoint-and-xyzvector/44717/1 "2021-05-04T15:08:41Z")

</div>

What is the difference between an XYZPoint object and an XYZVector object?

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [May 4, 2021, 3:15pm UTC](https://root-forum.cern.ch/t/difference-between-xyzpoint-and-xyzvector/44717/2 "2021-05-04T15:15:13Z")

</div>

Welcome to the ROOT Forum!  
According to [the Point 3D Page](https://root.cern.ch/doc/v614/Point3DPage.html) and [the Vector 3D Page](https://root.cern/doc/master/Vector3DPage.html):  
[ROOT::Math::XYZPoint](https://root.cern.ch/doc/v614/namespaceROOT_1_1Math.html#a842a2d01e05d33873e8deea6ea2a36d8) point based on x,y,z coordinates (cartesian) in double precision  
[ROOT::Math::XYZVector](https://root.cern/doc/master/namespaceROOT_1_1Math.html#a91b80e54b44a65c90d60e5c8ff128746) vector based on x,y,z coordinates (cartesian) in double precision

---

<div class="post-metadata">

**Author:** ![Daniel\_Duque](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/daniel_duque/32/25894_2.png) [@Daniel\_Duque](https://root-forum.cern.ch/u/Daniel_Duque)\
**Post date:** [May 4, 2021, 3:18pm UTC](https://root-forum.cern.ch/t/difference-between-xyzpoint-and-xyzvector/44717/3 "2021-05-04T15:18:33Z")

</div>

Hi, I have looked at those pages, but I don’t understand what the difference is (if any). I just see they both have the same members and functions.

Thanks

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [May 4, 2021, 3:22pm UTC](https://root-forum.cern.ch/t/difference-between-xyzpoint-and-xyzvector/44717/4 "2021-05-04T15:22:52Z")

</div>

The `ROOT::Math::XYZPoint` is a position and `ROOT::Math::XYZVector` a displacement. Maybe @emoneta can give more details…

---

<div class="post-metadata">

**Author:** ![ferhue](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ferhue/32/29462_2.png) [@ferhue](https://root-forum.cern.ch/u/ferhue)\
**Post date:** [May 4, 2021, 9:55pm UTC](https://root-forum.cern.ch/t/difference-between-xyzpoint-and-xyzvector/44717/5 "2021-05-04T21:55:00Z")

</div>

- a XYZVector is a [ROOT: ROOT::Math::DisplacementVector3D\< CoordSystem, Tag \> Class Template Reference](https://root.cern/doc/master/classROOT_1_1Math_1_1DisplacementVector3D.html)
- a XYZPoint is a [ROOT: ROOT::Math::PositionVector3D\< CoordSystem, Tag \> Class Template Reference](https://root.cern/doc/master/classROOT_1_1Math_1_1PositionVector3D.html)

For example, you can add two DisplacementVectors, but you cannot add two PositionVectors, as it does not make sense to ‘add’ two points.

Also, I think that, if you have two coordinate systems, one translated from each other, the PositionVector of a point P is different in each coordinate system, but a DisplacementVector would be exactly the same.
