Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am given a unit vector $e=1/\sqrt{n}(1,1,\ldots,1)'$ and the problem is to construct an $n\times n$ (real) unitary matrix $U$ which will contain $e$ as the last column. I understand that there are infinite number of such $U$ ($n>2$). I wonder if there is a very simple closed form for $U$, i.e., very simple $n-1$ vectors orthogonal to each other and to $e$.

share|cite|improve this question
What you call a real unitary matrix is more usually referred to as an orthogonal matrix. – joriki Dec 7 '11 at 1:00
Have you seen Hadamard matrices? – J. M. Dec 7 '11 at 2:00
@joriki, yes its surely "orthogonal". J.M. I have seen a only few of them :) – Tapu Dec 7 '11 at 2:11
also, you can always extend the given vector to a basis for $R^n$ and then use the gram schmidt process to get what you want. – user12014 Dec 7 '11 at 4:13
up vote 3 down vote accepted

The columns of $$\pmatrix{1&1&1&1&1\cr1&-1&1&1&1\cr1&0&-2&1&1\cr1&0&0&-3&1\cr1&0&0&0&-4\cr}$$ are pairwise orthogonal. If you divide the 1st column by $\sqrt5$, the second by $\sqrt2$, the third by $\sqrt 6$, the fourth by $\sqrt12$, and the fifth by $\sqrt20$, you should get an orthogonal matrix. Then you just have to move the first column to the far right.

This is the case $n=5$, but the pattern should be clear.

share|cite|improve this answer
Wow! Great! I was looking for exactly something like that. Thank you very much. Does this type of matrix has a special name? – Tapu Dec 7 '11 at 2:15
Not that I know of, but, then again, not every matrix is a personal friend of mine. – Gerry Myerson Dec 7 '11 at 2:39
@Tapu: Yes. – J. M. Dec 7 '11 at 2:44
@Tapu: MATLAB has them built-in: gallery('orthog',n,4); for Mathematica, you can use Helmert[n_] := DiagonalMatrix[1/Sqrt[Prepend[Table[j (j + 1), {j, n - 1}], n]]].SparseArray[{{1, j_} -> 1, {i_, j_} /; i > j -> 1, Band[{2, 2}] -> -Range[n - 1]}, {n, n}] – J. M. Dec 7 '11 at 2:51
@J.M. The reference is great (I know the author is a great matrician:)). Thank you. – Tapu Dec 7 '11 at 3:54

Your Answer


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.