Graphics, Figures & TablesDraw Circle around Entries inside a Matrix

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
radarnasty
Posts: 1
Joined: Fri Jun 10, 2011 6:52 pm

Draw Circle around Entries inside a Matrix

Post by radarnasty »

I am trying to figure out how to draw a circle around single entries in a matrix. I am currently using the \begin{smallmatrix} command to create my matrices. Any help would be appreciated.

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

5gon12eder
Posts: 126
Joined: Sun Feb 13, 2011 8:36 pm

Draw Circle around Entries inside a Matrix

Post by 5gon12eder »

This is a quick and dirty approach but it works:

Code: Select all

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath}

\begin{document}
  The element $b$ in matrix $M$ is circled.
  
  \begin{equation*}
    M = 
    \left(
    \begin{array}{ccc}
      a &\text{\textcircled{$b$}} &c\\
      d &e &f\\
      g &h &i
    \end{array}
    \right)
  \end{equation*}
\end{document}
For a comprehensive discussion about circling stuff see
http://tex.stackexchange.com/questions/ ... ed-numbers

Best
I'm using pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian).
Post Reply