In this section the working equations for the transformation between Z-matrix and cartesian coordinates are given and the gradients are derived. It will be assumed that the corner case of an undefined coordinate system as discussed in the previous section and shown in Figure does not appear. Again we follow the Self-Normalizing Natural Extension Reference Frame (SN-NeRF) because of its mathematical elegance for the derivation. The section will heavily rely on tensor formulation. This might seem hyperbolic for the transformation functions but it is necessary for deriving the gradients. A further advantage of the tensor formulation lies in the similarity between derived equations and the actual implementation using vectorized calls.