My real analysis notes define a connected set $A \subset M$ of a metric space $M$ as a set where there does not exist open sets $U,V$ with
1) $ A \subset U \cup V$
2) $ A \cap U \neq \emptyset$
2) $ A \cap V \neq \emptyset$
2) $ A \cap U \cap V = \emptyset$
I have seen another definition of a connected set on the Wikipedia page (https://en.wikipedia.org/wiki/Connected_space) and I am wondering if these two definitions are equivalent.
"A subset of a topological space is said to be connected if it is connected under its subspace topology". What I understand the relative/subspace topology to be is that $U \subset A$ is open relative to A if it is the intersection of an open set in $M$ with A.
The below explanation was intentionally left vague and hand-wavy to encourage you to try and fill in the details.
These are certainly equivalent. Think about what your metric space definition of connected is really saying; a set is connected if you can't "separate" them with two disjoint open sets (the general version involves closures of those sets being disjoint, but we'll ignore that for now as it's a subtlety that turns out to not be important in the analytic setting and would make the below argument a bit more convoluted).
Clearly if you have open sets that separate your set, then restricting to the subspace topology, you could use those same open sets to still separate your set within the subspace topology.
Conversely, if you had separating U, V open in your subspace topology that separate your set, then those had to come from some U', V' open in the larger topology. Moreover, U' cannot hit any portion of the set in the restricted topology (or else it would in the restricted topology and not be disjoint from the other set). So, the only thing you need to worry about is if U' and V' intersect outside of the restricted space in the larger topology.
However, with a little bit of work, you should be able to show that you can "remove" parts of U' and/or V' to in order ensure U' and V' no longer intersect, and still cover the original set, thus giving you your separating sets.
Edit: Clarification of what "Connectedness" means in a general topology setting, and why metric spaces are nice (and allow for more relaxed versions of "connectedness" definitions).
In a generic topology (where we don't have nice things like a metric) a set is considered connected if it cannot be separated by two sets U, V with the property that $\overline{U} \cap V = \emptyset$ and $\overline{V} \cap U = \emptyset$. To see this in a nice space, consider the real line $(-\infty, \infty)$ and the subset $I = (-1,1)$.
Notice that there exists two sets $U$ and $V$ so that $U \cap V = \emptyset$ and $U \cup V = I$. For instance, take $U = (-1,0)$ and $V = [0,1)$. However $\overline{U}\cap V = \{0\} \neq \emptyset$ and so $I$ is not separated as $U$ and $V$ (which we expect, since $I$ is clearly connected).
So, a general topological setting doesn't require $U$, $V$ to be open. However we can quickly prove that it is equivalent to require $U$ and $V$ to be open, as any time you could separate a set with (not necessarily open) $U$ and $V$, there turns out to exist an open $U$ and $V$ that will separate our set.
In the real line example, if we had the subset of the real line $(-1,0] \cup [\frac{1}{2},1)$, we could separate it with the sets $U = (-1,0]$ and $V = [\frac{1}{2},1)$. But because this is a metric space there is a distance between $U$ and $V$ and so we can "thicken" that side a bit (by some $0 < \delta < dist(0, \frac{1}{2}) / 2 = |0 - \frac{1}{2}| / 2= \frac{1}{4}$. Thus we can "thicken" $U$ and $V$ to $U = (-1, \frac{1}{8})$ and $V = (\frac{3}{8},1)$ (using $\delta = \frac{1}{8}$) and now we have open sets that separate our original subset, and not the half open sets we had before.
Thus, it is a nice property of metric spaces that let us get away with this so easily. A bit of effort can be put in to do this in more general typologies, but without a good background in topology it gets a bit too symbolic and esoteric to go into without motivating interest.
As a further subnote, it's worth a mention that you should be able to use something along the above reasoning to justify why, if $U \cap V \neq \emptyset$ but $U \cap V \cap A = \emptyset$, then there exists $U'$ and $V'$ so that $U' \cap V' = \emptyset$, $U' \cap A \neq \emptyset$, $V' \cap A \neq \emptyset$, and $A \subset U' \cup V'$.