This question is related to the Symmetrical and skew-symmetrical part of rotation matrix

Let's suppose that we have orthogonal projection matrix $P$ onto subspace generated by a unit vector $v$.


  • What is the simplest method to construct such a vector taking entries of $P$ (without deconstructing $P$ to $vv^T$) where we would be sure that projection of this vector onto $v$ gives a non-zero vector?

(I suspect that the vector made from diagonal entries of $P$ has such property but I can't prove this ... other simple methods should for selected entries of $P$ take into account only basic arithmetic operations like summing or multiplying these entries)

  • Is it also a method of finding such vectors for matrices $P$ of projections onto higher dimension subspaces (for example onto plane) ?

Edit 1
Now I know that my assumption about diagonal entries was false: $ {\begin{bmatrix} \dfrac{1}{2} & -\dfrac{1}{2} \\ -\dfrac{1}{2} & \dfrac{1}{2} \end{bmatrix}}$

Probably there is no such a train of linear operations which can lead for randomly chosen (and from the point of view of formula unknown) that guarantees obtaining a non-zero vector. Algorithm somewhere must have inserted "if" statement. The last hope is in the absolute value operator (it is non linear) but I have not find a formula. It remains only to take any non-zero (but for this we need "if" decision) column of $P=vv^T$ (case 1 dim. subspace) and normalize it to the unit vector.

Edit 2 ( 21 hours after)

Even for a case of dimension 2 is hard to find a solution and to prove that solution is impossible in the general case. Let's say that we want to construct vector from entries of projection matrix $P$

which for $P$ generated by a vector $v=[x \ y]^T$ are $x^2, y^2, xy$


$vv^T= \begin{bmatrix} x^2 & xy \\ xy & y^2 \end{bmatrix}$

what means that the wanted vector has a form in the most general case

$b=[Q_1(x^2, y^2, xy),Q_2(x^2, y^2, xy)]^T$

where $Q_1,Q_2 $ are some polynomials.
In this case we must have assured $xQ_1+yQ_2\neq{0}$ because $v$ and $b$ should not be orthogonal.

For a limited range of possible $x,y$ values it is possible to construct such a vector. Let's assume that $x,y$ are non-negative. In this case we can construct simple vector

$b=\begin{bmatrix} x^2+1 \\ y^2+1 \end{bmatrix}$

which gives $v^Tb = x^3+x + y^3+y > 0$ for any non-negative $x,y$ so the vectors $v$ and $b$ can't be orthogonal and it is assured non-zero projection of vector $b$ onto $v$. Such procedure can be expressed by a single formula

$b=(i^TPi +1)i+(j^TPj +1)j$

however its usage is not universal, it is dependent on the assumed restricted values of $x,y$, (in this case it can be easily extended for any dimension).

(I have described above procedure not to give a solution, because for restricted values of $x,y$ to non-negative numbers even the vector $b=[1,1]^T$ would be enough but to give a hint how the wanted general solution could be presented - this was, I think, unclear here for some users, maybe now it is more explicit what I expect from the solution.)

  • 1
    $\begingroup$ I am not sure if this is the simplest method, but how about solving $(P - I)x = 0$ where $I$ denotes the identity matrix? The set of solutions is the space of eigenvectors to the eigenvalue $1$. Since $P$ is a projection matrix, this is its image. $\endgroup$ – Matthias Klupsch Jul 11 '16 at 8:02
  • $\begingroup$ @Matthias Klupsch Yes, it is not so simple like taking some entries of $P$ and compose with them the wanted vector. Is it my assumption about taking diagonal entries of $P$ true or false ? It has an advantage that it eliminates the case of P with zeros in some columns.. I suppose (it's rather obvious) for projection matrix it is impossible to have all zeros on diagonal.. $\endgroup$ – Widawensen Jul 11 '16 at 8:11
  • 1
    $\begingroup$ No, taking diagonal entries will not work in general. An example where this does not work is $P = \left(\begin{smallmatrix} 2 & -1 \\ 2 & -1 \end{smallmatrix}\right)$. However, you are right that nonzero projection matrices have to have a nonzero diagonal entry since their trace is the dimension of their image. $\endgroup$ – Matthias Klupsch Jul 11 '16 at 8:55
  • $\begingroup$ @MatthiasKlupsch Your $P$ matrix is not a projection, I suppose, because it isn't of the form $vv^T$. .. ? $\endgroup$ – Widawensen Jul 11 '16 at 9:02
  • $\begingroup$ What is a projection for you? For me it's a matrix $P$ with $P^2 = I$. $\endgroup$ – Matthias Klupsch Jul 11 '16 at 9:13

For one dimensional projection the solution is easy, in fact if your matrix $P$ is zero then your vector is $v=0$, now suppose that you have a non zero entries in $P$ say $a_{i,j}$ where $(P=(a_{i,j})_{i,j\leq n})$ so if you put $$ v=\frac{1}{\sqrt{\sum_{k=1}^n a_{k,i}^2}}(a_{1,i}, a_{2,i}, \dots , a_{j,i}, \dots a_{n,i}) $$ you can see that $v$ is a unit vector, and that $v$ answer to your question, in fact we have a 1 dimensional projection so the dimension of $Ran(P)$ is equal to one, that mean that : $$ Ran(P)=\mathbb{R}v $$ where $v$ is any nonzero vector in the range of $P$, but we know that any column in a matrix is the image of the canonical basis.

  • $\begingroup$ Yes, it is true, however it is not the exact answer for the question because you have assumed that we know which column is non-zero, it means we are able to use logic of "if-then type. I constrained solution only to the train of typical linear operations like summation, multiplication, scalar product, transpose etc.. by your formula starting from $P$ matrix we, without checking what are non-zero columns, could generate also zero vector ( or rather not generate because it be would division by 0) $\endgroup$ – Widawensen Jul 11 '16 at 17:24
  • $\begingroup$ I don't understand very well what kind of method you want @Widawensen , because i think that this one is very direct and clear. $\endgroup$ – Hamza Jul 11 '16 at 18:41
  • $\begingroup$ @Widawensen since $\operatorname{tr}P=\|v\|^2=1$, you only need to scan the main diagonal to find a non-zero column, but that doesn’t seem to be the sort of thing you’re looking for. $\endgroup$ – amd Jul 11 '16 at 19:11
  • $\begingroup$ Of course you are right Hamza, maybe it is a little non-standard question because I wanted to impose some restrictions on the method and not to use "If-then" decision when constructing a wanted vector.....example.. Let[s suppose that we would want to calculate sum of diagonal entries of P, we can use always formula $sum=i^TPi+j^TPj+k^TPk.$ - it should be something like this formula. $\endgroup$ – Widawensen Jul 11 '16 at 19:58
  • $\begingroup$ @amd Amd, could you do this by a pure matrix operation not using "if-then" decision ? $\endgroup$ – Widawensen Jul 11 '16 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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