\begin{pmatrix} 1&0&0&0&0\\ 0&1&0&0&0\\ 0&0&1&0&0\\ 0&0&0&1&0\\ 0&0&0&0&1\end{pmatrix} is an example. But I don't find another one. There also should be entries other than 0 or 1.
Is there a systematic way to do this?
\begin{pmatrix} 1&0&0&0&0\\ 0&1&0&0&0\\ 0&0&1&0&0\\ 0&0&0&1&0\\ 0&0&0&0&1\end{pmatrix} is an example. But I don't find another one. There also should be entries other than 0 or 1.
Is there a systematic way to do this?
Take any invertible matrix $A$ (so just about any matrix unless you're unlucky) and compute $A^TA$.
It is easy to check that $(A^TA)^T=A^T(A^T)^T=A^TA$ (symetric), and for all $x$
$x^T(A^TA)x = (x^T A^T)(Ax)= (Ax)^T(Ax) = (Ax) \cdot (Ax) = \|Ax\|^2\geq 0$ (positive).
Plus since $A$ is invertible, this is equal to $0$ if and only if $x=0$. (definite)
Therefore $A^TA$ is symmetric definite positive.
Yes. Choose any 5 strictly positive numbers and form a diagonal matrix $\Lambda$.
Now take any orthogonal $5 \times 5$ matrix $U$, and form the product $A=U \Lambda U^T$. It is straightforward to check that $A>0$ and $A^T = A$.
(Note that for any $A$ satisfying $A>0$ and $A=A^T$, then it can be written in the form $A=U \Lambda U^T$.)
Replace all non-diagonal entries symmetrically and randomly with numbers whose absolute values are smaller than $\frac14$. By Gershgorin circle theorem, all eigenvalues of the result random matrix will fall inside a circle of radius smaller than $1$ centered at $1$. Since the eigenvalues of a real symmetric matrix are real, the eigenvalues will be all positive. i.e. Any random matrix generated in this manner will be positive definite.
Yet another way, particularly useful for generating SPD matrices with constant diagonal entries, is to take $A=\alpha I+B$, where $\alpha > 0$ and $B$ is any symmetric matrix with $\rho(B)=\|B\|<\alpha$ (can be done simply by taking an arbitrary symmetric matrix and scaling it such that the inequality holds).