Is the following statement always true?
Let $A \in \mathbb Q [X]^{n \times n}$. If $\det A \neq 0$ and there exists a $B\in \mathbb Q[X]^{n \times n}$ with $AB= (\det A)E_n$ then $A \in GL_n( \mathbb Q [X])$.
Note: $GL_n(\mathbb Q)$ is defined as the set of all invertible $n \times n$ matrices over $\mathbb Q [X]$.
$E_n$ is defined as the identity matrix with dimension $n \times n$.
I think that the statement is true, because a matrix is invertible if its determinant is invertible over the given field. And in that case every determinant unequal $0$ is invertible over $\mathbb Q$. So even without the side information with matrix $B$ it is true.
Looking at the condition $B\in \mathbb Q[X]^{n \times n}$ with $AB= (\det A)E_n$, $(\det A)E_n$ is also invertible so the statement still should be true.
Question: Is that guess correct?
Note: This question is related to that post.