The algorithm takes input coordinates for a 2D or 3D point and applies various linear transformations - reflection, scaling, shear, translation, and rotation. For reflections, it calculates the reflected coordinates across lines or planes through different axes. For scaling and translation, it multiplies/adds the input coordinates with scaling/translation factors. For rotation, it uses rotation matrices to calculate the rotated coordinates around different axes. It prints the transformed coordinates after applying each transformation.