Given a dimension $n$ and a vector $v$ such as
n = 5
v = Range[n (n + 1)/2]
Is there any way to automate the construction of the following lower triangular matrix $X$, given arbitrary $n$ and $v$?
X = {{1, 0, 0, 0, 0}, {2, 3, 0, 0, 0}, {4, 5, 6, 0, 0}, {7, 8, 9, 10,
0}, {11, 12, 13, 14, 15}} // MatrixForm
Statistics`Library`VectorToUpperTriangularMatrix
doesn't have a sister function. Could use it +Transpose[]
. $\endgroup$