Friday, August 31, 2018

An Electromagnetic Field Tensor


 From a mathematical perspective electromagnetic theory consists of laws of nature expressed in terms of vector analysis.



But what would we see if we looked at EM theory from a more physical perspective focusing on the forces and changes in momentum instead? We can start with the Lorentz force which involves electric and magnetic fields. The electric force produces changes in the motion of a charged particle in the direction of the electric field. The magnetic force involves changes in position and gives the deflection of the path of motion. So for differential changes in time and position we can associate changes in momentum or impulses acting on the particle.



It turns out that the fields are the coefficients of the differential changes in position and time that give the changes in momentum. We can add the change in energy or work done on the particle to the momentum changes to get a 4-dimension picture of what's happening. And we end up with a field tensor, the result of applying the chain rule to each component of the momentum. So the field tensor can be expressed in terms of 4-dimensional gradients of the components of a momentum flow field describing the paths of identical test particles in neighboring positions. This appears to have been the approach that Maxwell adopted for EM theory.

A Short Timeline for Early Electromagnetic Theory


  The introduction to electromagnetic theory usually involves mathematical statements of the physical laws governing the relations between forces, charges and their motion and the more abstract fields. Here are some Wikipedia articles dealing with some of the more important ones.

1785 Coulomb's law

1813 Gauss' Law

1820 Biot-Savart law

1820 Oersted's law

1823 Ampere's force law

1831 Faraday's law of induction

1855 Ampere's circuital law (Maxwell)

In the twenty years between 1855 and 1873 Maxwell wrote a number of works on electricity and magnetism attempting to develop mathematically Faraday's impressionistic lines of force approach to the subject.

1855 Maxwell, On Faraday's Lines of Force

1861 Maxwell, On Physical Lines of Force

1865 Maxwell, A Dynamical Theory of the Electromagnetic Field

1873 Maxwell, A Treatise on Electricity & Magnetism Vol 1, Vol 2

Part III of A Dynamical Theory of the Electromagnetic Field deals with the General Equations of the Electromagnetic Field in which Maxwell introduces such concepts as "electromotive force," "electromagnetic momentum," "magnetic force" and "electromotive force in a circuit." These deal with force fields rather than electric and magnetic fields and his approach appears to be less abstract than our modern theory of the subject. One can compare Maxwell's formulas with those in modern notation.

Tuesday, August 28, 2018

Why the Assumption of an Impulse Acting on Light May Have Worked


  If one looks at the change in phase in the plane of refraction along the boundary between the two media one sees that the two components of the wavevector are the same for both wave functions thus enabling us to match them along this line.


When we tried to explain refraction by the assumption of a vertical impulse acting on photons at the boundary we inadvertently assumed that the component of the wavevector on the boundary in the plane of refraction remained unchanged since the momentum of the photon is proportional to its wavevector.

Monday, August 27, 2018

A Physical Explanation of Refraction


  One can trace Snell's law of refraction to the boundary conditions acting on the electromagnetic wave equations for the electromagnetic fields. To show this we can assume that the incident, reflected and refracted rays are simple plane waves.


In what follows let ψ represent an arbitrary electric or magnetic field component. In the first medium the field is a sum of the incident and reflected fields and there is only one field in the second medium. The relation between the angular frequency, wavelength and phase velocity, ω=kvph=kc/n allows us to express the wave vectors for each medium in terms of the magnitude, k=nω/c, of the corresponding wave vector in a vacuum. We assume the plane of incidence is the x,y-plane with horizontal axis x and vertical axis y. Along the boundary between the media y=0. For reflection we know that the reflected angle is equal to the angle of incidence so we can set β equal to α. This allows us to simplify the field equation for the first medium slightly. If a field is continuous along the boundary then its derivative will also be the same for both media.


Equating these functions we get two equations for the wave amplitudes Ak and the second equation yields Snell's law after eliminating the common factors.



So the continuity of the fields appears to be the physical cause for the "broken" or refracted light path. The wave vectors do not depend on the values for the incident fields but we can expect the amplitudes of the reflected and refracted rays to depend on them.

Thursday, August 23, 2018

Interpreting Snell's Law of Refraction


  Back to Hamilton's Theory of Systems of Rays. How does one explain Snell's law of refraction where the index of refraction n=sini/sinr? Mathematically it's just a description of the relation between the paths of the incident ray and the refracted ray. Is there anything significant about the length of the lines corresponding to the sines? They're the altitudes of the triangles with vertices i, n̂₁, and the origin and that for r, n̂₂ and the origin but the ratio of the areas of these triangles is also equal to the index of refraction.


These triangles are isosceles so we could draw the altitude as perpendicular to the rays instead.


What we want is some sort of physical explanation for the law of refraction. We can find this in Feynman's Lectures on Physics, Vol I where the index of refraction is attributed to a phase change due to secondary waves caused by forced oscillations of the electrons in a plate of the transparent body and not a change in the speed of light in the refracting medium. The derivation assumed that the index of refraction differed by a small amount from that of a vacuum which is 1. The relation for a denser medium is found in Vol II. This explanation is essentially that of the classical dispersion theory introduced by Paul Drude a little over a century ago. A formula for normal dispersion can be found in his Lehrbuch der Optik of 1900.

Tuesday, August 21, 2018

Equivalent Quaternion Simplifies Calculations


Using an equivalent rotation quaternion requires less calculation to obtain the same results. In this slightly modified version of the previous rotation one just needs to keep track of the poles, their rotation quaternions and changes to the required data.


After computing the equivalent rotation quaternion we can rotate the data points for the vertices of the tetrahedron.


In the plot below the color code red, green, blue indicates the vertices a, b and c and the axes , , respectively. The fourth vertex was originally the origin before it was translated to the center of the tetrahedron.


In Excel the worksheet is automatically recalculated when the contents of a cell is changed so when the index is changed by pressing either the shift right or shift left command button the plot is also recalculated and we can observe the resulting rotation.

Note one needs to be careful not to confuse the axes used to determine a rotation with axes that are rotated which are treated as data. Here the original  and  axes were used to determine the pole p̂' while the rotated k̂'' axis was used for p̂''.

Monday, August 20, 2018

Doing Stepped Rotations in Excel


  I've been trying to get Excel to do some simple rotation videos using command buttons to step a plot through the rotations and Power Point's record tool to capture a video. This is the best system that I have been able to come up with so far.


The image in the Blogger player is a little initially but clicking on it clears things up considerably. It doesn't appear that QGraphics is ready quite yet.

Sunday, August 19, 2018

Replacing a Series of Rotations With an Equivalent Rotation


 One can simplify the rotation of a set of data by replacing the series of rotations with a single equivalent rotation q̂eq=q̂''q̂'q̂. We need to follow the actions of the rotations on â and its images to compute the series of q̂s.


Next q̂eq is used to transform the data by setting x'=q̂eqxq̂eq*. This action was performed by a user function Qrot(p,q̂,x) acting on the upper left corner of the transformed data table followed by drag and fill to complete the table. One only needs to pass the pointer p, the rotation quaternion q̂, and the data point x to Qrot.


One can plot the transformed data along with a set of transformed axes.


Note that the equilateral triangle is in the transformed î,ĵ-plane.

edit (Aug 19): Did some minor cleanup by changing x̂→x used to represent a data point since the data does not have to have unit magnitude.

Saturday, August 18, 2018

Results of the Previous Example Using the Hamilton Half-angle Formula


  Hamilton's quaternion half-angle rotation formula gives exactly the same results for the series of rotations in the previous blog with less calculation.

Equilateral triangle calculation,


Calculation for rotation by angle α about =,


Calculation for rotation by angle β about p̂'=â'k̂,


Calculation for rotation by angle γ about p̂''=â'',


An Example Involving a Series of Rotations


  We can do a series of rotations to show that they do not affect the area of a parallelogram. We start with two vector quaternions that along with the origin form an equilateral triangle. The quaternion product gives us the area of the two parallelograms. Next we find the set of  projections vectors for the vectors to be rotated starting with a rotation of angle α about . Next we compute the pole for a rotation of angle β in the â',-plane. Finally we do a rotation of angle γ about â".


We first check the calculations done with the algebraic expressions with numerical calculations and compute the magnitude of the vector part of the product.


Doing the rotation of α about  gives,


And a rotation of β about â' gives,


Finally the rotation of γ about â" gives,


Note that the magnitudes of the scalar and vector parts of the products are unchanged by the rotations. This method is rather cumbersome since we need the polar, normal and binormal parts for each vector rotated. Hamilton's half angle triple products do not need them and the same  works for all points subject to the same rotation.

Improved Quaternion Rotation Formulas


  One can use a vector quaternion to represent the pole of a rotation. To do the rotation of any vector quaternion properly one has to one has to partition the quaternion into polar and normal parts, vp and vn. We need a third vector in the plane of rotation, the binormal, vb, to do the rotation.


Another formula for rotating quaternions was given by Hamilton and is explained in Kellog and Tait's Introduction to Quaternions. Since the square of the magnitude of q̂ equals 1, we can replace -1 by its conjugate q̂*. We start by setting =1cosφ+ sinφ. The product of the three quaternions gives essentially the same formula for the rotation but with θ replaced by 2φ.


A Geometric Interpretation of the Product of Two Quaternions


  If we multiply two vector quaternions we get a third quaterion which we can decompose into scalar and vector parts. We can rewrite the vector part as the product of a unit vector quaternion and a scalar magnitude. The two magnitudes turn out to be equal to the product the magnitudes of the original quaternions and either a cosine or sine factor.


This suggests the interpretation of the magnitudes of the two parts of the quaternions as the area of two "complementary" parallelograms. The upper parallelogram below is corresponds to the magnitude of the vector part of the product ba or absinθ. The lower parallelogram has the complement of angle θ between a and b' and the sine of this equals cosθ so its product is abcosθ, the magnitudes b and b' being equal.


Friday, August 10, 2018

Finding the Quaternion Needed to Do a Specified Rotation in a Given Plane


  Since there is no help available for user defined functions it's easier to use mnemonic names for them involving their variables in the correct order. The functions below are some of the common operations performed with quaternions. The conjugate of a quaternion is defined as a quaternion with the same scalar part but with the the signs of the vector parts changed. The square of the magnitude of quaternion a equals a*a. A simple way to find the quaternion b/a is to multiply both the numerator and denominator by the conjugate of the denominator so we have b/a=a*b/a*a and the division is reduced to a division by a scalar. The range pointer p is assumed to take the integer values from 1 to 4.


To define a plane through the origin one needs two additional points in the plane. Let a be a unit quaternion in the direction in which the desired plane crosses the x,y-plane. And let b be a second unit quaternion at angle φ in the x,y-plane. The quaternion that will rotate a to b is q=b/a. Suppose next we look for another rotation with fixed φ that will take a'=b to b' or q'=b'/a'. Combining the two rotations we get r=q'q which specifies the direction of the normal to the plane of rotation and with the magnitude of the vector part equal to the sine of the angle of rotational step. If we want to switch to a new step size we need to divide r by the sine of the first step and multiply by the sine of the new step which we will take to be Δθ=2π/24. The rotations used to define the plane of rotation are the angles used in spherical coordinates but one could use Euler angles instead. In general one just needs two quaternions specifying two points in the plane of rotation.


Repeatedly multiplying the starting position a by the modified r results in the following plot. The quaternions i, j, k are included to show the relative orientation of the observer and r is the required modified rotation quaternion.


Wednesday, August 8, 2018

Repeated Quaternion Multiplications in Excel


  We can do repeated quaternion multiplications in Excel by a method similar to that used for complex multiplications with the user function qMult(p,a,b). To find the constant multiplier needed below we find q=a/b=a(-b/|b|)=-ab then do the row of multiplications.



The VBA code for qMult(p,a,b) is as follows. Note the change in the order of the variables with the pointer p given first.


Using this drag and fill method gets around some of the limitations of user functions in Excel.

edit (Aug 8): Did some cleanup on the first image. p and q are now in the first row and with 1, i, j, k showing for the second row of multiplications. Corrected mislabeled axes in the plot.

A Simple Method for Doing Repeated Complex Multiplications in Excel


  One can use the drag and fill method to do repeated complex multiplications in Excel. After entering data for the pointer p and complex numbers a and b saved as 2-vectors one enters the first formula into upper left cell of the product range. One then clicks on the square box at the lower left of the cell with the left mouse button, drags it down one row and releases the button. One again clicks on the button with both cell selected and drags it to the right to fill the remaining column. Note that only the column of b is not fixed in the formuls to allow for drag and fill down and to the right.



Here's the VBA code for the user function cMult(a,b,p):


Note well that the indices for the ranges of a and b start at 1 so it would be best if the values of the pointer corresponded to this count. One needs to be careful about exceeding the bounds of the range but this should be considered an Excel user responsibility. Don't forget one can use the undo button to backstep worksheet entries and undo mistakes.


Tuesday, August 7, 2018

Doing Higher Algebra on Excel


  It helps if you have an Excel user function like qMult( ) to multiply quaternions for you.


Supplemental (Aug 8): Here are formulatexts showing the cell contents produced by drag and fill. One has to used fixed ranges to specify the quaternions. The last variable of the function acts as a pointer specifying the relative position within the product destination range and allows the drag and fill method to work properly.


Hamilton's Quaternions


 Let's take a break from Hamilton's Theory of Systems of Rays and take a look at his quaternions while they are still fresh on my mind from some recent work.

We start with the unit vectors of a Cartesian coordinate system, i, j, and k, and try to construct a table for a binary operation, ◦, on them. We first choose i◦j=k, j◦k=i, and k◦i=j. In analogy with complex numbers where i=√-̅1̅ and i²=-1 we let i◦i=-1, j◦j=-1, and k◦k=-1. Using the multiplication rules of ordinary multiplication we deduce j◦i=-k, k◦j=-i, and i◦k=-j and so we have a table for the binary operations on the vectors.


This table contains the element 1 which is an ordinary number or scalar and so we can include scalar multiplication for closure and obtain a more complete table involving all the elements.


A quaternion is a linear combination of these four elements multiplied by four coefficients so q=1q₀+iq₁+jq₂+kq₃ like ordinary vectors. If you have problems with the logical consistency of adding scalars and vectors we can think of the identity element 1 as a fourth independent vector. Using the rules of ordinary algebra we can define the "product" of two quaternions p=q2◦q1 and use the table to find the products of the elementary units.


Here's a sample calculation involving the product of two quaternions.


One can deduce the following formulas involving only the coefficients to help simplify the calculations in Excel.


Supplemental (Aug 7): The starting point in constructing the operator table was identifying a set of normal vectors for the three pairs of vectors. One can think of the operator ◦ as a composite operator defined on a composite field. Hamilton may have been influenced by Galois' earlier work. One can associate 90° rotations with the multiplication of one vector element by another. The quaternions form a group.

Supplemental (Aug 7): Here are some early works on complex numbers

  Wallis, On Negative Squares (Latin) 1673

  Wessel, On the Analytical Representation of Direction (Danish) 1797

  Smith, A Source Book in Mathematics, English translations

Sunday, August 5, 2018

Do Forces Act on Photons?


  At first glance evidence appears to support the assumption that light receives an impulse on entering a denser medium but that implies photons are acted on by forces. The same could be said for reflection and Compton scattering since there is a change in the direction of of the photon's motion. Radiation pressure and emission recoil also suggest the photons experience momentum changes. Even x-rays whose wavelength is small compared to atomic spacing are slightly refracted.

An alternative explanation is a change in the nature of the medium. Maxwell's electromagnetic wave equation tells us that the speed of light depends on the permeability and permittivity of the medium but how does that explain the change in the direction of the photons? Huygens' principle explains the change in the direction of the wavefront of a single plane wave as due to the phase difference along the boundary of the medium and reduced speed in the denser medium. 

Another explanation of refraction is the induction of secondary waves in the medium. 

We use logical implication to reject premises whose conclusions do not agree with observation. One concludes that if the results are false the premises must also be false since truth is not deceiving. The problem is that false premises and arguments can yield truthful conclusions. So we are left in a quandary. 

We can look for more facts concerning refraction such as the Fresnel equations for the transmission and reflection of light at boundary between two media but the coefficients are consistent with the deductions so we have nothing contrary to the premises. 

Fresnel, Mémoire sur la Loi des modifications de la réflexion imprime á la lumière polarisée

What might be the nature of a boundary force capable of deflecting light? The General Theory of Relativity tells us that the path of light is affected by gravitational fields. Matter also has cohesive forces that hold its particles together. It is surrounded by a potential field that extends beyond its boundaries that exert forces on nearby particles. Can we rule out such a cohesive force also acting on light?