You can use a lrbox to create a box containing the math stuff and then use it in the argument of \section.
First of all, add
\newsavebox{\mybox}
in the preamble. Then embed the math stuff in the lrbox
\begin{lrbox}{\mybox}
$M= \left[ \begin{array}{rr}2 & 6 \\
2 & 4 \end{array} \right]$
\end{lrbox}
and finally print the box inside the \section:
\section{Analyze the invertible \usebox{\mybox} matrix by doing the following:}
MWE:
\documentclass{article}
\newsavebox{\mybox}
\begin{document}
\begin{lrbox}{\mybox}
$M= \left[ \begin{array}{rr}2 & 6 \\
2 & 4 \end{array} \right]$
\end{lrbox}
\section{Analyze the invertible \usebox{\mybox} matrix by doing the following:}
\end{document}

This doesn't disturb the \tableofcontents but consider using the optional argument of \section to print something different in the ToC, if you are printing it.
\documentclass{...}and ending with `\end{document} – Feb 15 '15 at 16:36answersor a similar package. It's possible, but the entry to the ToC must be protected – Feb 15 '15 at 16:37smallmatrixenvironment (provided by theamsmathpackage) instead of anarrayenvironment. – Mico Feb 15 '15 at 16:53