Unit vectors are frequently used in information retrieval and data mining studies because simplify further calculations and analyses.
In the current issue of IR Watch, we show how easy is to convert column vectors into unit vectors with Excel. It is assumed you know how to define spreadsheet arrays in Excel and how to enter formulas in it.
Say we have two vectors in columns A and B each with four elements. To convert these into unit vectors, do this:
1. In cell C1, enter the formula =A1/(SQRT(SUMSQ(A$1:A$4)))
2. Paste content of C1 into cell D1. This creates a modified instance of this formula.
3. Paste content of C1 and D1 cells into remaining empty cells of these columns by selecting these at once. This also creates modified instances of these formulas.
C and D columns represent the unit vectors.
A figure with a step-by-step example is given in IRW (free subscription)
Below is another example, but with the final results.
That was easy!
If you use the first row to label columns, as in this example, be sure to readjust the formulas so these start at cell 2 and run up to cell 5.
If you still have questions on how to do this, email me or subscribe to IRW.