I have the following matrix $$S= \begin{bmatrix} -1 & 1 & 0\\ -1 & 1 & 1\\ 1 &-1& -1\\ 0 &0 & 1 \end{bmatrix} $$
I wish to find a non-negative, non-zero, integer-valued $\vec x$ such that it is a solution to $S\vec x = 0$. How can I do this?
I have the following matrix $$S= \begin{bmatrix} -1 & 1 & 0\\ -1 & 1 & 1\\ 1 &-1& -1\\ 0 &0 & 1 \end{bmatrix} $$
I wish to find a non-negative, non-zero, integer-valued $\vec x$ such that it is a solution to $S\vec x = 0$. How can I do this?
We can find this by essentially treating this as a system of linear equations and solve via Gaussian Elimination. We can see that
$$\left[\begin{array}{ccc|c} -1&1&0&0 \\ -1&1&1&0 \\ 1&-1&-1&0 \\ 0&0&1&0 \end{array}\right]$$
$$\xrightarrow{R_2-R_1,R_3+R_1} \left[\begin{array}{ccc|c} -1&1&0&0 \\ 0&0&1&0 \\ 0&0&-1&0 \\ 0&0&1&0 \end{array}\right]$$
$$\implies R_3 : -z = 0 \implies z = 0$$
$$\implies R_1: -x + y = 0 \implies y = x.$$
Hence, our general vector that solves this system can be represented as $$\vec{v} = \left[\begin{array}{c} y \\ y \\ 0 \end{array}\right], y \in \mathbb{R}.$$
Hence, one option could be to set the solution vector to
$$\left[\begin{array}{c} 1 \\ 1 \\ 0 \end{array}\right].$$