Fixing the position of a number line in section

In summary, the conversation was about graphing subsets of real numbers on a number line, using inequality symbols to compare quantities, and graphing inequalities on a number line. The speaker also gave an example of combining two inequalities into a compound inequality. They then shared a PDF file, asking for clarification on its appearance.
  • #1
cbarker1
Gold Member
MHB
346
23
TL;DR Summary
In the document, there is some errors in my spacing and location of number line.
I am having trouble with the spacing and positioning of some number line. Sorry for any format problems.

Code:
\usepackage{tikz}
\usepackage{parskip}

 \subsubsection{Graphing Real Numbers on Number Line}
    We can graph subsets of real numbers on the number line. The number lines continue forever in both directions. The positive numbers are represented by the points to the right of $0,$ and the negative numbers are represented by the points to the left of $0.$
  
    \begin{tikzpicture}[scale = 3]
      
        \draw[<->, > = stealth, thick] (-2.8, 0) -- (2.8, 0);
        \foreach \x in {-2, -1, ..., 2} {\draw (\x, 2pt)--(\x, -2pt) node [below] {\x};}
      
    \end{tikzpicture}
    \begin{example}
        Graph the following subset of the real numbers: $\{1,-2,\frac{\pi}{2},\sqrt{2}, .\overline{12}, -\frac{1}{5} \}$
    \end{example}
  
    \begin{tikzpicture}[scale = 3]
      
        \draw[<->, > = stealth, thick] (-2.8, 0) -- (2.8, 0);
        \foreach \x in {-2, -1, ..., 2} {\draw (\x, 2pt)--(\x, -2pt) node [below] {\x};}
      
    \end{tikzpicture}
    \newline
    Each number in the example's set has just one point representing that number.
    \subsection{Inequalities and Intervals}
    To compare two quantities, we can use an inequality symbol.These is a table of common inequalities that we will use in this class:
    \begin{table}[ht]
        \centering
        \begin{tabular}{|c|c|c|}
            \hline
            \textbf{ Symbol} & \textbf{Words} & \textbf{Example} \\
            \hline
            $<$ & less than & $3<15$ \\
            \hline
            $>$ & greater than & $12>5$ \\
            \hline
            $\leq$ & less than or equal to & $0\leq 1$ \\
            \hline
            $\geq$ & greater than or equal to & $2 \geq 0$\\
            \hline
            $\ne$ & not equal to & $4\ne 5$\\
            \hline
            $\approx$ & approximately equal to & $\pi \approx 3.14 $ \\
            \hline
        \end{tabular}
        \caption{Basic Inequality symbols}
        \label{tab:Inequality Symbols}
    \end{table}
    Note that we can write an inequality with the inequality symbol pointing in the opposite direction:
    \begin{example}
        We will see two examples:
        \begin{enumerate}
            \item $32<40$ is equivalent to $40>32$
            \item $2.0 \geq -1.8$ is equivalent to $-1.8 \leq 2.0$
        \end{enumerate}
    \end{example}
    Now we will use the number line to graph some inequalities and intervals.
    \subsubsection{Graphing inequalities on Number Line}
    Suppose that we have two points on the number line $a$ and $b$. These are the rules of what the inequality is:
    \begin{enumerate}
        \item If $a>b,$ then $a$ lies to the right of $b$ on a number line.
        \item If $a<b$, then $a$ lies to the left of $b$ on a number line.
    \end{enumerate}
We will use example 9 to demonstrate this idea:
\begin{example}
    Compare the following subset of the real numbers with the right inequality symbol: $\{1,-2,\frac{\pi}{2},\sqrt{2}, .\overline{12}, -\frac{1}{5} \}$
\begin{tikzpicture}[scale = 3]
  
    \draw[<->, > = stealth, thick] (-2.8, 0) -- (2.8, 0);
    \foreach \x in {-2, -1, ..., 2} {\draw (\x, 2pt)--(\x, -2pt) node [below] {\x};}
      
\end{tikzpicture}
 
\end{example}
Let's drop the one constant and change it into a variable. Then this is called an inequality. We motivated this idea with an example.

\begin{example}
    Graph these inequalities: $x>-1$ and $x\leq 1$
\end{example}
\begin{solution}
    The first step is to graph the constant value. Then the second step is to see where the arrow of inequality is pointing right or left. Then we ask ourselves, "is it filled in or not?". Meaning that if we see the bar below inequality then we filled in the circle, otherwise we do not fill.
  
\end{solution}
\begin{tikzpicture}[scale = 3]

\draw[<->, > = stealth, thick] (-2.8, 0) -- (2.8, 0);
\foreach \x in {-2, -1, ..., 2} {\draw (\x, 2pt)--(\x, -2pt) node [below] {\x};}

\end{tikzpicture} \\
 
Sometimes, we can combine two inequalities into a compound inequality. Here is one example:
\begin{example}
$5<x<6$ which means that "$x$ is less than 5 and $x$ is less than 6."
    \begin{tikzpicture}[scale = 3]
  
    \draw[<->, > = stealth, thick] (4, 0) -- (7, 0);
    \foreach \x in {4, 4.5, ..., 6.5} {\draw (\x, 2pt)--(\x, -2pt) node [below] {\x};}  
\end{tikzpicture}
\end{example}

Carter Barker
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
Here is the pdf file.
 

Attachments

  • Help with fixing the position of the number lines a spacing.pdf
    181.4 KB · Views: 129
  • #3
What should it look like?
 

Related to Fixing the position of a number line in section

1. How do I fix the position of a number line in a section?

To fix the position of a number line in a section, you can use the CSS position property. Set the position property to absolute or fixed to fix the position of the number line within its containing section.

2. What is the difference between absolute and fixed positioning for a number line?

Absolute positioning fixes the number line's position relative to its closest positioned ancestor, while fixed positioning fixes the number line's position relative to the browser window. This means that a number line with absolute positioning will scroll with its containing section, while a number line with fixed positioning will stay in the same position even when scrolling the page.

3. Can I use percentage values for the position of the number line?

Yes, you can use percentage values for the top, bottom, left, and right properties to position the number line within its containing section. This can be useful for creating responsive designs that adjust based on the size of the browser window.

4. How can I center the number line within its containing section?

To center the number line within its containing section, you can use the CSS left and transform properties. Set the left property to 50% and the transform property to translateX(-50%). This will center the number line horizontally within its containing section.

5. Is it possible to fix the position of a number line on a specific part of the page?

Yes, you can use the top and left properties to fix the position of the number line on a specific part of the page. Set the top property to the desired distance from the top of the page and the left property to the desired distance from the left side of the page.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
726
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
639
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
5K
Back
Top