I have an identical error message as the one in this question. However upon applying the solution in the answer, the errors still occur.
As always, any help is greatly appreciated, and thanks in advance.
MWE:
\documentclass[12pt]{article}
\usepackage{siunitx}
\begin{document}
\subsection{b)}
$2x^3+5x^2-7x+3$\\
$\sisetup{table-format=1.1}
\vspace{2mm}
\begin{array}{S|SSSr[table-format=-1]}
1 & 2 & 5 & \multicolumn{1}{S|}{-7} & \multicolumn{1}{S}{3}\\
& & 2 & \multicolumn{1}{S|}{7}\\
\cline{2-4}
2 & 2 & \multicolumn{1}{S|}{7} & \multicolumn{1}{S}{0} \\
& & \multicolumn{1}{S|}{4} \\
\cline{2-3}
3 & \multicolumn{1}{S|}{2} &\multicolumn{1}{r}{11} \\
& \multicolumn{1}{S|}{ }\\
\cline{2-2}
\multicolumn{3}{S}{2}
\end{array}$\\
\vspace{2mm}
$\therefore 2x^3+5x^2-7x+3 = 2x(x-1)(x-2) + 11x(x-1)+3$
\end{document}
\\
, use\\[2mm]
; the\vspace{2mm}
after$
adds the space below the formula, not above it.