Free preview

82 lessons

Mathematical Foundations for ML

Free preview

Mathematical Foundations for ML · 82 lessons

Build the maths foundations that make ML click

No surprise gaps

Actually remember it

Skip what you know

One subscription. All learning paths included.

Our content is best on a larger screen

Interval notation

Bounded intervals

Explanation

An inequality like 2x<52 \leq x < 5 describes a range of values. Interval notation is a compact way to write these ranges without repeating the variable.

We write the two endpoints separated by a comma, and use brackets to show whether each endpoint is included or excluded.

  • A square bracket [[ or ]] means the endpoint is included (matching \leq or \geq).
  • A round bracket (( or )) means the endpoint is excluded (matching << or >>).

This gives us four types of bounded interval:

IntervalInequalityName
[a,b][a, b]axba \leq x \leq bClosed
(a,b)(a, b)a<x<ba < x < bOpen
[a,b)[a, b)ax<ba \leq x < bHalf-open (closed-open)
(a,b](a, b]a<xba < x \leq bHalf-open (open-closed)

The left endpoint must always be less than the right endpoint. For example, [3,7][3, 7] is valid but [7,3][7, 3] is not.

Single points and empty intervals

Gotcha

The interval [a,a][a, a] contains just one value, aa itself, since axaa \leq x \leq a forces x=ax = a. However, (a,a)(a, a) is empty because no number is strictly between aa and aa.

Example

Convert the compound inequality 2x<52 \leq x < 5 into interval notation. Then convert the interval (3,1](-3, 1] back into an inequality.

Solution

Part 1: Inequality to interval

The inequality 2x<52 \leq x < 5 has two endpoints: 22 and 55.

  • The left endpoint is 22 with \leq (included), so we use a square bracket: [2[2.
  • The right endpoint is 55 with << (excluded), so we use a round bracket: 5)5).

Putting them together:

[2,5)[2, 5)

Part 2: Interval to inequality

The interval (3,1](-3, 1] has endpoints 3-3 and 11.

  • The round bracket at 3-3 means excluded, giving 3<x-3 < x.
  • The square bracket at 11 means included, giving x1x \leq 1.

Combining these:

3<x1-3 < x \leq 1

Practice questions

4 questions

Which interval notation represents the inequality 1<x4-1 < x \leq 4?

Select the correct answer:

+ 3 more questions

Unbounded intervals

Explanation

Not every range has both endpoints. The inequality x>3x > 3 has no upper bound - the values extend indefinitely. We handle this with the symbol \infty (infinity) and its counterpart -\infty.

Key Point

\infty and -\infty are not numbers. They are symbols representing unboundedness. Because we can never reach or equal infinity, it always gets a round bracket - never a square bracket.

The unbounded forms are:

IntervalInequalityMeaning
(a,)(a, \infty)x>ax > aAll values greater than aa.
[a,)[a, \infty)xax \geq aAll values greater than or equal to aa.
(,b)(-\infty, b)x<bx < bAll values less than bb.
(,b](-\infty, b]xbx \leq bAll values less than or equal to bb.
(,)(-\infty, \infty)All xxEvery number on the number line.

The bracket at the finite endpoint follows the same rule as before: square for included (\leq or \geq), round for excluded (<< or >>). The bracket next to \infty or -\infty is always round.

Square brackets with infinity is invalid

Gotcha

Writing [a,][a, \infty] with a square bracket at infinity is incorrect notation. Since \infty is not a value that xx can equal, it must always be paired with a round bracket.

Example

Express "all real numbers greater than or equal to 1-1" in interval notation.

Solution

The phrase "greater than or equal to" tells us the inequality is x1x \geq -1. There is no upper bound - the range extends indefinitely to the right.

  • The finite endpoint is 1-1. The inequality uses \geq, so 1-1 is included - we use a square bracket: [1[-1.
  • The range has no upper limit, so we write \infty on the right. Since infinity is never reached, it always gets a round bracket: )\infty).

Putting them together:

[1,)[-1, \infty)

The square bracket confirms that 1-1 itself belongs to this interval. The round bracket at \infty is mandatory because \infty is not a real number - it cannot be included.

Practice questions

4 questions

Which interval notation represents the inequality x<7x < 7?

Select the correct answer:

+ 3 more questions