3

I am looking to be able to write this: https://imgur.com/a/FFMifhs

but I'm a little stuck with the arrows and what not concerning the arrows underneath the matrix. I've got this so far:

 \begin{pmatrix}
    1 & 2 & 3 & 4 \\
    \square & \square & \square & \square 
    \\   $\uparrow$
    \end{pmatrix}

Thanks for the help.

5
\documentclass{article}
\usepackage{amsmath,amssymb,tikz}
\newcommand{\Poss}[1]{\ifnum#1=1
\tikz[remember picture]{\node(node-#1){$\scriptscriptstyle
\begin{array}{c}#1~\text{possi-}\\
\text{bility}\end{array}$}}
\else
\tikz[remember picture]{\node(node-#1){$\scriptscriptstyle
\begin{array}{c}#1~\text{possi-}\\
\text{bilities}\end{array}$}}
\fi}
\begin{document}
\[\begin{pmatrix}
    1 & 2 & 3 & 4 \\
    \square & \square & \square & \square 
    \\   \uparrow & \uparrow &\uparrow &\uparrow \\
    \Poss{4} & \Poss{3} & \Poss{2} & \Poss{1} \\[-1.6cm]
    \end{pmatrix}\]
\tikz[overlay,remember picture]{\foreach \X [count=\Y] in {2,3,4}
{\path (node-\Y) -- (node-\X) node[midway]{$\scriptstyle\times$};}} 
\end{document}

enter image description here

  • Brilliant, thanks so much. Never would have got this! – Zombiegit123 Aug 8 '18 at 22:43
  • @marmot -- if it doesn't throw off the alignment too much, a much better word break would be "possi-bilities" – barbara beeton Sep 17 '18 at 16:05
  • @barbarabeeton Thanks, you are right. The language of humans will always remain difficult for me, ;-) – marmot Sep 17 '18 at 16:11
3

You could use the tabular environment instead of a matrix. Here is my solution:

\documentclass{article} 


\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{multirow}
\usepackage{array}

\begin{document}

\begin{tabular}{ccccccc}

  \multirow{2}{*}{$\biggl($}

  & 1 & 2 & 3 & 4 &

  \multirow{2}{*}{$\biggr)$} \\
  & $\square$  & $\square$  & $\square$  & $\square$  & &\\
  & $\uparrow$ & $\uparrow$ & $\uparrow$ & $\uparrow$ & &\\
  & \multicolumn{1}{c!{\makebox[0pt]{$\times$}}}{\parbox{7ex}{\small 4 possibilities}}
  & \multicolumn{1}{c!{\makebox[0pt]{$\times$}}}{\parbox{7ex}{\small 3 possibilities}}
  & \multicolumn{1}{c!{\makebox[0pt]{$\times$}}}{\parbox{7ex}{\small 2 possibilities}}
  & {\parbox{7ex}{\small 1 possibilities}}
  & =
  & $4!$ possibilities \\
\end{tabular}


\end{document}

This is what I obtain: enter image description here

  • 1
    Good +1. Can you edit your answer because possibilities is not in math mode? – Sebastiano Aug 8 '18 at 22:32

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.