How to shear a matrix so that the parallelogram formed by its vectors has right angles. In my lecture today we were told that the area of a parallelogram with sides given by the vectors $v_{1} \,\,v_{2} \in \mathbb{R}^{2}$ is equal to the absolute value of the the determinant on the matrix $A=[v_{1},v_{2}]$.  
we were also told that if you apply a shear transformation to the matrix A to give some new matrix B, this wont affect either the area or the Absolute value of the determinant. 
I suppose my question is, is there a simple formula to shear a 2*2 matrix so that its parallelogram has right angles? So that then you could just use pythagoras to find the length of the column vectors and take their product to find the area, and thus the determinant (or at least its absolute value).
and could you also do this for a 3*3 matrix? finding volume instead of area.
 A: Graham Schmidt process.
Well not exactly Graham-Scmidt.
your matrix is $[v_1, v_2]$ with $v_1, v_2$ as column vectors.
Then $\begin{bmatrix}v_1, v_2\end{bmatrix}\begin{bmatrix} 1&-\frac{v_1\cdot v_2}{v_1\cdot v_1}\\0&1\\ \end{bmatrix}$ will shear your matrix into shape, without changing the determinant.
A: There is a simple algorithm for doing this, which is essentially just row reduction. 
The shearing operations you're talking about are transformations where you add a multiple of one row (or in your case, column, but it doesn't really matter since the determinant is transpose invariant) to another row. 
More generally, you can also reorient your parallelogram, which corresponds to switching the rows of your matrix. Or you can rescale your parallelogram by making a certain side longer/shorter by a factor of $c$. This corresponds to multiplying the corresponding row in your matrix by $c$. You may realize that these two operations, together with your original shear transformation, are precisely the three elementary row operations you can perform on a matrix. 
The determinant of your matrix transforms in known ways under each of these transformations. 


*

*If you shear your parallelogram, i.e. add a multiple of one row to another in the matrix, then your determinant does not change.

*If you reorient your parallelogram, i.e. switch two rows of your matrix, then your determinant changes sign. Of course, the absolute value of your determinant, your volume, does not change by doing this.

*If you scale your paralleogram by a factor of $c$, i.e. multiply a row by a factor of $c$, then your determinant also gets multiplied by $c$.
Using these elementary row operations, every square matrix can be brought into a form which is either:


*

*A form with all zero rows, which corresponds to your parallelogram being degenerate i.e. a rectangle with zero area, which is really just a line. In this case, your determinant (and volume) is just zero.

*The identity matrix, which is just the unit square.
You would have to keep track of all the changes to your determinant as you perform these operations, but since the determinant transforms in a known way, this is simple to do. This is one of the quickest and simplest ways to calculate determinants in general. I've used the term "parallelogram" throughout this discussion, but there's nothing here limiting it to $2$-dimensions. All of this will work without modification for $n\times n$ matrices.
