General matrix solution for a variant orthogonality condition An $n\times n$ complex matrix $X$ satisfies a constraint looking like a rank deficient version of the orthogonality condition
$$ X^TX = \text{diag}\left(1,\dots,1,0\right), $$
where $X^T$ is the transpose of $X$. 
How can I describe the most general form of $X$? Can it be factorized into some specific parts, or expressed as some constrained SVD?
 A: Let $x_{mn}$ denote the entries of $X$, i.e.
$$
X= \begin{bmatrix}
x_{11} & x_{12} & \cdots & x_{1n} \\
x_{21} & x_{22} & \cdots & x_{2n} \\
\vdots & \vdots & \ddots & \vdots \\
x_{n1} & x_{n2} & \cdots & x_{nn}
\end{bmatrix}.
$$
We may define vectors
$$
X_j=\begin{bmatrix}
x_{1j}\\
\vdots \\
x_{nj}
\end{bmatrix},
$$
in terms of which we have $X=\begin{bmatrix}X_1 & X_2 & \cdots & X_n \end{bmatrix}$ and
$$
X^T=\begin{bmatrix}
X_1^T \\
X_2^T \\
\vdots \\
X_n^T
\end{bmatrix}.
$$
With this notation, we find
$$
X^T X= \begin{bmatrix}
X_1^T X_1 & X_1^TX_2 & \cdots & X_1^TX_n \\
X_2^TX_1 & X_2^T X_2 & \cdots & X_2^T X_n \\
\vdots & \vdots & \ddots & \vdots \\
X_n^TX_1 & X_n^T X_2 & \cdots & X_n^TX_n
\end{bmatrix}.
$$
We can now proceed as in the answer by loup blanc in order to conclude that the set of interest is a holomorphic manifold.
If $X$ was surjective, then $X$ would be bijective, so it would follow from the identity $\det X=\det X^T$ that $X^TX$ was also bijective. Since
$$
X^T X= \mbox{diag}(1,1,\ldots,1,0)
$$
is clearly not bijective, this is a contradiction. We conclude that
$$
\dim \mbox{Ran} X\leqslant n-1,
$$
so it follows that the set $(X_1,\ldots,X_n)$ is not linearly independent. But $(X_1,\ldots,X_{n-1})$ is linearly independent, because
$$
0=a_1X_1+\ldots+a_{n-1}X_{n-1}
$$
implies (after multiplication by $X_j^T$ from the left)
$$
0=a_j.
$$
We conclude that $X_n\in\mbox{span} \{X_1,\ldots,X_{n-1}\}$. But then
$$
X_n=b_1X_1+\ldots+b_{n-1}X_{n-1},
$$
and multiplication by $X_j^T$ from the left ensures that
$$
0=b_j,
$$
so $X_n=0$.
The space of matrices $X$ satisfying your condition is therefore characterized by the $n$ equations $X_n=0$ together with the $\frac{n(n-1)}{2}$ equations
$$
X_j^TX_k=\delta_{jk}\qquad 1\leqslant j\leqslant k\leqslant n-1,
$$
restraining the $n^2$ variables
$$
(X_1,\ldots,X_{n}).
$$
Here
$$
\delta_{jk}=\begin{cases} 1,&\mbox{ if }j=k,\\
0,&\mbox{ if }j\neq k.
\end{cases}
$$
In order to describe this set, it suffices to describe the set of $n(n-1)$ variables
$$
(X_1,\ldots,X_{n-1}).
$$
restrained by the $\frac{n(n-1)}{2}$ equations
$$
X_j^TX_k=\delta_{jk}\qquad 1\leqslant j\leqslant k\leqslant n-1.
$$
If we define, for $1\leqslant j\leqslant k\leqslant n-1$, $f_{jk}(X_1,\ldots,X_{n})=X_j^TX_k$, put
$$
f(X_1,\ldots,X_{n-1})=(X_j^TX_k)_{1\leqslant j\leqslant k\leqslant n-1},
$$
and set
$$
\delta=(\delta_{jk})_{1\leqslant j\leqslant k\leqslant n-1}
$$
then our set becomes the level set $f^{-1}(\{\delta\})$. The Jacobian of $f$ is given by
$$
(D_{(X_1,\ldots,X_{n-1})}f)(Y_1,\ldots,Y_{n-1})=(X_j^TY_k+Y_j^TX_k)_{1\leqslant j\leqslant k\leqslant n-1}.
$$
By considering vectors of the form
$$
(Y_1,\ldots,Y_{n-1})=(a_{11}X_1,\sum_{j=1}^{2}a_{j2}X_j,\ldots,\sum_{j=1}^{n-1}a_{j,n-1}X_{j}),
$$
for which we find
$$
(D_{(X_1,\ldots,X_{n-1})}f)(Y_1,\ldots,Y_{n-1})=(a_{jk})_{1\leqslant j\leqslant k\leqslant n-1},
$$
it is visible that the Jacobian is always surjective, such that the holomorphic implicit function theorem ensures that $f^{-1}(\delta)$ is a holomorphic complex manifold of dimension $\frac{n(n-1)}{2}$.
A: I use the @ user161825 's notation.
Proposition 1. $X_n=0$ and $\{X_1,\cdots,X_{n-1}\}$ is a free system.
Proof. Clearly $rank(X)=n-1$ and it remains to show that $X_n=0$. Note that $\{X_1,\cdots,X_n\}$ is not free.
Case 1. $X_n=\sum_{i<n}a_iX_i$; then, for every $j<n$, $0=X_n^TX_j=\sum_{i<n}a_iX_i^TX_j=a_j$; we deduce that $X_n=0$.
Case 2. For example, $X_1=\sum_{1<i<n}a_iX_i$ and $1=X_1^TX_1=\sum_{1<i<n}a_iX_i^TX_1=0$, that is a contradiction. $\square$
The $n(n-1)$ complex parameters $X_1,\cdots,X_{n-1}$ are linked by the algebraic relations $X_i^TX_j=\delta_{ij}$ for $1\leq i\leq j\leq n-1$, that is, $(n-1)(n-2)/2+(n-1)=(n^2-n)/2$ relations. The previous relations are algebraically independent (cf. below); then our considered set $Z$ of complex matrices $X$ is a complex algebraic set of dimension $n(n-1)-(n^2-n)/2=(n^2-n)/2$.
Proposition 2. The dimension of the complex algebraic set $Z$ is $(n^2-n)/2$.
Proof. Let $Y=[Y_1,\cdots,Y_{n-1}]$. Since $Y^TY=I_{n-1}$, the tangent space of $Z$ is the set of $H=[H_1,\cdots,H_{n-1}]$ s.t. $H^TY+Y^TH=0$, that is s.t. $Y^TH$ is skew-symmetric ($Y^TH\in SK_{n-1}$). Note that $SK_{n-1}$ is a complex vector space of dimension $(n-1)(n-2)/2$. We may assume that $Y=[I_{n-1},0_n]^T$ and $Y^TH$ is formed by the first $n-1$ rows of $H$ (there is no conditions about the last row of $H$). Finally, the required dimension is $(n-1)(n-2)/2+(n-1)=(n^2-n)/2$ and we are done.
