在包含矩阵的方程环境中插入缺失的 $

在包含矩阵的方程环境中插入缺失的 $
\begin{equation}
\label{4.12}
\scalebox{0.6}
{
    $\mathcal{Z}$
    =
    \begin{bmatrix}
    W_{1,1,1} & \dots & W_{1,K,1} & & W_{n,1,1} & \dots  & W_{n,K,1} \\
    \vdots & \ddots & \vdots & \dots & \vdots & \ddots &\vdots \\
    W_{1,1,F} & \dots & W_{1,K,1} &  & W_{n,1,1} & \dots  & W_{n,K,1}
    \end{bmatrix}
    \begin{bmatrix}
    Q_{1,1} & 0 & \dots & \vdots & \dots & \dots  & 0 \\
    0 & \ddots & 0 & \vdots & \ddots & \ddots &\vdots \\
    \vdots & \dots & Q_{1,K,1} & \vdots & \ddots & \ddots  & \vdots\\
    \dots & \dots & \dots & \dots & \dots & \dots &\dots \\
    \vdots & \ddots & \ddots & & Q_{n,1} & 0  & \vdots \\
    \vdots & \ddots & \ddots & \vdots & 0 & \ddots 0 \\
    0 & \dots & \dots & \vdots & \dots & 0 & Q_{n,K}\\
    \end{bmatrix}
    \begin{bmatrix}
    x_{11} & x_{12} & x_{13} \\
    x_{21} & x_{22} & x_{23} \\
    \vdots & \vdots & \vdots \\
    x_{d1} & x_{d2} & x_{d3} 
    \end{bmatrix}
    $\approx$
    \begin{bmatrix}
    \mathcal{Z}_1 \\
    \vdots \\
    \mathcal{Z}_n
    \end{bmatrix}
}
\end{equation}

答案1

在此处输入图片描述

不要在每个运算符周围都进入数学模式。并且只\scalebox在万不得已的情况下才使用。

\documentclass[a4paper]{article}

\usepackage{amsmath}
\usepackage{graphicx}

\begin{document}


scale
\begin{equation}
\label{scaled}% best not to use numbers in \label \label{4.12}
\scalebox{0.6}
{$\displaystyle
    \mathcal{Z}
    =
    \begin{bmatrix}
    W_{1,1,1} & \dots & W_{1,K,1} & & W_{n,1,1} & \dots  & W_{n,K,1} \\
    \vdots & \ddots & \vdots & \dots & \vdots & \ddots &\vdots \\
    W_{1,1,F} & \dots & W_{1,K,1} &  & W_{n,1,1} & \dots  & W_{n,K,1}
    \end{bmatrix}
    \begin{bmatrix}
    Q_{1,1} & 0 & \dots & \vdots & \dots & \dots  & 0 \\
    0 & \ddots & 0 & \vdots & \ddots & \ddots &\vdots \\
    \vdots & \dots & Q_{1,K,1} & \vdots & \ddots & \ddots  & \vdots\\
    \dots & \dots & \dots & \dots & \dots & \dots &\dots \\
    \vdots & \ddots & \ddots & & Q_{n,1} & 0  & \vdots \\
    \vdots & \ddots & \ddots & \vdots & 0 & \ddots 0 \\
    0 & \dots & \dots & \vdots & \dots & 0 & Q_{n,K}\\
    \end{bmatrix}
    \begin{bmatrix}
    x_{11} & x_{12} & x_{13} \\
    x_{21} & x_{22} & x_{23} \\
    \vdots & \vdots & \vdots \\
    x_{d1} & x_{d2} & x_{d3} 
    \end{bmatrix}
    \approx
    \begin{bmatrix}
    \mathcal{Z}_1 \\
    \vdots \\
    \mathcal{Z}_n
    \end{bmatrix}$}
\end{equation}

aligned
\begin{equation}
\label{aligned}% best not to use numbers in \label \label{4.12}
\begin{aligned}
    \mathcal{Z}
    =&
    \begin{bmatrix}
    W_{1,1,1} & \dots & W_{1,K,1} & & W_{n,1,1} & \dots  & W_{n,K,1} \\
    \vdots & \ddots & \vdots & \dots & \vdots & \ddots &\vdots \\
    W_{1,1,F} & \dots & W_{1,K,1} &  & W_{n,1,1} & \dots  & W_{n,K,1}
    \end{bmatrix}\\
&\qquad\qquad
    \begin{bmatrix}
    Q_{1,1} & 0 & \dots & \vdots & \dots & \dots  & 0 \\
    0 & \ddots & 0 & \vdots & \ddots & \ddots &\vdots \\
    \vdots & \dots & Q_{1,K,1} & \vdots & \ddots & \ddots  & \vdots\\
    \dots & \dots & \dots & \dots & \dots & \dots &\dots \\
    \vdots & \ddots & \ddots & & Q_{n,1} & 0  & \vdots \\
    \vdots & \ddots & \ddots & \vdots & 0 & \ddots 0 \\
    0 & \dots & \dots & \vdots & \dots & 0 & Q_{n,K}\\
    \end{bmatrix}\\
&\qquad\qquad\qquad
    \begin{bmatrix}
    x_{11} & x_{12} & x_{13} \\
    x_{21} & x_{22} & x_{23} \\
    \vdots & \vdots & \vdots \\
    x_{d1} & x_{d2} & x_{d3} 
    \end{bmatrix}
\\
    &\approx
    \begin{bmatrix}
    \mathcal{Z}_1 \\
    \vdots \\
    \mathcal{Z}_n
    \end{bmatrix}
\end{aligned}
\end{equation}


\end{document}

答案2

该符号$不用于“打印奇怪的符号”。它进入数学模式,单个公式应位于单个$符号之间。也bmatrix仅在数学公式中合法。

然而,缩放矩阵并不是表达这种公式的最佳方式:它会变得非常小并且难以阅读。

使用块矩阵,您将为读者提供更好的服务。

\documentclass{article}
\usepackage{amsmath}

\begin{document}

Define, for $k=1,2,\dots,n$, the blocks
\begin{align*}
\mathcal{W}(k,K,F) &=
  \begin{bmatrix}
  W_{k,1,1} & \dots & W_{k,K,1} \\
  \vdots & \ddots & \vdots \\
  W_{k,1,F} & \dots & W_{k,K,F}
  \end{bmatrix}
\\
\mathcal{Q}(k,K) &= \operatorname{diag}(Q_{k,1},\dots,Q_{k,K})
\end{align*}
Let the $p\times q$  matrix $X_{p,q}$ have entries $x_{ij}$.
Then we have
\begin{equation}\label{whatever}
\begin{split}
\mathcal{Z} &=
\begin{bmatrix}
\mathcal{W}(1,K,F) & \dots & \mathcal{W}(n,K,F)
\end{bmatrix}
\begin{bmatrix}
\mathcal{Q}(1,K)& \dots & 0 \\
\vdots &  \ddots & \vdots \\
0 & \dots & \mathcal{Q}(n,K)
\end{bmatrix}
X_{nK,q}
\\
&\approx
\begin{bmatrix}
\mathcal{Z}_1 \\
\mathcal{Z}_2 \\
\vdots \\
\mathcal{Z}_F
\end{bmatrix}
\end{split}
\end{equation}

\end{document}

在此处输入图片描述

相关内容