In a math class, students can take either algebra or geometry or both. If there are 50 students in the class and 35 take geometry, while 28 take algebra, how many students take both?

(35 + 28) - 50 = _________

To find out how many students take both algebra and geometry, we can use the concept of set theory and the principle of inclusion-exclusion.

Step 1: Identify the given information:
- Total number of students in the class: 50
- Number of students taking geometry: 35
- Number of students taking algebra: 28

Step 2: Draw a Venn diagram:
We can create a Venn diagram with two overlapping circles representing algebra and geometry. Let's label the circle for algebra as "A" and the circle for geometry as "G".

Step 3: Fill in the given information:
Place the number 35 inside the circle for geometry and the number 28 inside the circle for algebra.

A (algebra)
|
________
| G (geometry)
|
|

Step 4: Use the principle of inclusion-exclusion:
The principle of inclusion-exclusion states that to find the total count of elements in a union of two sets, we need to add the individual counts of the sets and then subtract the count of their intersection.

To find out how many students take both algebra and geometry, we need to find the intersection of the two circles.

Step 5: Calculate the intersection:
To calculate the intersection, subtract the number of students taking algebra from the total number of students taking geometry.
35 - 28 = 7

Step 6: Answer the question:
Therefore, 7 students take both algebra and geometry.