Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

From my question on CV, I need to find a way to make my two vectors orthogonal. They are:

$${\bf{v}} = \pmatrix{1 \\ 1 \\ 1 \\ 1 \\ 1 } \hspace{1.5cm} {\bf{w}} = \pmatrix{0.25 \\ 0.0625 \\ 0 \\ 0.0625 \\ 0.25}$$

What I (think) I need is the step that makes these two vectors orthogonal and I think that will give me my orthogonal regression model.

But how do I do this? It's not Gram-Schmidt is it?

EDIT:

1) Fixed spelling of Gram-Schmidt thanks to the comment.

2) Basically, for my regression model to be orthogonal, I need all the sum of all the linear terms to be 0 and the sum of all the quadratic terms to be 0. The vector ${\bf{w}}$ is all the $x_i^2$ terms in matrix form. What I need is effectively the dot product of ${\bf{v \cdot w' }} = 0$, where ${\bf{w'}}$ is basically ${\bf{w}}$ transformed in some way such that the sum of all these new terms equal $0$. Does that make sense?

share|improve this question
1  
One of these vectors is in $\mathbb{R}^6$ and another is in $\mathbb{R}^5$. Is this really what you meant? –  anorton Jan 11 '13 at 22:36
    
Do you want two orthogonal vectors which form a basis of the subspace generated by the two you have given? –  Mark Bennet Jan 11 '13 at 22:36
    
@anorton Whoops, no, they were both supposed to be in $\mathbb{R}^5$. –  Kaish Jan 11 '13 at 22:38
    
It's not Gramm-Schmidt. It's Gram-Schmidt (assuming you want to take a set of vectors that spans some space and create a new set of orthogonal vectors - typically also normalized - that spans the same space). –  dr jimbob Jan 11 '13 at 22:38
    
@Mark Bennet No, I want the step that makes these two vectors orthogonal, if that either a) makes sense, or b) is possible. –  Kaish Jan 11 '13 at 22:38
show 1 more comment

1 Answer

I'm pretty sure you are looking for Gram-Schmidt.

Let ${\bf v_1 } \equiv {\bf v }$ and ${\bf v_2 } \equiv {\bf w } - (\frac{{\bf v } \cdot {\bf w}}{\bf v \cdot v}) {\bf v}$ if you only want them to be orthogonal to each other.

Note evaluating ${\bf v_1} \cdot {\bf v_2} = {\bf v} \cdot {\bf w} - \frac{{\bf v} \cdot {\bf w}}{{\bf v} \cdot {\bf v}} ({\bf v} \cdot {\bf v}) = 0$. Any vector you could get with $a {\bf v} + b {\bf w}$ for some scalars $a$ and $b$, you can reach with $\alpha {\bf v_1} + \beta {\bf v_2}$ for some scalar $\alpha$ and $\beta$.

Again if two vectors aren't initially orthogonal, you can't do any rotation or change of basis to make them not orthogonal (as orthogonality is independent of choice of basis). You have to fundamentally change the vectors.

share|improve this answer
    
Oh wait, I don't think my question will work then will it? Because it will give me the vector that is orthogonal to ${\bf{v}}$ but not in the form that I need it to put it in my regression model. My model basically has to have some $\sum (x_i^2 + Ax_i + B) = 0$ and I want to work out this $A, B$. –  Kaish Jan 11 '13 at 22:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.