I want to map from $\mathbb{R}^m$ (for $m=n\cdot (n+1) / 2$, however, if another $m$ is necessary, that would also be ok) to symmetric positive (semi-)definite matrices.
I know that I can obtain a random positive semi-definite matrix by multiplying a random matrix by its transpose. However, I assume that there are positive semi-definite matrices that cannot be produced by this procedure. That is why I am looking for a subjective mapping to the space of symmetric positive (semi-)definite matrices of a given size.
I am aware that one could use a recursive function that checks whether the input is a symmetric positive (semi-)definite matrix and, if it is not tries some pseudo-random number in order to just check again until it finds one that is a symmetric positive (semi-)definite matrix. However, I want to find a "nice" mapping that can produce all symmetric positive (semi-)definite matrices and is also a.e. differentiable.
Define $l:\mathbb{R}^{{1 \over 2}n (n+1)} \to \mathbb{R}^{n \times n}$ to be a lower triangular matrix in the obvious way. Then $f(x)=l(x) l(x)^T$ is a surjective map onto the positive semidefinite matrices.