0
$$A=(a_i j ),           a_ij= Р(s_i ┤| s_j)$$

This coding shows result without P in equation and I need P in equation

1 Answers1

1

Something like this?

enter image description here

\documentclass{article}
\usepackage{amsmath} % for 'pmatrix' environment and '\DeclareMathOperator' macro
\DeclareMathOperator{\Prob}{P}
\begin{document}
\[
A=\begin{pmatrix}a_{ij}\end{pmatrix}, 
\quad a_{ij}=\Prob(\,s_i\mid s_j\,)
\]
\end{document}
Mico
  • 506,678
  • pmatrix feels a wee bit like an overkill (but you still get your upvote ;-)) – campa Apr 27 '18 at 14:55
  • @campa - Thanks. :-) I guess the main thing that pmatrix does here is to employ \big parentheses. Hence, instead of writing \begin{pmatrix}a_{ij}\end{pmatrix}, one could also write \bigl(a_{ij}\bigr). The former method is a bit more "LaTeX-y", though, since it a bit higher-level in its setup, i.e., focuses more on meaning. – Mico Apr 27 '18 at 14:58
  • this is not working – Isha Shirbhate Apr 27 '18 at 15:50
  • LaTeX Error: Can be used only in preamble.

    See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ...

    l.209 \DeclareMathOperator {\Prob}{P} ?

    – Isha Shirbhate Apr 27 '18 at 15:52
  • 2
    @IshaShirbhate - Indeed, the instruction \DeclareMathOperator can be used only in the preamble. That's exactly where it's located in the answer I provided. Did you maybe try to place it after \begin{document}? If so, it's not going to work. – Mico Apr 27 '18 at 17:00