How to adjust spacing between some specific elements of a matrix?

I am trying to place a row vector notation inside a matrix where all other elements are numeric values. I want to insert 1X2 vectors in-between numbers. I am not satisfied with what my code produced. I am posting an MWE with my code and what I got from it below.

\documentclass{article}
\usepackage{amsmath,amssymb}
\begin{document}
$M = \begin{bmatrix} 0 & \text{---}\mathbf{a}\text{---} & & 0 & 0\\ 0 & \text{---}\mathbf{b}\text{---} & & 0 & 0\\ 1 & 2 & 3 & 4 & 0\\ 5 & 6 & 7 & 0 & 0\\ 0 & 0 & 8 & 9 & 0 \end{bmatrix}$
\end{document}


The lines are too much on the left side and the blank in the 3rd column is looking bad. Is it possible to move the "--a--" and "--b--" slightly to the right?? I tried to put '-' in the 3rd column instead of blank, but it looks like a separate line.

\documentclass{article}
$M = \begin{bmatrix} 0 & \multicolumn{2}{c}{~\mathbf{a}~} & 0 & 0\\ 0 & \multicolumn{2}{c}{\mathbf{b}} & 0 & 0\\ 1 & 2 & 3 & 4 & 0\\ 5 & 6 & 7 & 0 & 0\\ 0 & 0 & 8 & 9 & 0 \end{bmatrix}$

• It worked. Nice idea using \multicolumn within mathmode. Inside my article first two and last two columns looked a little congested, but after adding ~ before the entries, it worked perfectly. May 11, 2021 at 3:16