If EM Waves Travel In Straight Lines, In What Representation Do They Resemble a Sinusoidal Wave? I read somewhere that EM waves don't actually through spaces travel as sinusoidal waves, like how a displaced rope does. (If this is obvious to any of you, blame the secondary education system, not me!) The definition of transverse waves, according to Wikipedia and many sources is

...a wave whose oscillations are perpendicular to the direction of the
wave's advance.

How do we reconcile the definition of transverse waves and the way in which EM waves travel? Also, what is the representation that we mostly see in textbooks that show EM waves traveling as sinusoidal waves?
Please keep in mind that my knowledge of waves is limited to that which could be found in high school physics curricula :)
 A: If you were to place an electric field sensor fixed at a point in space  – conceptually, let's say a small positively charged fin that registered a force upward or downward in proportion to the electric field value and direction (up or down) at that point – and then had a plane EM wave pass by horizontally (in the $x$ direction), you would see this sensor register a sinusoidal force over time
$$\vec F=F_0\cos(\omega t) \hat y$$
If we say the sensor has unit charge, the corresponding $\bf E$ field at that point is
$$\vec E=E_0\cos(\omega t) \hat y$$
Which oscillates in time between $+E_0$ and $-E_0$ in a sinusoidal fashion.
In addition, if while the plane wave is propagating in the $x$ direction, you froze time for an instant and examined the spatial variation of the $\bf E$ field by sliding your sensor in the $x$ direction, you would find the spatial distribution
$$\vec E=E_0\cos(kx) \hat y$$
This spatial sinusoidal "shape," when you unfreeze time, marches forward in the $x$ direction at the speed of light, in such a way that any point will have the time $\vec E(t)$ variation mentioned.
Thus a propagating EM plane wave is represented by:
$$\vec E=E_0\cos(\omega t-kx) \hat y$$
Where $\omega$ is $2\pi×$ the frequency of the wave in Hertz, and $k$ is the wave number ($\rm cm^{-1}$), or 1 over the wavelength (cm). It needs both terms inside the cosine to show the spatial distribution, and also that that distribution moves forward over time.
To your precise question, while the wave only moves linearly in the $x$ direction, the electric field points in the $+$ and $-y$ direction in a sinusoidal fashion. This is why it is a transverse wave.
A "plane wave" simply means that if you were to translate your sensor to any point on the $(y,z)$ plane at a fixed $x$ location, your $E$ field readings above would be exactly the same (at a given moment in time).

(Image Credit: https://www4.uwsp.edu/physastr/kmenning/Phys202/Lect16.html)
A: Note 1. EM waves don't "move" always in straight line. Anyway, EM waves can "move" in straight lines and these waves are defined plane waves.
Note 2. I think that's better to use the verb "propagate" and not "move" when we talk of waves, since waves are a way some signal/information propagates showing a behavior (governed by wave equation and that can be qualitatively imagined as a oscillation moving in space as time runs), and they are not an independent entity/physical quantity, having a motion.
Plane EM waves are oscillations of electromagnetic field (what is an electromagnetic field? We can say that it is some physical quantity that you can measure through its effects on a electric charge or a compass that you use as an instrument) with sinusoidal evolution in space and time, and moreover these oscillations occur in directions that are perpendicular to the direction of propagation of the wave.
Neither electric or magnetic fields are anyway related to displacement in space.
A wave is only a way in which some signals propagate in space and time, whose evolution is governed by wave equation, and it's usually not associated with displacement in the direction of the propagation of the signal.
You can think at other waves in nature:

*

*waves on the surface of a lake, after you throw a rock in it. Where the rock enters the water, it perturbs the lake. This perturbation is transmitted to the surrounding regions through a mechanism that you can describe it as a wave and you can see it as the oscillations of the water surface in the vertical direction, while the wave propagates in the radial direction;

*transversal waves in a sting or in a rope, similarly to the waves in the lake, can be described as a perturbation in the direction perpendicular to the string/rope moves in the direction of the string/rope itself;

*pressure waves: pressure is a scalar, it has not a direction. Pressure waves propagates as a sinusoidal function in space alternating regions of slightly higher and lower pressure

A: EM waves travel with a set frequency and wavelength, and propagate much like a sine wave would. However, they are actually made up of fluctuating electric and magnetic fields, unlike what some high school textbooks might depict. This could be what your source was referring to. You might visualise them through the use of a 3D graph, with one axis representing an oscillating electric field, and the other magnetic. Something like this: 
A: In addition to what the other answers have pointed out, maybe I'll add this, which I think may be the main point of confusion:
A rope is a "physical", massive object comprised of segments/atoms that each have a certain position at any moment in time.* On the other hand, electromagnetic waves are states of the electromagnetic field, which is everywhere and has a specified magnitude and direction at each point in space(-time).

In more detail:
If a rope oscillates, that means that the actual masses which comprise it are moving in one direction or the other. If the rope begins at some position $(x_0, y_0, z_0)$, ends at some position $(x_0, y_0, z_0+L)$ and is oscillating in the $x$ direction, then the rope segment at some "height" $y_0, z$ at time $t$ might be at a position $x = x_0 + A\sin\left(\frac{n\pi z}{L}\right) \sin(\omega t)$ for some $A$, $n$ and $\omega$. In particular, it makes no sense to ask what the position of the rope is at some $y \neq y_0$: The rope simply doesn't exist there.
Now, more pertinent to the question at hand is actually the following: Each piece of the rope has a position, but that's it. A rope doesn't have anything else attached to it; it is a collection of particles (and thus it is essentially describable by purely mechanical theory).
On the other hand, the electromagnetic field $\vec{E}(x,y,z,t)$ is a vector field. There are two main distinctions to the rope case:

*

*The field exists at every point $(x,y,z)$ in space, as mentioned above (hence, instead of mechanics we use what is called field theory to describe such settings).

*At every point in space, there is a vector $\vec{E}$ pointing in some direction with some magnitude. That is to say, at every point in space, there is a vector pointing somewhere, and the vector at $(x,y,z,t)$ is the electromagnetic field at $(x,y,z,t)$. Hence the collection of all of the vectors at all points in spacetime is called a vector field.

The first point means it now makes sense to ask about the EM field at any point in space, as there will be some definite $\vec{E}$ for any point and any time. The second point is what answers the question in my opinion: When we say an EM wave is oscillating, we do not mean that there is some collection of masses or even massless objects** oscillating, but simply that the direction in which the vector $\vec{E}$ is pointing oscillates.
That means that when we say an electromagnetic wave oscillates transversely to its direction of propagation, there is no "rope" moving back and forth, but simply that the direction in which the vector at each position is pointing is moving back and forth.
Extending the example from above to the EM case, we might consider an electromagnetic standing wave of (angular) frequency $\omega$ that is fully polarized in the $x$ direction.*** Then the $\vec{E}$ field at the position $(x_0, y_0, z)$ would be
$$\vec{E}(x_0, y_0, z, t) = E_0 \sin\left(\frac{n\pi z}{L}\right) \sin(\omega t) \begin{pmatrix}1\\0\\0 \end{pmatrix},$$
where $E_0$ is the amplitude (compare to $A$ above) and $n \pi / L \overset{!}{=} \omega/c$ with $c$ the speed of light (the same would hold true for the appropriate speed above).
Note that, crucially, the thing that is oscillating here is not "the EM field itself" in the sense that the rope was oscillating, but just the vector that constitutes the EM field. Note also that the oscillation direction $x$ is transverse to (what is effectively) the direction of propagation $z$, as you mentioned.
Note also that since we assumed a planar wave in the $z$ direction, it doesn't matter if we consider $x_0, y_0$ or any other $x, y$, since the field does exist at those arbitrary other points and is by the planar-wave assumption exactly equal to the value at $x_0, y_0$.
In other words, one could think of the EM wave as a set of rays—or straight lines!—in the $z$ direction, as you mentioned, and the $x$ component of the vector at each point in these rays is what is oscillating, not "the ray" itself.
It is in this sense that EM waves travel both in straight lines while simultaneously oscillating in the transverse direction.

*at least classically, but let's not bother with unnecessary complications here
**Well, if you get into quantum field theory, you could argue about the interpretation of the harmonic oscillators underlying the quantized EM field, but I don't think that's a meaningful discussion to have here.
***I chose a standing wave to make the rope analogy clearer (how would an oscillating rope travel?). The argument works exactly the same for a traveling wave.
