4
\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

8

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 \[...\].

7

enter image description here

With use of the nicematrix package:

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

\begin{document}
    \[
P = \begin{bNiceArray}{C CCCC}
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.

4

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.