Method for operating a robot for positioning a tool in a target pose, wherein the robot comprises a robot foot and a movable robot arm attached thereto on the distal end of which a robot flange is arranged, on which the tool is held, with the method steps - specification of an axis of the tool , - specification of a Cartesian reference coordinate system originating on the robot foot , - specification of a Cartesian target coordinate system {r} originating on a point of the tool , a z-axis corresponding to the axis of the tool and an x-axis and a y-axis each with initially indeterminate orientations, - specification of 3D spatial coordinates of the point of the tool and an orientation of the axis , expressed in each case in the reference coordinate system , as part of the target pose for the tool , characterised in that the method has the following steps - calculation of the orientations of the x-axis and the y-axis of the target coordinate system {r} expressed in the reference coordinate system by - a first cross product of the specified orientation of the axis and a direction vector, which is not parallel thereto, of a coordinate axis ( x 0 , y 0 , z 0 ) of the reference coordinate system , and - a second cross product of a result of the first cross product and the specified orientation of the axis expressed in the reference coordinate system , - creation of a 4x4 matrix, which defines a pose 0 H r of the target coordinate system {r} with reference to the reference coordinate system from the orientations of the coordinate axes ( 0 x r , 0 y r , 0 z r ) of the target coordinate system {r} expressed in each case in the reference coordinate system and 3D spatial coordinates ( 0 t r ) of the point of the tool and from an additional 1x4 line vector. - specification of an axis of the tool , - specification of a Cartesian reference coordinate system originating on the robot foot , - specification of a Cartesian target coordinate system {r} originating on a point of the tool , a z-axis corresponding to the axis of the tool and an x-axis and a y-axis each with initially indeterminate orientations, - specification of 3D spatial coordinates of the point of the tool and an orientation of the axis , expressed in each case in the reference coordinate system , as part of the target pose for the tool , characterised in that the method has the following steps - calculation of the orientations of the x-axis and the y-axis of the target coordinate system {r} expressed in the reference coordinate system by - a first cross product of the specified orientation of the axis and a direction vector, which is not parallel thereto, of a coordinate axis ( x 0 , y 0 , z 0 ) of the reference coordinate system , and - a second cross product of a result of the first cross product and the specified orientation of the axis expressed in the reference coordinate system , - a first cross product of the specified orientation of the axis and a direction vector, which is not parallel thereto, of a coordinate axis ( x 0 , y 0 , z 0 ) of the reference coordinate system , and - a second cross product of a result of the first cross product and the specified orientation of the axis expressed in the reference coordinate system , - creation of a 4x4 matrix, which defines a pose 0 H r of the target coordinate system {r} with reference to the reference coordinate system from the orientations of the coordinate axes ( 0 x r , 0 y r , 0 z r ) of the target coordinate system {r} expressed in each case in the reference coordinate system and 3D spatial coordinates ( 0 t r ) of the point of the tool and from an additional 1x4 line vector. <EOS>