Prove that a matrix is positive definite I've never really done any factoring with multiple variables in an equation.  I tried looking around for examples, but couldn't really find a solid one.  Here is the equation I am trying to factor
$$
x_{1}^{2} - 2x_{1}x_{2} + 3x_{2}^{2}
$$
I know I have to use completing the square, but I don't really know how to apply it to this kind of equation.
Edit
This is part of the following linear algebra problem
Is the following $2 \times 2$ matrix positive definite?
$$
\begin{bmatrix} 1 & -1 \\ -1 & 3 \end{bmatrix}
$$
If so, write down the formula for the associated inner product.
I know that $\textbf{x}^{T} K \textbf{x} > 0$, which is where I got the above equation from
$$
\begin{bmatrix} x_{1} & x_{2} \end{bmatrix} \begin{bmatrix} 1 & -1 \\ -1 & 3 \end{bmatrix}\begin{bmatrix} x_{1} \\ x_{2} \end{bmatrix} = x_{1}^{2} - 2x_{1}x_{2} + 3x_{2}^{2}
$$
As you can see from the original question my first thought was to factor the equation into a perfect square to show that it is always greater than 0, but as a user mentioned in an answer the equation is not factorable.
 A: EDIT: It appears the question is really to show that the expression is nonnegative, rather than trying to factor it (see comments below).
Completing the square is the right way to go. You have two terms that are already nonnegative, and one cross term that could be positive or could be negative. You really want to get rid of that cross term, so you notice that
$x_1^2 -2x_1x_2$ looks suspiciously like the familiar $x_1^2 -2x_1x_2 + x_2^2 = (x_1-x_2)^2$. So you can write
$$x_1^2 -2x_1x_2 + 3x_2^2 = (x_1-x_2)^2 - x_2^2 + 3x_2^2 = (x_1-x_2)^2 + 2x_2^2$$
and since this is a sum of nonnegative terms, the whole thing must be nonnegative (and can only be zero if $x_2=0$ and $x_1=x_2$, i.e. $x_1=0$ also.)
As a final note, there are even quicker ways of seeing that your matrix $K$ must be positive definite, for instance by Sylvester's criterion.

Original answer:
I'm a bit confused that you bring up completing the square, since, while this is a useful technique for solving quadratic equations, it is not directly related to factoring multivariate polynomials.
The usual trick to factoring these kinds of expressions is to recognize that if it factors, it does so into two terms of the form
$$(x_1+ax_2)(x_1+bx_2)$$
for some unknown coefficients $a,b$. If you expand out this product and equate coefficients, you will get a system of two equations which you can solve for $a$ and $b$.
However in your particular case, the polynomial doesn't factor (at least not into factors with real coefficients) and if you try the above you will get complex values for $a$ and $b$.
