标记向量中的条目位置

标记向量中的条目位置

我可能通过举例来解释我的问题。例如,

Let $e_i=(0,\ldots,0,1,0,\ldots,0)$ be the standard basis
vector for n-dimensional Euclidean space $\mathbb{R}^n$.

通过画一条小线并写下$i^{th}$-entry,我想给出该向量中条目的位置。

答案1

我想你想要这样的东西:

\documentclass{article}
\usepackage{amsmath, amsfonts}
\usepackage{tikz}
\usetikzlibrary{positioning, arrows.meta}
\newcommand{\here}[2]{\tikz[remember picture]{\node[inner sep=0](#2){#1}}}

\begin{document}

Let 
\[
e_i=(0,\ldots,0,\here{1}{fromhere},0,\ldots,0)
\]
\begin{tikzpicture}[remember picture, overlay]
\node[font=\scriptsize, below right=12pt of fromhere] (tohere) {$i^{th}$-entry};
\draw ([yshift=-4pt]fromhere.south) |- (tohere);
\end{tikzpicture}

\bigskip\noindent%
be the standard basis
vector for n-dimensional Euclidean space $\mathbb{R}^n$.

Let 
\[
e_i=(0,\ldots,0,\here{1}{fromhere},0,\ldots,0)
\]
\begin{tikzpicture}[remember picture, overlay]
\node[font=\scriptsize, below right=12pt of fromhere] (tohere) {$i^{th}$-entry};
\draw[<-] ([yshift=-4pt]fromhere.south) |- (tohere);
\end{tikzpicture}

\bigskip\noindent%
be the standard basis
vector for n-dimensional Euclidean space $\mathbb{R}^n$.

Let 
\[
e_i=(0,\ldots,0,\here{1}{fromhere},0,\ldots,0)
\]
\begin{tikzpicture}[remember picture, overlay]
\node[font=\scriptsize, below right=12pt of fromhere] (tohere) {$i^{th}$-entry};
\draw[Stealth-] ([yshift=-4pt]fromhere.south) |- (tohere);
\end{tikzpicture}

\bigskip\noindent%
be the standard basis
vector for n-dimensional Euclidean space $\mathbb{R}^n$.

Let 
\[
e_i=(0,\ldots,0,\here{1}{fromhere},0,\ldots,0)
\]
\begin{tikzpicture}[remember picture, overlay]
\node[font=\scriptsize, below right=12pt of fromhere] (tohere) {$i^{th}$-entry};
\draw[Latex-] ([yshift=-4pt]fromhere.south) |- (tohere);
\end{tikzpicture}

\bigskip\noindent%
be the standard basis
vector for n-dimensional Euclidean space $\mathbb{R}^n$.
\end{document}

在此处输入图片描述

答案2

如果您不想使用 tikz,这是一个快速而肮脏的方法(在这种情况下标记两个位置)。

\[
\begin{matrix}
e_{ij} = &
        &(0,\ldots,0,&1,&0,\ldots,0,&1,&0,\dots,0)\\
        &&&\uparrow&     &\uparrow& \\
        &&&i&            &j& \\
\end{matrix}
\]

在此处输入图片描述

相关内容