Skip to main content
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Canvas Equation Editor Tips: Math Expressions Using LaTeX

Canvas Equation Editor Tips: Math Expressions Using LaTeX

This document provides instruction for using LaTex in the Canvas Equation Editor.


In the Canvas Equation Editor, available in the Rich Content Editor, you can use LaTeX code to enter more complicated mathematical expressions such as such interval notation, piecewise functions, matrices, determinants, and tables. This document provides tips for entering mathematical expressions using LaTeX. 

You can learn more about using the Equation Editor as an instructor or as a student

Notes:

  • In addition to the Equation Editor, you can manually enter equations in any Canvas area that includes a text field, such as the title of an assignment or in a calendar event.
  • Other resource documents provide tips for entering expressions related to chemistry.

Symbols and Operators

Many symbols and operators are available in the toolbar of the Equation Editor, but you can also enter them using LaTeX. If you prefer to enter expressions and equations via LaTeX code, you can refer to the following table:

x2.png x ^ 2 cap.png \cap f_circg.png f \circ g
x_2.png x_2 le.png \le infty.png \infty
sqrt.png /sqrt ge.png \ge angleC.png \angle C
nthroot.png \nthroot in.png \in  partial.png \partial
3_5.png 3/5 notin.png \notin rightarrow.png \rightarrow
primep.png y^\prime _subset.png \subset image5.png \lim_x\rightarrow a
prime.png y\prime\prime notsubset.png \notsubset vert.png \vert (or | key on keyboard)
pm.png \pm subsetq.png \subseteq _cup.png \cup
3_9.png 3*9 or 3 \cdot 9 varnothing.png \varnothing parallel.png \parallel
3x9.png 3 \times 9 approx.png \approx sum.png \sum
9_3.png 9 \div 3 ne.png \ne perp.png \perp
therefore.png \therefore ell.png \ell int.png \int

 

Note: You can enter line breaks with \\ (two backslashes).

Additional Symbols and Notation

The following symbols and notation are available on the Equation Editor toolbar or via the following LaTeX codes:

         Non-italicized text "if": \text{if }

         Non-italicized text "when": \text{when }

         Is an element of: \in

         Is not an element of: \notin

         Symbol for Real Numbers: \mathbb{R}

         Symbol for Integers: \mathbb{Z}

         Symbol for Rationals: \mathbb{Q}

         Is less than or equal to: \le

         Is greater than or equal to: \ge

         Is not equal to: \ne

Interval Notation (mixed parentheses and brackets)

For interval notation using parentheses on both sides or brackets on both sides, you can type ( to get ( ) or [ to get [ ] in the editor.

Display

LaTeX Code

left parenthesis

\left(

right parenthesis

\right) 

left bracket

\left[

right bracket

\right]  

 

Below are several examples of LaTeX code that you can use for interval notation. 

Display

LaTeX Code

afoote_0-1652906034738.png

 

\left(x,y\right]

afoote_1-1652906034763.png

 

\left[x,y\right)

afoote_2-1652906034805.png

 

\left[-2,\infty\right)

afoote_3-1652906034801.png

 

\left(-\infty,4\right]

afoote_4-1652906034735.png

 

\left(\sqrt{5} ,\frac{3}{4}\right]

 

Examples:

\left(x,y\right]
\left[x,y\right)
\left[-2,\infty\right)
\left(-\infty,4\right]
\left(\sqrt{5} ,\frac{3}{4}\right]

Piecewise Functions

You can use LaTeX in the Canvas Equation Editor to write piecewise functions. Here are some examples:

Piecewise FunctionsPiecewise Functions

This kind of LaTeX expression contains layers. The outer layer declares the function and a resizing brace: 

Piecewise FunctionsPiecewise Functions

 The next layer in builds an array to hold the function definitions and conditions:

Piecewise FunctionsPiecewise Functions

The innermost layer defines the functions and conditions. The symbol & is used to separate the cells of the array and \\ is used as a line break.

Piecewise FunctionsPiecewise Functions

Here is another example of piecewise functions:

Piecewise FunctionsPiecewise Functions

Example 1:

f(x)=\left\{
   \begin{array}{lr}
   1+x & \text{if } x<3 \\
   2 & \text{if } x=3 \\
   1-x & \text{if } x>3
   \end{array}
\right.

Example 2:

f(x)=\left\{
   \begin{array}{lr}
   1 & \text{when } x\in\mathbb{Q} \\
   0 & \text{when } x\notin\mathbb{Q}\\
   \end{array}
\right.

Note: You can enter line breaks with \\ (two backslashes)

Determinants and Matrices

You can use LaTeX matrix notation to enter determinants and matrices in the Canvas Equation Editor.

         Matrix in parentheses:     

 \begin{pmatrix}  and  \end{pmatrix}

         Matrix in brackets:         

  \begin{bmatrix}  and  \end{bmatrix}

         Determinant:                   

\begin{vmatrix}  and  \end{vmatrix}

Inside the matrix structure, you can use the symbol & to separate elements of the array and \\ for line breaks. Here are three examples:

afoote_21-1652906376890.png  
afoote_23-1652906385821.png  
afoote_25-1652906394959.png  


Any of these can also be written in one line, like this:

A=\begin{vmatrix} 10 & -5 \\ 0 & 20 \end{vmatrix}

Note: When the matrix only holds one value, you may need to use the \left and \right delimiters to get the parentheses, brackets, or braces to resize:

View DelimitersView Delimiters

Example 1: 

A=\begin{bmatrix}
   \frac{2}{3} & 2 \\
   -1 & \sqrt{5}
\end{bmatrix} 

Example 2:

A=\begin{pmatrix}
   0 & 2 \\
   -1 & 5
\end{pmatrix}

Example 3:

A=\begin{vmatrix}
   10 & -5 \\
   0 & 20
\end{vmatrix}
A=\left(\frac{1}{2}\right)

Augmented Matrices

You can build an augmented matrix using column notation:

{ccc|c}          Augmented matrix with 3 columns, one vertical line, 1 column

{ccc|ccc}      Augmented matrix with 3 columns, one vertical line, 3 columns

{cc|cc}          Augmented matrix with 2 columns, one vertical line, 2 columns

Use the symbol & to separate the cells of the array and \\ as a line break.

View Array ExampleView Array Example
View Array ExampleView Array Example

 

To change to an augmented matrix in brackets, change to using \left[ at the beginning and \right] at the end.

Example 1:

\left(\begin{array}{ccc|c}
   1 & 2 & 3 & \pi \\
   4 & 5 & 6 & \sqrt{5} \\
   7 & 8 & 9 & -3
\end{array}\right)

Example 2:  

\left(\begin{array}{ccc|ccc}
   1 & 2 & 3 & 1 & 0 & 0 \\
   4 & 5 & 6 & 0 & 1 & 0 \\
   7 & 8 & 9 & 0 & 0 & 1
\end{array}\right)

Tables

You can use LaTeX to create tables. 

\hline            inserts a horizontal line the width of the array

{c|ccc}           table with 1 column, 1 vertical line, 3 columns

{|c|c|c|c|}        table with vertical lines around all 4 columns

Use the symbol & to separate the cells of the table and \\ for a line break. Below are some examples:

\hline Example\hline Example

 

Array ExampleArray Example


Example 1:

\begin{array}{c|ccc}
   x & f(x) & g(x) & h(x) \\
   \hline
   -2 & 3 & 4 & -6 \\
   0 & 5 & 0 & 0 \\
   2 & 7 & 4 & 6 \\
   4 & 9 & 16 & 12
\end{array}

Example 2:

\begin{array}{|c|c|c|c|c|c|}
   \hline
   x & -2 & -1 & 0 & 1 & 2\\
   \hline
   f(x) & -7 & -6 & -5 & -4 & -3 \\
   \hline
\end{array}

Special Characters

Because they are used to construct equations, certain characters may not display as expected when entered into the Equation Editor. If you need these characters to appear as-is in your expression, use the workaround table below.

Character

Workaround

#

\# or \##

$

\$ or \$$

%

\% or \%%

&

\& or \&&

^

\^

_

\_ or \__

{

\{ or \{{

}

\} or \}}

~

\~~

 


Last update: 2024-04-22

You can access this resource from the following Canvas Guides:

Was this article helpful? Yes No
Have a question about Canvas? Ask in the Q&A forum:
Embed this guide in your Canvas course:

Note: You can only embed guides in Canvas courses. Embedding on other sites is not supported.