How can I Tex this equation?

I try to have exactly the same result but for the moment I only succeeded in having intersecting lines... Thanks!
How can I Tex this equation?

I try to have exactly the same result but for the moment I only succeeded in having intersecting lines... Thanks!
A way of achieving this:
\documentclass{article}
\begin{document}
\[
M = \left(
\begin{array}{c|c}
A & B\\
\hline
C & D
\end{array}
\right)
\]
\end{document}

You could use \midrule, a macro provided the booktabs package, inside an array environment. This setup will assure that the horizontal line will not intersect the vertical lines.

\documentclass{article}
\usepackage{booktabs}
\begin{document}
\[
M =
\left( \begin{array}{c|c}
A & B \\
\midrule
C & D \\
\end{array}\right)
\]
\end{document}
Addendum to address a follow-up question: If A has to be replaced with a 3x4 matrix, say, I suggest you do so by using a matrix environment (provided by the amsmath package) for the matrix, as is done in the following example.
\documentclass{article}
\usepackage{booktabs} % for '\midrule' macro
\usepackage{amsmath} % for 'matrix' environment
\begin{document}
\[
M =
\left( \begin{array}{@{}c|c@{}}
\begin{matrix}
a & b & c & d \\
e & f & g & h \\
i & j & k & l
\end{matrix}
& B \\
\cmidrule[0.4pt]{1-2}
C & D \\
\end{array} \right)
\]
\end{document}
booktabs package has been very stable since 2000. The updates since then have either just fixed bugs or added compatibility with packages such as longtable and colortbl. Do you have specific information regarding future changes to the booktabs package?
– Mico
Sep 25 '16 at 00:39
booktabs and its \midrule and \cmidrule macros, but a lot more involved if one were to use other approaches.
– Mico
Sep 25 '16 at 07:22
Intercolumn space needs some adjustment but ...
\documentclass{article}
\begin{document}
\[
M = \left(\begin{array}{c@{}c@{}c}
A & | & B\\
\hline
C & | & D
\end{array}\right)
\]
\end{document}

Try this:
$$ \left( \frac{A|B}{C|D} \right) $$

\[...\] is the better way. And it looks more like a block matrix than a pure fraction
–
Apr 27 '15 at 14:12
$$ in a LaTeX document.
– Mico
Apr 27 '15 at 14:21