1

I want to do something like this: enter image description here

But I don't find the way to align the matrix.

\documentclass[10pt]{article}
\usepackage[spanish]{babel}
\usepackage{amsmath, amssymb, amsthm, tikz}
\usepackage[margin=1in]{geometry}
\usetikzlibrary{babel}
\begin{document}
    $$\begin{aligned}
            \begin{matrix}
                _{B}( T)_{A} & =([ coord_{B} T( v_{1})] ,\ [ coord_{b} T( v_{2})] ,\dotsc ,[ coord_{B}] T( v_{n})) \\
                             & =\begin{pmatrix}
                                    a_{11} & a_{12} & \cdots & a_{1n} \\
                                    a_{21} & a_{22} & \cdots & a_{2n} \\
                                    \vdots & \vdots &        & \vdots \\
                                    a_{m1} & a_{m2} & \cdots & a_{mn}
                                \end{pmatrix}
            \end{matrix}
        \end{aligned}$$
\end{document}
  • What do you mean by “aligning the matrix”? Do you want that the columns are below the respective “coord” part in the top row? – egreg Apr 08 '22 at 07:53

2 Answers2

4

You can emulate aligned with nicematrix.

\documentclass[10pt]{article}
\usepackage[spanish]{babel}
\usepackage{amsmath, amssymb, amsthm, tikz}
\usepackage[margin=1in]{geometry}
\usepackage{nicematrix}
\usetikzlibrary{babel}

\DeclareMathOperator{\coord}{coord}

\begin{document}

\begin{equation} \begin{NiceMatrix} {}{B}(T){A}\hspace{-0.4em} & = & [\coord_{B} T(v_{1})] & [\coord_{b} T(v_{2})] & \cdots & [\coord_{B} T(v_{n})] \[2ex] & \Block{4-1}{=} & a_{11} & a_{12} & \cdots & a_{1n} \ && a_{21} & a_{22} & \cdots & a_{2n} \ && \vdots & \vdots & & \vdots \ && a_{m1} & a_{m2} & \cdots & a_{mn} \CodeAfter \SubMatrix({1-3}{1-6}) \SubMatrix({2-3}{5-6}) \end{NiceMatrix} \end{equation*}

\end{document}

Please, never use $$ in LaTeX. Also coord in math mode is wrong, so I suggest to replace the italic letters with upright ones (see \coord).

enter image description here

egreg
  • 1,121,712
1

Why are you using matrix inside an equation environment? I would prefer to use the align environment to get rid of those extra $$ before and after the aligned.

\documentclass[10pt]{article}
\usepackage[spanish]{babel}
\usepackage{amsmath, amssymb, amsthm, tikz}
\usepackage[margin=1in]{geometry}
\usetikzlibrary{babel}
\begin{document}
    \begin{align*}
                _{B}( T)_{A} & =([\text{coord}_{B} T( v_{1})] ,\ [ \text{coord}_{b} T( v_{2})] ,\dotsc ,[\text{coord}_{B} T( v_{n})]) \\
                             & =\begin{pmatrix}
                                    a_{11} & a_{12} & \cdots & a_{1n} \\
                                    a_{21} & a_{22} & \cdots & a_{2n} \\
                                    \vdots & \vdots & \ddots & \vdots \\
                                    a_{m1} & a_{m2} & \cdots & a_{mn}
                                \end{pmatrix}
     \end{align*}
\end{document}
\end{document}

align environment