In an overleaf document using \documentclass[a4paper,15pt]{scrartcl}, I wrote some text and thereafter, I wrote something like $$ c^2=a^2+(-b)^2=a^2+b^2 $$ (Not this equation, please see the attached code below) followed by a new paragraph. But, the problem is that the equation seems to be sandwiched between the two texts. Here's the code :
...where $\mathbf{R_2}\vec{x}=\vec{0}$ as $\mathbf{R_2}$ is a zero matrix. So, now we have
$$\bnorm{\mathbf{R}\vec{x}-\mathbf{Q}'\vec{b}}^2~=~\bnorm{\mathbf{R_1}\vec{x}-\mathbf{c_1}}^2~+~\bnorm{-\mathbf{c_2}}^2~=~\bnorm{\mathbf{R_1}\vec{x}-\mathbf{c_1}}^2~+~\bnorm{\mathbf{c_2}}^2$$
Now, if $\mathbf{A}$ is of full column rank, then its QR decomposition is unique, hence $\mathbf{Q}$ and $\mathbf{R}$ (And thus, $\mathbf{R_1}$ are fixed.
But, in some previous portions of the document, I've written things like below and in this case, the spacing seem perfectly fine to me. See below :
...The proof is following : $$\norm{\mathbf{G}\vec{x}}~=\sqrt{\left(\mathbf{G}\vec{x}\right)'\cdot\mathbf{G}\vec{x}}~=\sqrt{\vec{x}'\big(\mathbf{G}'\mathbf{G}\big)\vec{x}}=\sqrt{\vec{x}'\vec{x}}~=\norm{\vec{x}}$$
$\bullet~~\textbf{\colorbox{magicmint}{Fact \#3} :}~$ If the matrix $A$ is of full column rank, then it has a unique QR Decomposition.
Here, previously I've written
\newcommand\norm[1]{\left\lVert#1\right\rVert}
\newcommand\bnorm[1]{\big\lVert#1\big\rVert}
I tried using \begin{equation*}, but it's producing the same output. :(
Can anyone please help ? Thanks in advance. :)

\flushbottomthis vertical space can change to ensure equal page lengths just as inter-word space changes on a line to maintain equal line lengths – David Carlisle May 28 '20 at 14:52$$...$$but not before the second. The iron rule of TeX and LaTeX says: never, ever, permit a paragraph break before starting a display-math group. – Mico May 28 '20 at 15:23