What are relational operators?

Relational operators are like special compare buttons that tell us if one thing is bigger, smaller, or equal to another.

Imagine you and your friend both have toy boxes. You want to know who has more toys. That’s where relational operators come in, they help you compare the number of toys in each box.

Like a Playground Comparison

Think of relational operators as playground signs that say things like:

  • "Bigger than" (like when your friend's toy box is bigger than yours)
  • "Smaller than" (when your toy box has fewer toys)
  • "Equal to" (if both boxes have the same number of toys)

For example, if you have 5 toys and your friend has 3, the relational operator "greater than" tells us that 5 > 3. If both of you had 4 toys each, then 4 = 4.

These compare buttons are used everywhere, from video games to counting candies, to help decide who wins or what comes next. They’re simple tools for making comparisons in a world full of choices!

Take the quiz →

Examples

  1. Using 'equal to' (==) like checking if your lunch is the same as your friend's.
  2. Checking if one number is bigger with 'greater than' (>), just like seeing who has more candies.
  3. Finding out if two things are different using 'not equal to' (!=), like when you and your sibling don’t have the same toy.

Ask a question

See also

Discussion

Recent activity