 So let's see if we can find an orthogonal basis for a set of vectors. So we'll keep our first vector 3, 1, 1, and we'll replace our second vector with some linear combination of itself and the other basis vectors. Well, so far, the only basis vector we have is 3, 1, 1, so we'll want v2 perpendicular to be a linear combination of 3, 1, 1, and 1, 0, 4. So to solve for v2 perpendicular, we'll take the dot product and by assumption, v2 perpendicular and v1 perpendicular will have a dot product of 0. Meanwhile, the dot product of the other vectors is going to work out to be whatever those numbers are and we'll get the equation 0 equals 11x1 plus 7 and so we find that x1 is equal to negative 711. Substituting that back into our equation for v2 perpendicular gives us our value for the two orthogonal vectors, v1 and v2, and this is our new basis. Now you might notice that this gives us a set of fractions almost immediately and while many of us love fractions and spend our free time thinking about how do we solve 37, 15s plus 28, 36, but five out of four people have problems with fractions. And so if we want to avoid fractions, note that all we actually need is for v2 perpendicular to be a linear combination of the basis vector we're keeping and the basis vector we're replacing where the coefficient of the vector we're replacing is not equal to 0. And so as before, we'll let our first basis vector be the original first vector and we'll let our new basis vector be a linear combination of the basis vectors we're keeping and the basis vector we're replacing. And as before, if we form the dot product with v1 perpendicular, we'll get a nice equation this time in x1 and x2. And so we can parameterize our solutions. x2 is our free variable so we'll let it be equal to for example 11s and that gives us x1 equals minus 7s and so that gives us integer solutions x1 equals negative 7, x2 equals 11, and so v2 perpendicular, substituting these into our formula, will be negative 10, negative 7, 37. And so these two vectors can be used as an orthogonal basis for the vector space spanned by our original two basis vectors. What happens if we have three basis vectors? So let's find the orthogonal basis for the vector space spanned by a set of three vectors. Now we already found that we can replace this vector 104 with negative 1011s, negative 711s, and 3711s. Or we can avoid fractions and replace this vector 104 with negative 10, negative 7, 37. Let's choose to avoid fractions. And so we'll keep our first vector 311, we'll replace our second vector with negative 10, negative 7, 37, and then replace our third vector with something else. And so the only requirement is we're going to replace our third vector with a linear combination of the other basis vectors and the vector that we're replacing. So our new basis vector, and now we need to set up and solve a system of equations. So we can get that system from our dot products. So again if we take our new vector and dot it with v1 perpendicular, we'll get a nice equation. And likewise if we take our new basis vector and dot it with v2 perpendicular, we'll get a new equation. And this gives us a system of equations. And this is already in row reduced form so we can go straight to the parameterization. And so one solution is going to be and we can substitute back into the linear combination that gave us v3 perpendicular and we find our perpendicular vector. Now these are fairly large integers so we might want to reduce them going forward. And so one of the things we note here is that we can actually remove a common factor of 484 from the components of this last vector. Now you might look at that and say, ah these are all obviously divisible by 484. More realistically you might notice that they're all divisible by four and keep removing common factors until you get rid of everything you can. However you do that you find that this third perpendicular vector can be reduced down to negative 4111. And so there is the third vector in our orthogonal basis. Okay so I know that some of you are saying we're kind of being mean to fractions keeping them out of all of our problems and not letting them be solutions. What if we decided we liked fractions? Well as before we'd go through our process and we find our second basis vector to be negative 1011's negative 711's and 3711's. And for our third basis vector we'd want to use linear combination of our basis vectors and v3 not a variable but v3 itself. And so proceeding as before we'll find our dot product and we'll get an equation which we'll be able to solve for x1 is negative 811's. We'll form our second dot product and that gives us an equation that we can solve for x2 and now that we know x1 and x2 we can substitute them in to find v3 perpendicular by our formula. And after all the dot settles we get v3 perpendicular equals negative 869's, 2269's and 269's. And so here is a different orthogonal basis for the same vector space using fractions. And it doesn't matter which method you choose to work either this set of vectors or this set of vectors will work as an orthogonal basis for a vector space. The only difference is how much work you have to put in to getting them.