A basis of a vector space \$V\$ is a set of vectors \$B\$ such that every vector \$\vec v \in V\$ can be uniquely written as a linear combination of the vectors in \$B\$. In other words, let \$B = \{\vec b_1, \dots, \vec b_n\}\$ be a basis of some vector space \$V\$. For every possible \$\vec v \in V\$, we can say that
$$\vec v = \lambda_1 \vec b_1 + \lambda_2 \vec b_2 + \cdots + \lambda_n \vec b_n$$
for some unique real numbers \$\lambda_1, \lambda_2, \dots, \lambda_n\$. Note that this requires the vectors in \$B\$ to be linearly independent (i.e., you cannot write a vector in \$B\$ as a linear combination of other vectors in \$B\$).
For example, let \$V = \mathbb R^2\$ i.e. the set of all 2 dimensional vectors. We can see that \$B = \left\{ \begin{pmatrix} 1 \\ 0 \end{pmatrix}, \begin{pmatrix} 0 \\ 1 \end{pmatrix} \right\}\$ is a basis of \$V\$, as any 2 dimensional vector \$\vec v = \begin{pmatrix} x \\ y \end{pmatrix}\$ can be written as
$$\vec v = \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 1 \\ 0 \end{pmatrix}x + \begin{pmatrix} 0 \\ 1 \end{pmatrix}y$$
Furthermore, examine \$B = \left\{ \begin{pmatrix} 1 \\ 1 \end{pmatrix}, \begin{pmatrix} -1 \\ 2 \end{pmatrix} \right\}\$. As the two vectors are linearly independent, they must form a basis of \$\mathbb R^2\$, and so we can write any 2-dimensional vector as a combination of the two. For example,
$$\begin{pmatrix} 2 \\ -10 \end{pmatrix} = -2\begin{pmatrix} 1 \\ 1 \end{pmatrix} + -4\begin{pmatrix} -1 \\ 2 \end{pmatrix}$$
However, note that if we have \$B = \left\{ \begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix}, \begin{pmatrix} 0 \\ 1 \\ 2 \end{pmatrix} \right\}\$, then this does not form a basis for all 3 dimensional vectors. There exists no such \$\lambda_1, \lambda_2\$ such that
$$\begin{pmatrix} 4 \\ 6 \\ 10 \end{pmatrix} = \begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix}\lambda_1 + \begin{pmatrix} 0 \\ 1 \\ 2 \end{pmatrix}\lambda_2$$
and so \$B\$ is not a basis for \$\begin{pmatrix} 4 \\ 6 \\ 10 \end{pmatrix}\$.
You are to take a vector \$\vec v \in \mathbb Z^m\$ of \$m\$ integers, and a list of \$n\$ vectors \$B = \{\vec b_1, \dots, \vec b_n\}\$. You should then output two distinct consistent values to indicate whether or not \$B\$ forms a basis for \$\vec v\$ (more precisely, whether \$B\$ forms a basis for some space containing \$\vec v\$). That is, whether or not there exists a unique set of numbers \$\lambda_1, \lambda_2, \dots, \lambda_n\$ such that
$$\vec v = \lambda_1 \vec b_1 + \lambda_2 \vec b_2 + \cdots + \lambda_n \vec b_n$$
You may assume that \$\vec b_i \in \mathbb Z^m\$ for all vectors \$b_i \in B\$ - that is, they all have the same number of elements as \$\vec v\$, and they are all integer vectors.
You may take the inputs in any reasonable, convenient format and method, including a list of lists of \$B\$, or a list of numbers for \$\vec v\$ etc. The output may be any two distinct, consistent values to indicate whether or not \$B\$ is a basis. You may freely choose these values.
This is code-golf, so the shortest code in bytes wins
Test cases
B
v
Output (λ1, λ2, ..., λn or reason)
[[8, 1, 2], [-7, -8, -9], [-1, 9, -5]]
[12, 36, -4]
True (1, -1, 3)
[[-9, -3]]
[3, 1]
True (-1/3)
[[1, 0, 1], [0, 1, 2]]
[1, -1, -1]
True (1, -1)
[[1, 0, 1], [0, 1, 2]]
[4, 6, 10]
False (shown above)
[[7, -2], [-10, -6], [-4, 9]]
[1, -21]
False (too many unknowns, an infinite number of solutions exist)
[[-1, 8, 1, 6, 3], [8, -6, -5, -10, 6], [-8, -3, -3, -4, 5], [-6, -6, 0, 3, 9], [2, 2, 0, -1, -3]]
[1, 1, 1, 1, 1]
False ([-6, -6, 0, 3, 9] and [2, 2, 0, -1, -3] are linearly dependent, so any way of writing the sum is not unique)