Math & ScienceLabels at Matrix Bottom with upward Arrows

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
sabahmed
Posts: 36
Joined: Thu Aug 04, 2011 8:55 pm

Labels at Matrix Bottom with upward Arrows

Post by sabahmed »

Hi All,

I want to label a matrix (lower bottom of matrix) with the help of upward arrows. Below is the code.

Code: Select all

\documentclass[12pt,a4paper,fullpage]{report}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}

\begin{document} 
$$
  \bordermatrix{%
    &A_1&A_2&\ldots &A_n \cr
    R_1&d_{11} &   d_{12}   &...& d_{1n} \cr
    R_2& d_{21} &  d_{22}   & ...& d_{2n} \cr
    \vdots& \vdots & \vdots  &...& \vdots \cr
    R_n& d_{n1} & d_{n2}     &...&   d_{nn} \cr
  }
$$
\end{document}
Kindly help me out.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Labels at Matrix Bottom with upward Arrows

Post by localghost »

The (quite old) blkarray package is your friend.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{blkarray}

\begin{document}
  \[
    \begin{blockarray}{*5{c}}
      & A_1 & A_2 & \cdots & A_n \\
      \begin{block}{c(cccc)}
        R_1    & d_{11} & d_{12} & \cdots & d_{1n} \\
        R_2    & d_{21} & d_{22} & \cdots & d_{2n} \\
        \vdots & \vdots & \vdots & \cdots & \vdots \\
        R_n    & d_{n1} & d_{n2} & \cdots & d_{nn} \\
      \end{block}
      & \uparrow & \uparrow & \uparrow & \uparrow
    \end{blockarray}
  \]
\end{document}
And by the way, $$…$$ is not the appropriate environment for displayed equations. Use \[…\] instead or the environments provided by the amsmath package (see l2tabu).


Thorsten
Post Reply