I want to to ask how I can type this matrix, especially that ^ over alphabetic characters.

enter image description here

I have something like this:

        a+b & \overset{}{\epsilon + \omega} &  \overset{}{\pi} \\
        \vec{a} & \overleftrightarrow{AC} & \beta
  • 1
    Are you looking for \hat{a}?
    – Au101
    Mar 12, 2018 at 21:45
  • 1
    Don't use eqnarray -- it's badly deprecated. For the equation in your example, just use an equation environment.
    – Mico
    Mar 12, 2018 at 21:47
  • 1
    For hat symbols over lowercase letters, use \hat. For hat symbols over uppercase Latin and Greek letters, use \widehat. For really wide hat symbols, see the posting Really wide hat symbol.
    – Mico
    Mar 12, 2018 at 21:53
  • Yes, its \widehat and \hat. Thank you so much guys.
    – Oggy
    Mar 12, 2018 at 21:56

3 Answers 3


FWIW, in ConTeXt with \widehat always expands to the width of it's argument. So, simply using \widehat{ξ + ω} works.

  \pmatrix{ a + b, \widehat{ξ + ω}, \hat π;
           \vec a, \overleftrightarrow{AC}, β}

which gives

enter image description here


One way to produce the really-wide hat symbol is to employ the mtpro2 package. Note that the full mtpro2 package is not free of charge. However, its lite subset -- which is all that's needed to produce the screenshot of interest, is in fact free of charge.

enter image description here

\usepackage{amsmath} % for 'pmatrix' env.
\usepackage{times}        % Times Roman text font
\usepackage[lite]{mtpro2} % Times Roman math font
    a+b     & \widehat{\xi + \omega}  & \hat{\pi} \\
    \vec{a} & \overleftrightarrow{AC} & \beta

With the default fonts, you have two possibilities for the widehat: either the extensible character \widehat from yhmath or the character of the same name in mathabx. I don't load here mathabx, but define the latter character as \varwidehat. I also suggest the old-arrows package so that \overleftrightarrow doesn't touch capital letters:

\documentclass[12pt, a4paper]{article}

      <5> <6> <7> <8> <9> <10>
      <10.95> <12> <14.4> <17.28> <20.74> <24.88>


\[ \begin{pmatrix}
    a+b & \widehat{\xi + \omega} & \overset{}{\pi} \\
    \vec{a} & \overleftrightarrow{AC} & \beta
\end{pmatrix}\qquad \begin{pmatrix}
    a+b & \varwidehat{\xi + \omega} & \overset{}{\pi} \\
    \vec{a} & \overleftrightarrow{AC} & \beta


enter image description here

You must log in to answer this question.

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