Matrix align within equation

From my code below, how do I:

1. increase the spacing between the rows (as the denominator of the top fraction is too close to the numerator of the bottom fraction).

2. reduce the spacing between the '+' signs

Here is my code:

\documentclass{article}
\usepackage{amsmath}
\usepackage{arydshln}

\begin{document}

$$\dfrac{d\mathbf{P}_{T}}{dt} = {\begin{pmatrix} \dfrac{dx}{dt} \\ \dfrac{dy}{dt} \\ \dfrac{dz}{dt} \end{pmatrix}} ={\begin{pmatrix} \dfrac{dx}{d\theta_{1}} \dfrac{d\theta_{1}}{dt} & + & \dfrac{dx}{dr_{2}} \dfrac{dr_{2}}{dt} & + & \dfrac{dx}{dr_{3}} \dfrac{dr_{3}}{dt}\\ \dfrac{dy}{d\theta_{1}} \dfrac{d\theta_{1}}{dt} & + & \dfrac{dy}{dr_{2}} \dfrac{dr_{2}}{dt} & + & \dfrac{dy}{dr_{3}} \dfrac{dr_{3}}{dt} \\ 0 && 0 && 0 \end{pmatrix}}$$

\end{document}

• There is no need to add braces around \begin{pmatrix} and \end{pmatrix}. – egreg Oct 7 '15 at 20:46

\documentclass{article}
\usepackage{amsmath}
\usepackage{arydshln}

\begin{document}

$$\dfrac{d\mathbf{P}_{T}}{dt} = {\begin{pmatrix} \dfrac{dx}{dt} \\[2.5ex] \dfrac{dy}{dt} \\[2.5ex] \dfrac{dz}{dt} \end{pmatrix}} ={\begin{pmatrix} \dfrac{dx}{d\theta_{1}} \dfrac{d\theta_{1}}{dt} + \dfrac{dx}{dr_{2}} \dfrac{dr_{2}}{dt} + \dfrac{dx}{dr_{3}} \dfrac{dr_{3}}{dt}\\[2.5ex] \dfrac{dy}{d\theta_{1}} \dfrac{d\theta_{1}}{dt} + \dfrac{dy}{dr_{2}} \dfrac{dr_{2}}{dt} + \dfrac{dy}{dr_{3}} \dfrac{dr_{3}}{dt} \\[2.5ex] 0 \hspace{1.3cm} 0 \hspace{1.3cm} 0 \end{pmatrix}}$$

\end{document}

1. See some of the examples listed in Column and row padding in tables. I've adjusted \arraystretch below;

2. Remove the column spacing (by setting \arraycolsep to 0pt) and then force + to be set as a binary operator using {}+{}.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

$$\renewcommand{\arraystretch}{2}% increase spacing between rows \dfrac{d\mathbf{P}_{T}}{dt} = {\begin{pmatrix} \dfrac{dx}{dt} \\ \dfrac{dy}{dt} \\ \dfrac{dz}{dt} \end{pmatrix}} = \setlength{\arraycolsep}{0pt}% remove spacing between columns \begin{pmatrix} \dfrac{dx}{d\theta_{1}} \dfrac{d\theta_{1}}{dt} & {}+{} & \dfrac{dx}{dr_{2}} \dfrac{dr_{2}}{dt} & {}+{} & \dfrac{dx}{dr_{3}} \dfrac{dr_{3}}{dt} \\ \dfrac{dy}{d\theta_{1}} \dfrac{d\theta_{1}}{dt} & {}+{} & \dfrac{dy}{dr_{2}} \dfrac{dr_{2}}{dt} & {}+{} & \dfrac{dy}{dr_{3}} \dfrac{dr_{3}}{dt} \\ 0 && 0 && 0 \end{pmatrix}$$

\end{document}
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 3, "x-ck12": 0, "texerror": 0, "math_score": 0.9490366578102112, "perplexity": 1724.8284645141632}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-43/segments/1570986666959.47/warc/CC-MAIN-20191016090425-20191016113925-00378.warc.gz"}