# Find B in the z-direction.

#### gabriellelee

Homework Statement
Find B in the z-drection
Homework Equations
B = (u/4pi)((3z(z.m)-m)/(|z|^3)) I thought I could replace r^ with z^ and |r|=z since it's only in the z-direction. Is it okay for me to do that?
Also, do I need to consider the magnetic dipole moment, m, only in the z-direction as well? Or can I just keep it as m?

So assuming that I can replace r^ with z^ and keep m as just m. My answer is
Bz(r) = (mu * m) / (2 * pi * (z^3)).
Is this correct? Can I say ^r*^r=1?

Last edited:
Related Advanced Physics Homework Help News on Phys.org

#### mitochan

Hi
Keep $\mathbf{r} \cdot \mathbf{m}$ and $|r|^3$ as they are because they are scalar.
Take z component of vector $3\mathbf{r}$.

#### gabriellelee

Hi
Keep $\mathbf{r} \cdot \mathbf{m}$ and $|r|^3$ as they are because they are scalar.
Take z component of vector $3\mathbf{r}$.
But then how would I get rid of the unit vector if I replace $3\mathbf{r}$ with $3\mathbf{z}$? And it's actually Bz(r). Does that change anything?

#### Delta2

Homework Helper
Gold Member
In addition to what is said in #2, you should also take the z-component of the magnetic dipole moment and put it in place of $m$ at the end (after the minus). (leave the m as it is in the dot product $\hat r\cdot m$.

• mitochan

#### gabriellelee

In addition to what is said in #2, you should also take the z-component of the magnetic dipole moment and put it in place of $m$ at the end (after the minus). (leave the m as it is in the dot product $\hat r\cdot m$.
I think I can consider m as a constant because that's what I will be calculating after I measure the B field of a magnet. So if it's a constant, $\mathbf{\hat{r}} \cdot \mathbf{m}$ becomes $\mathbf{\hat{r}} \mathbf{m}$ and if I replace $3\mathbf{\hat{r}}$ with $3\mathbf{\hat{z}}$ like it says in #2, how would i get rid of the unit vector? Because this is a simple multiplication, not a dot or a cross product. Can I say $\mathbf{\hat{r}} (\mathbf{\hat{z}}) = 0$? So in the end does it become, $B_z= \mu_0m/4 \pi r^3$?

#### Delta2

Homework Helper
Gold Member
But then how would I get rid of the unit vector if I replace $3\mathbf{r}$ with $3\mathbf{z}$? And it's actually Bz(r). Does that change anything?
it isn't right to get rid of $\hat r$ inside the dot product. What is right is to replace $3\hat r$ by its z component which is $3\frac{z}{|r|}=3\frac{|r|\cos\theta}{|r|}=3\cos\theta$
where $\theta$ the inclination angle.

m is a constant vector not a scalar constant so you cant do what you say to the dot product $\hat r\cdot m$.

#### Delta2

Homework Helper
Gold Member
This is getting confusing, you want to get the z component in cartesian coordinates or in spherical coordinates?

#### gabriellelee

This is getting confusing, you want to get the z component in cartesian coordinates or in spherical coordinates?
In the cartesian coordinate

#### Delta2

Homework Helper
Gold Member
Ok so we looking for the function $B_z(x,y,z)$ (and not for the function $B_z(|r|,\theta,\phi$))

First answer what is the z component of the $\hat r$?

#### gabriellelee

Ok so we looking for the function $B_z(x,y,z)$ (and not for the function $B_z(|r|,\theta,\phi$))

First answer what is the z component of the $\hat r$?
Isn't it just $\hat r$?

Homework Helper
Gold Member

#### Delta2

Homework Helper
Gold Member
Isnt the z-component of $\hat r$ equal to $\frac{z}{|r|}\hat z$?

#### Delta2

Homework Helper
Gold Member
$z \hat z/ r$?
ok correct, put that in place of $\hat r$ in the original expression, replacing only the first $\hat r$ and not the second inside the dot product. And then we are almost finished, we just need to express everything in terms of cartesian coordinates or spherical coordinates.

#### gabriellelee

ok correct, put that in place of $\hat r$ in the original expression, replacing only the first $\hat r$ and not the second inside the dot product. And then we are almost finished, we just need to express everything in terms of cartesian coordinates or spherical coordinates.
This is what I got. #### Delta2

Homework Helper
Gold Member
Well there is a slight mistake, the dipole moment $m$ is a constant vector so it will have a z component $m_z\hat z$ put that instead of the second m in the above expression but leave the m inside the dot product unharmed.

#### gabriellelee

Well there is a slight mistake, the dipole moment $m$ is a constant vector so it will have a z component $m_z\hat z$ put that instead of the second m in the above expression but leave the m inside the dot product unharmed. I still don't get why only the first $\hat r$ is replaced with $\hat z$ and same for m for the second one.

#### Delta2

Homework Helper
Gold Member
Because the dot product is a scalar, it depends on the coordinates (x,y,z) (or $|r|,\theta,\phi)$ but its a scalar, it is a quantity that "propagates" as a multiplicative constant to all three components $B_x,B_y,B_z$ of the magnetic field.

Now it is correct to write it more properly with the unit z vector $\hat z$ at the end it will be
$$B_z(r)=\frac{3\mu_0}{4\pi}\frac{z(m\cdot \hat r)-m_z|r|}{|r|^4}\hat z$$

#### gabriellelee

Because the dot product is a scalar, it depends on the coordinates (x,y,z) (or $|r|,\theta,\phi)$ but its a scalar, it is a quantity that "propagates" as a multiplicative constant to all three components $B_x,B_y,B_z$ of the magnetic field.

Now it is correct to write it more properly with the unit z vector $\hat z$ at the end it will be
$$B_z(r)=\frac{3\mu_0}{4\pi}\frac{z(m\cdot \hat r)-m_z|r|}{|r|^4}\hat z$$
Oh, okay. Thank you so much!

• Delta2

#### vela

Staff Emeritus
Homework Helper
Sometimes it's helpful to rely on the math. To find the (scalar) $z$-component of $\vec B$, you calculate
$$B_z(\vec r) = \hat z \cdot \vec B = \hat z \cdot \left[\frac {\mu_0}{4\pi} \frac{3\hat r (\hat r \cdot \vec m)-\vec m}{r^3}\right] = \frac {\mu_0}{4\pi} \frac{3(\hat z \cdot \hat r) (\hat r \cdot \vec m)-\hat z \cdot\vec m}{r^3},$$ evaluating the dot products that you can. There's no need to guess if $\hat r$ is replaced by $\hat z$, etc. Just follow what the math tells you. (If you want the vector component, $\vec B_z(\vec r)$, tack on the $\hat z$ that @Delta2 did in post 18.)
• 