5
\begin{center}

\[
   P=\left[
    \begin{array}{c c c c c c c  c c c c}
    a      & 0 & 0 & \dots & 0 & 0 & \dots & 0 \\
    0      &   &   &       &   &   &           \\
    0      &   &   &       &   &   &           \\
    \vdots &   &   &       &   &   &           \\
    0      &   &   &       &   &   &           \\
    0      &   &   &       &   &   &           \\
    \vdots &   &   &       &   &   &           \\
    0      &   &   &       &   &   &    
    \end{array}
    \right]
\]

\end{center}

I want to write the matrix in the following way:

enter image description here

But I dont know how to write the given matrix in the given form.

I have given the code on how to write the matrix. I just have problem in writing the matrix Q as given in the picture.

Can someone please help me

3 Answers 3

9

Nest matrices:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\[
P=\begin{bmatrix}
 a & \begin{matrix} 0 & 0 & \dots & 0 \end{matrix} \\
 \begin{matrix} 0 \\ 0 \\ \vdots \\[1ex] 0 \end{matrix} & \text{\Huge$Q$}
\end{bmatrix}
\]

\end{document}

enter image description here

Don't use center around \[...\].

0
11

enter image description here

With use of the nicematrix package:

\documentclass[12pt,oneside]{article}
\usepackage{nicematrix}

\begin{document}
    \[
P = \begin{bNiceArray}{ccccc}
a       & 0 & 0 & \dots & 0     \\
0       & \Block{4-4}<\huge>{Q} \\
0       &   &   &       &       \\
\vdots  &   &   &       &       \\
0       &   &   &       &   
    \end{bNiceArray}
    \]
\end{document}

For showed result you need to compile above MWE at least twice.

0
6

One more easy method is using \multicolumn and \multirow and the MWE is:

\documentclass{article}
    \usepackage{amsmath,multirow}

    \begin{document}

    \[
    P=\begin{bmatrix}
     a & 0 & 0 & \dots & 0 \\
     0 \\ 
    0 &\multicolumn{4}{c}{\multirow{2}{*}{\Huge Q}}\\ 
    \vdots \\
    0  &
    \end{bmatrix}
    \]

    \end{document}

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .