Quadratic form's transition matrix Quadratic forms's matrix is 
$$A=\begin{bmatrix}
 9 & -2 \\ -2 & 6
\end{bmatrix}$$
First, I have to find it's matrix in relation to some canonical basis. After applying elementary transformations (each transformation is mirrored rows to columns and vice versa) the matrix is
$$A'=\begin{bmatrix}
9 & 0 \\
0 & \frac{50}{9}
\end{bmatrix}$$ 
Using $A'=Q^tAQ$, I should apply the same elementary transformations to a identity matrix and it should end up being $Q$. Unfortunately after multiple tries, my answer is not correct ($A'=Q^tAQ$ equality doesn't hold).
I could use some explanation on this subject.
 A: In this instance, row reducing $A$ is not what you want to be doing. What you should be doing is finding an orthonormal basis of eigenvectors of $A$. Details follow. In this post, I'm only considering real matrices. Some terminology...


*

*A symmetric matrix is a matrix $A$ such that $A = A^t$. Obviously, diagonal matrices are symmetric, so you could think of these as a generalization of diagonal matrices.

*An orthogonal matrix is an invertible matrix $Q$ with $Q^{-1} = Q^t$. It is equivalent to say that columns of $Q$ are an orthonormal basis.


The first thing you should notice about your matrix $A$ is that is symmetric. An important result about symmetric matrices is:

Theorem: If $A$ is a symmetric matrix, then there is an orthogonal matrix $Q$ such that $Q^tAQ$ is diagonal.

OK, so, given $A$, how do you find such a matrix $Q$? Well...


*

*First, find the eigenvalues of $A$. 

*Next, for each eigenvalue $\lambda$, find a basis for the corresponding eigenspace. In other words, find a basis for the null space of $A - \lambda I$.

*If you are lucky, all your eigenspaces are 1-dimensional. In this case, normalize each eigenvector to have length $1$ and make them the columns of $Q$ (they will automatically be orthogonal to each other).

*If you are less lucky, some of your eigenspaces are greater 1-dimensional. Say the space corresponding to $\lambda$ has basis $v_1,\ldots,v_k$ where $k \geq 2$. In this case, you should use the Gramm-Schmidt process to replace $v_1,\ldots,v_k$ by an orthonormal set $u_1,\ldots,u_k$ with the same span. Having ensured that each eigenspace has an orthonormal basis, use them to populate the columns of $Q$. 


Anyway, give this a shot, and let me know how it goes.
