If your matrix is **A** (doesn't have to be square, can be nxm) and has rank $r< min(n,m)$, then the null space is $\in \mathbb{R}^{max(n,m)}$ spanned by ${max(n,m)-r}$ orthogonal vectors and is the space orthogonal to the $span$(**A**) $\in \mathbb{R}^{max(n,m)}$ (i.e., the linear combination of the basis/orthogonal vectors that are orthogonal to the r basis vectors of **A**). In the simplest example, if $A=\left[\begin{array}{cc}
 1&0\\
 0&0
 \end{array}\right]
$, then $span(A)=\alpha\left[\begin{array}{c}
 1\\
 0
 \end{array}\right], \alpha \in \mathbb{R}$ and $null(A)=\beta\left[\begin{array}{c}
 0\\
 1
 \end{array}\right], \beta \in \mathbb{R}$

Play around with "null" in base Matlab, or SVD in Python like [in this answer](https://stackoverflow.com/a/5889225/3496060)