This may seem like a simple question but I am confused on this point: Suppose I have subset $X$ of $\Bbb R^2$ that consists of line segments from $(0,0)$ to $(1,1/n)$, $n \in \Bbb N$, together with the line segment $(0,0)$ to $(1,0)$ that include the endpoints. To show that this is a compact set with the relative topology (a set is open in $X$ if it is the intersection of an open set in $\Bbb R^2$ with $X$), does this amount to showing that it is closed and bounded in $\mathbb R^2$?
The reason I am asking is because with another topology, I can show that $X$ is not compact, and so it is tripping me up to consider it with the relative topology. The other topology is obtained by declaring that a set $U ⊂ X$ is open if $U ∩ L_n$ is open in $L_n$ (with its relative topology) for all $n$ (as well as with the line segment $(0,0)$ to $(1,0))$.
Showing $X^c$ is open $\Bbb R^2$ and that $X$ is bounded is what I have already done, but now I am not sure if that's what I needed to show $X$ is compact.
Usually, the relative topology is defined as that $U_X$ is open in $X$ if there is a set $U$ that is open in $X$ and $U_X = U ∩ X$. The way you've phrased it, $U_X$ is open if there is a set $U$ that is open in $X$ and $U_X = U_X ∩ U_X$, which doesn't make sense.
Using the usual definition of the relative topology, it is sufficient to prove that $X$ is closed and bounded in $\mathbb R^2$. First, we can use the Heine–Borel theorem to find that any open cover of $X$ in $\mathbb R^2$ has a finite subcover in $\mathbb R^2$. Then suppose we're given $\{U_i\}$ such that $\{U_i\}$ is an open cover of $X$ in itself. For every $i$, $U_i$ is open in $X$, which means there is some open set $U'_i$ that is open in $\mathbb R^2$ such that $U'_i ∩ \mathbb R^2 = U_i$. Then $\{U'_i\}$ is an open cover of $X$ in $\mathbb R^2$, and thus has a finite subcover. If we take the sets in that cover and intersect them with $X$, then we get a finite subcover of $X$ in itself.
In general, however, it is not sufficient to show that $X$ is closed and bounded; the Heine–Borel theorem applies to Euclidean spaces. While showing that $X$ is compact in the larger space is sufficient to show that it is compact in the relative topology, it is not sufficient to show that it is compact in arbitrary topologies. If we were to take a topology in which singleton sets are open, then any set with an infinite number of points would be noncompact; we can take a cover consisting of singleton sets, and no finite subset will cover the space.