Matrices upper triangular alignment
Here are two versions as I am not sure if you want the central element on or off the diagonal
where
- I have used
\mathrlap
to hide the subscript and superscript from affecting column width so that the\ddots
appear below them, - used
\smash
on the large zero so it does not effect vertical spacing, - used
\multicolumn{}{}{}
for the case on central element being off the diagonal, and - eliminated unneeded packages for this example.
Code:
\documentclass{article}
\usepackage{mathtools}
\newcommand*{\A}{((\hat{\Phi}(p)_{ij}))\mathrlap{{}_{i,j=1}^r}}%
\newcommand*{\B}{((\partial^{\alpha}\partial^{\beta}\hat{\Phi}(p)_{ij}))\mathrlap{{}_{i,j=1}^r}}%
\newcommand*{\C}{((\partial_d^{k-1}\hat{\Phi}(p)_{ij}))_{i,j=1}^r}
\newcommand*{\BigZ}{\hspace*{2.0em}\smash{\text{\Huge0}}}
\begin{document}
\[
J(\hat{\Phi})(p)=
\begin{pmatrix*}[c]
\A & & \hdots & \hdots & \A \\
& \ddots & & & \vdots \\
& & \B & & \vdots \\
\BigZ & & & \ddots & \vdots \\
& & & & \C \\
\end{pmatrix*}
\]
\end{document}
Code: Central Element off Diagonal
\documentclass{article}
\usepackage{mathtools}
\newcommand*{\A}{((\hat{\Phi}(p)_{ij})){{}_{i,j=1}^r}}%
\newcommand*{\B}{((\partial^{\alpha}\partial^{\beta}\hat{\Phi}\mathrlap{(p)_{ij})){}_{i,j=1}^r}}%
\newcommand*{\C}{((\partial_d^{k-1}\hat{\Phi}(p)_{ij}))_{i,j=1}^r}
\newcommand*{\BigZ}{\hspace*{2.0em}\smash{\text{\Huge0}}}
\begin{document}
\[
J(\hat{\Phi})(p)=
\begin{pmatrix*}[c]
\A & \hdots & \hdots & \hdots & \hdots & \A \\
& \ddots & & & & \vdots \\
& & \ddots & \multicolumn{2}{c}{\B} & \vdots \\
\BigZ & & & \ddots & & \vdots \\
& & & & \ddots & \vdots \\
& & & & & \C \\
\end{pmatrix*}
\]
\end{document}
If you are open to loading tikz
, you could do
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}
\[ J(\widehat{\Phi})(p)=
\begin{pmatrix*}[c]
\tikzmarknode{tl}{((\widehat{\Phi}(p)_{ij}))_{i,j=1}^r} &
\hspace*{9em}&
\tikzmarknode{tr}{((\widehat{\Phi}(p)_{ij}))_{i,j=1}^r} \\[4em]
\tikzmarknode{bl}{~} & &
\tikzmarknode{br}{((\partial_d^{k-1}\widehat{\Phi}(p)_{ij}))_{i,j=1}^r}
\end{pmatrix*}
\begin{tikzpicture}[overlay,remember picture,Dotted/.style={%https://tex.stackexchange.com/a/101263/194703
line width=#1, line cap=round, dash pattern=on 0pt off 4\pgflinewidth},
Dotted/.default=1.5pt,shorten/.style={shorten >=#1/2,shorten <=#1/2}]
\draw[Dotted,shorten=4ex] (tl) -- (tr);
\draw[Dotted,shorten=4ex] (tr) -- (br);
\draw[Dotted,shorten=5ex] (tl) -- (br) node[pos=0.5,inner sep=0pt,above
right]
{$((\partial^{\alpha}\partial^{\beta}\widehat{\Phi}(p)_{ij}))_{i,j=1}^r$} ;
\node[scale=3,above] at (bl.south west) {$0$};
\end{tikzpicture}
\]
\end{document}
You could also work with nicematrix
(which uses TikZ).
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\usepackage{nicematrix}
\begin{document}
\[ J(\widehat{\Phi})(p)=
\begin{pNiceMatrix}[name=mymatrix]
((\widehat{\Phi}(p)_{ij}))_{i,j=1}^r &
\Cdots \Hspace*{7em}& ((\widehat{\Phi}(p)_{ij}))_{i,j=1}^r\\[2em]
&\Ddots & \Vdots \\[2em]
~ & &
((\partial_d^{k-1}\widehat{\Phi}(p)_{ij}))_{i,j=1}^r\\
\end{pNiceMatrix}
\begin{tikzpicture}[overlay,remember picture]
\path (mymatrix-1-1) -- (mymatrix-3-3)
node[pos=0.5,above right,inner sep=0pt]
{$((\partial^{\alpha}\partial^{\beta}\widehat{\Phi}(p)_{ij}))_{i,j=1}^r$} ;
\node[scale=3,above] at (mymatrix-3-1) {$0$};
\end{tikzpicture}
\]
\end{document}
Something like this?
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathtools,amssymb}
\begin{document}
\[
\setlength\arraycolsep{2.5pt} % default value: 5pt
J(\widehat{\Phi})(p)=
\begin{pmatrix}
\bigl((\widehat{\Phi}(p)^{}_{ij})\bigr)_{i,j=1}^r &\dots &\dots & \dots &
\bigl((\widehat{\Phi}(p)^{}_{ij})\bigr)_{i,j=1}^r \\
& \ddots & \vdots & & \vdots\\
& &\bigl((\partial^{\alpha}\partial^{\beta}\widehat{\Phi}(p)^{}_{ij})\bigr)_{i,j=1}^r & & \vdots \\
& & & \ddots & \vdots \\
\hbox{\huge0} & & & & \bigl((\partial_d^{k-1}\widehat{\Phi}(p)^{}_{ij})\bigr)_{i,j=1}^r
\end{pmatrix}
\]
\end{document}