4

Can someone please find out what's the error in this code?

\begin{equation}
W(f_1,\dots,f_g):= \text{det} \begin{pmatrix}
                            f_1 & f_2 & \dots & f_g\\
                            f_1^' & f_2^' & \dots & f_g^'\\
                            . & . & &.\\
                            . & . & &.\\
                            . & . & &.\\
                            f_1^{(g-1)} & f_2^{(g-1)}& \dots & f_g^{(g-1)}
                            \end{pmatrix}
\end{equation}
Cragfelt
  • 4,005
Partha
  • 327

2 Answers2

6
\documentclass{article}
\usepackage{amsmath}

\begin{document}
\begin{equation}
W(f_1,\dotsc,f_g) := \text{det} 
    \begin{pmatrix}
f_1         & f_2           & \dots & f_g           \\
f_1'        & f_2'          & \dots & f_g'          \\ % <---
.           & .             &       & .             \\
.           & .             &       & .             \\
.           & .             &       & .             \\
f_1^{(g-1)} & f_2^{(g-1)}   & \dots & f_g^{(g-1)}
    \end{pmatrix}
\end{equation}
or better
\begin{equation}
W(f_1,\dotsc,f_g) := \det
    \begin{pmatrix}
f_1         & f_2           & \dots     & f_g           \\
f_1'        & f_2'          & \dots     & f_g'          \\
\vdots      & \vdots        & \ddots    & \vdots        \\
f_1^{(g-1)} & f_2^{(g-1)}   & \dots     & f_g^{(g-1)}
    \end{pmatrix}
\end{equation}
\end{document}

enter image description here

Addendum: To some people prefer to use instead := different symbols for definition. Discussion and different symbols about this symbols you can find in How to typeset := correctly. For example \coloneqq from the package mathtools or \colonequals from the package colonequals, etc. Differences between are subtle, however for people with with a keen sense of aesthetics they are important. For comparison observe the case of use of \colonequals:

\documentclass{article}
\usepackage{mathtools}

\begin{document}
\begin{equation}
W(f_1,\dotsc,f_g) \coloneqq \det\begin{pmatrix}
        f_1         & f_2           & \dots     & f_g           \\
        f_1'        & f_2'          & \dots     & f_g'          \\
        \vdots      & \vdots        & \ddots    & \vdots        \\
        f_1^{(g-1)} & f_2^{(g-1)}   & \dots     & f_g^{(g-1)}
                                \end{pmatrix}
\end{equation}
\end{document}

enter image description here

Further possibility is use the unicode-math with xelatex˙orlualatexengine. This fonts define\coloneq` which gives:

enter image description here

@Sebastiano, thank you for pointing me on this detail. Personally I very rare if ever use (due to my professional background) symbols for equal by definition :-)

Zarko
  • 296,517
  • I prefer, using \usepackage{mathtools} the symbol $\coloneqq$ instead of classic :=....but there is my upvote for all users. – Sebastiano Nov 30 '19 at 21:23
  • 1
    @Sebastiano, thank you very much. I was in dilemma, use "classic := or use \coloneqq from mathtools. On the end I decide to stick with `classic". Personal I very rare if ever use symbols for definition. – Zarko Nov 30 '19 at 22:26
  • Very Kind Zarko use instead the classic macro of egreg :-) \mathrel{\mathop:}=. – Sebastiano Nov 30 '19 at 22:28
  • 1
    @Sebastiano, please see addendum in my answer :-) – Zarko Nov 30 '19 at 22:57
  • I've been joking a lot, I hope you know about this. :):):):). I hope that I can afford to joke with you too. – Sebastiano Nov 30 '19 at 22:58
  • 1
    @Sebastiano, of course you can, actually joking are welcome! To be only serious is so boring :-( – Zarko Nov 30 '19 at 23:03
4

Use f_1^{\prime} instead of f_1^'.

enter image description here

I suggest to use \ddots and \vdots.

\documentclass{standalone}
\usepackage{amsmath}

\begin{document}

\begin{equation}
W(f_1,\dots,f_g):= \det
                \begin{pmatrix}
                    f_1         & f_2           & \dots & f_g \\
                    f_1^{\prime}& f_2^{\prime}  & \dots & f_g^{\prime} \\
                    \vdots      & \vdots        & \ddots& \vdots \\
                    f_1^{(g-1)} & f_2^{(g-1)}   & \dots & f_g^{(g-1)}
                \end{pmatrix}
\end{equation}

\end{document}
Cragfelt
  • 4,005