Choose values for , , , and in the linear transformation's standard matrix. This transformation matrix is applied to both the given polygon and the grid lines in order to determine if the transformation produces an orthogonal grid (the grid under the transformation is represented by the red lines). If the application of the transformation does not produce an orthogonal grid, you can precede the transformation with a rotation so that the result is an orthogonal grid.
 D. Austin, "We Recommend a Singular Value Decomposition," American Mathematical Society Feature Column (blog). (Apr 2, 2014) www.ams.org/samplings/feature-column/fcarc-svd.