The symbol looks like a fraction bar turned on its side, which causes most of the confusion. It is nothing of the sort. It states a fact about two integers, and the fact is either true or false.
What does a|b mean in math?
The formal definition is one line:
Read aloud, is “a divides b”, “a is a factor of b”, “b is a multiple of a” or “b is divisible by a”. All four say the same thing. For example, is true because , and is true because no integer times gives ( and ). The slashed symbol means “does not divide”.
The definition is built from multiplication, not division, for a good reason. Whole numbers are not closed under division: the equation has no integer solution. So mathematicians turned the question around and asked something that always has a yes or no answer: can be built by multiplying by a whole number? That is the whole idea.
In everyday arithmetic terms, says that dividing by leaves remainder . The definition is more useful than the remainder wording, though, because it lets you work with unknowns, negatives and proofs, as the later sections show.
Quick check
Answer:
Is a|b the same as a/b or a divided by b?
No. The expression is a number, and its value is . The statement is a complete sentence that happens to be true. A quick test: you can attach “is true” or “is false” to , but not to . Compare , which is false, with , which is a perfectly good number. For the calculation itself, see dividing integers.
is true or false, like . The quotient is a number. They connect in one way: for , is true exactly when is an integer.
That connection also hands you the integer in the definition: . The trap that costs points is writing something like . The bar never produces an answer. If the quotient is needed, write as one statement and as another.
a|b vs b|a: which number goes first?
Order matters. The statement is true, but is false, because would force . A reliable way to remember it: read the bar as “goes into”. Three goes into twelve, so .
Try this: Write every positive integer for which is true, then count them. You should find eight. Now flip each statement to and see how many survive (only one).
There is also a size check that needs no arithmetic. If and , then , because a nonzero multiple of is never smaller in size than itself. So is false at a glance. Both directions can be true only when , such as and .
The tables in factors of numbers 1 to 100 show what can stand on the left of the bar for a given , and multiples of numbers 1 to 100 shows what can stand on the right for a given .
How do you check whether a|b is true?

There are three dependable methods, and the right one depends on the size of the numbers:
- Divide by and look for remainder .
- Apply a divisibility rule when is small. The divisibility rules cover , , , , , , and more.
- Compare prime factorizations. exactly when every prime in appears in at least as many times.
One warning about method 2: combine rules only for coprime factors. A number is divisible by when it passes the tests for and , which share no factor. Testing and fails, since passes both but .
Worked example 1. Decide whether and whether .
Using prime factorization, , so Fourteen needs one and one , and has three s and two s. So . Check: .
For the second pair, There is no factor of in (its digit sum is ), so . Check: , leaving remainder .
How does a|b work with negative numbers and zero?
Signs never change the truth of the statement. These three are equivalent: , and . For example, because , using the sign rules in multiplying integers. In practice, strip the signs and test against , the absolute values.
Zero needs separate care. Every integer divides , because . So and are both true, which also means counts as a multiple of everything. The reverse fails: is false, because is always , never . This is the one exception to the size rule above, which is why it says .
The statement depends on convention. With the bare definition it is true, since for any . Many textbooks insist on to avoid anything that looks like division by zero, and then it is undefined. Check which version your course uses. Two other fixed facts: for every , and only when .
Which rules does a|b always follow?
Five rules cover nearly every proof and puzzle:
- Transitive: if and , then .
- Sums and differences: if and , then and .
- Multiples: if , then for every integer .
- Products: if and , then .
- Mutual division: if and , then .
One clean idea explains the sum rule. If and , then , so factors out. Every rule above is the same move: write the hypotheses as equations, then factor.
Worked example 2. Suppose and . Find every positive .
Subtract: , so . Now and , so The positive divisors of are and . Check: and , and divides everything. So or . This subtract-and-repeat move is the engine behind finding the greatest common factor of large numbers.
Quick check
Answer: Yes
If a divides bc, must a divide b or c?

Only when is prime. For a composite , its prime factors can be split between and . For instance, because , yet and . The comes from the and the comes from the .
For a prime , the split is impossible, and this is known as Euclid’s lemma: if , then or . Example: , and indeed . If you need to recall which numbers qualify, the list of prime numbers from 1 to 100 is the reference.
There is a repair for composite . If and shares no factor with , then . Check it: , and shares nothing with , so . Indeed . Mistakenly “splitting” a product is a common error in proofs, so write out the prime factors of before cancelling anything.
How a|b connects to GCD and LCM
Divisibility is the hidden definition behind both. The greatest common divisor of and is the largest with and . The least common multiple is the smallest positive with and .
For positive integers with , and . Test this first and skip the factor lists.
Take . Then , since is the biggest number that divides and it also divides . And , since is already a multiple of . The page on the least common multiple shows the longer method for pairs where neither number divides the other.
Fractions benefit too. If , then is a whole number, so reduces to a unit fraction: . That is the fastest case in simplifying fractions. In modular arithmetic the same fact is written .
Quick check
Answer: gcd = 9, lcm = 45
Does a|b ever mean something else in math?
Yes, the vertical bar is overloaded, but context sorts it out. One bar between two integers means “divides”. Bars wrapped around a single quantity mean absolute value. In set-builder and probability notation, a bar reads as “such that” or “given”. In LaTeX, \mid gives correct spacing for the divides sense, and Unicode has dedicated symbols for it: (U+2223) and (U+2224).
| Context | Example | Reads as |
|---|---|---|
| Divisibility | 6 divides 18 | |
| Absolute value | absolute value of negative five | |
| Set-builder | the set of x such that x is less than 2 | |
| Conditional probability | probability of A given B | |
| Evaluation | f of x evaluated at x equals 4 |
In programming, a | b usually means bitwise OR, not divisibility. In binary, and , so 6 | 18 gives . The divisibility test in code is a remainder check, such as 18 % 6 == 0.
One last boundary: is defined for integers only. Among rational numbers every nonzero number divides every number, since , so the question would carry no information. That is why is the right statement even though is a perfectly good number in the real number system.
Where a|b shows up in real problems
Anything that must fit evenly is a divisibility question. Packing items into boxes, laying tile along a wall, splitting a schedule into equal shifts, and counting whole weeks in a number of days are all of the form “does divide ?”. Cryptography leans on the same idea: the security of RSA rests on how hard it is to find the primes that divide a very large number.
Worked example 3. A foot fence needs posts at both ends and equal spacing between them. Which spacings from feet work, and how many posts does each need?
The spacing works exactly when .
- : , so it works.
- : , so it works.
- : , remainder , so it fails.
- : , remainder , so it fails.
- : , remainder , so it fails.
- : , so it works.
The number of posts is , because the gaps number and there is one more post than gaps. That gives posts for feet, posts for feet and posts for feet. The failing spacings are exactly the ones that leave a leftover gap shorter than the rest.
Practice problems
0 of 5 solved
- True or false: .
Answer: True
Divide: , a whole number. Check: , so works and . - True or false: .
Answer: True
Signs do not matter, so test and . Since , also . So . - Which statement is true: or ?
Answer:
, so . For you would need , which gives , not an integer. - List every positive integer with and .
Answer:
Divisors of : . Divisors of : . The shared ones are . - Find all positive integers such that .
Answer:
If and , then . So is a positive divisor of . Conversely, any such divides both and , so it divides . The values are .
Common questions
What does a|b mean in math?
It means a divides b: there is an integer with . Equivalent phrases are that a is a factor of b, and b is a multiple of a. The statement is either true or false, never a number.
Is a|b the same as a divided by b?
No. is a complete true-or-false statement, while is a number. The link is that is true exactly when is a whole number.
What does the symbol with a slash through the bar mean?
The symbol means does not divide. For example, because no integer times equals .
Does 0 divide 0?
Under the bare definition , yes, since . Many textbooks require , which makes undefined. Follow the convention your course uses.
Can a|b be used with negative numbers or fractions?
Negative integers work fine, and signs never change the answer: is true. Fractions are not used, because the definition requires integers, otherwise every nonzero number would divide every number.
How is a|b different from |a| and P(A|B)?
A bar between two integers means divides. Bars wrapped around one quantity mean absolute value, and the bar inside means given that. Context tells you which one is meant.