0

How to write a matrix like this enter image description here

I tryed this

$$
\begin{pmatrix}
J_0 & O &\cdots\\
0& J_{n+1} & 0\cdots
\end{pmatrix}
$$

I don't know how to do

Mico
  • 506,678
Poline Sandra
  • 463
  • 4
  • 11

1 Answers1

3

Does one of these examples work for you?

\documentclass[preview]{standalone}

\usepackage{amsmath}

\begin{document}
\(
    \begin{pmatrix}
        J_0    & 0       & \cdots & 0      \\
        0      & J_{n+1} & \cdots & 0      \\
        \vdots & \vdots  & \ddots & \vdots \\
        0      & 0       & \cdots & J_r
    \end{pmatrix}
\)
\(
    \begin{pmatrix}
        J_0    & 0       & \cdots &     \\
        0      & J_{n+1} & \cdots &     \\
        \vdots & \vdots  & \ddots &     \\
               &         &        & J_r
    \end{pmatrix}
\)
\end{document}

Result: enter image description here I personally like the left one better, it leaves less room for mis-interpretation.

See Why is \[ ... \] preferable to $$ ... $$? for why I used \( \) instead of $$ $$.

Max
  • 9,733
  • 3
  • 28
  • 35
  • Thank you, see if you can help me here https://tex.stackexchange.com/questions/434179/how-to-write-nilpotente-matrix – Poline Sandra May 30 '18 at 16:59
  • 1
    @PolineSandra Surely this answer simply duplicates the question you link to in your comment? And please, instead of just posting images in your questions, please show complete compilable code that shows what you've tried. – Alan Munn May 30 '18 at 17:01
  • 1
    @PolineSandra In addition to what Alan Munn wrote, with which I completely agree, if this answer solves your question please mark it as accepted. – Max May 30 '18 at 17:06
  • no it is not the same i have a decalage 4 colums at 1 5 in the second line how to do ? – Poline Sandra May 30 '18 at 17:14
  • It is not exactly the same matrix, but you should be able to rework this answer to output the matrix in the other question. The macros and environments are the same. – Max May 30 '18 at 17:16
  • @MaxSnippe i tryed this: (N_{m+l}= \begin{pmatrix} 0 & 1 &0 & & \cdots & 0 \ 0 & 0 &1 &0 &\cdots & 0 \ \vdots & \vdots & & \ddots & \ 0 & 0 & \cdots & & &1\ 0 &0&\cdots &\cdots &\cdots &0 \end{pmatrix} ) – Poline Sandra May 30 '18 at 17:24
  • Try adding backslashes to the opening- and closing parenthesis ( and ) – Max May 30 '18 at 17:27
  • i do \ before ( and ) but in the message it do not appear – Poline Sandra May 30 '18 at 17:28