/

# Matrices¶

Known matrices related to physics

sympy.physics.matrices.mgamma(mu, lower=False)[source]

Returns a Dirac gamma matrix gamma^mu in the standard (Dirac) representation.

If you want gamma_mu, use gamma(mu, True).

We use a convention:

gamma^5 = I * gamma^0 * gamma^1 * gamma^2 * gamma^3 gamma_5 = I * gamma_0 * gamma_1 * gamma_2 * gamma_3 = - gamma^5

http
//en.wikipedia.org/wiki/Gamma_matrices

Examples

>>> from sympy.physics.matrices import mgamma
>>> mgamma(1)
[ 0,  0, 0, 1]
[ 0,  0, 1, 0]
[ 0, -1, 0, 0]
[-1,  0, 0, 0]

sympy.physics.matrices.msigma(i)[source]

Returns a Pauli matrix sigma_i. i=1,2,3

http
//en.wikipedia.org/wiki/Pauli_matrices

Examples

>>> from sympy.physics.matrices import msigma
>>> msigma(1)
[0, 1]
[1, 0]

sympy.physics.matrices.pat_matrix(m, dx, dy, dz)[source]

Returns the Parallel Axis Theorem matrix to translate the inertia matrix a distance of (dx, dy, dz) for a body of mass m.

Examples

If the point we want the inertia about is a distance of 2 units of length and 1 unit along the x-axis we get: >>> from sympy.physics.matrices import pat_matrix >>> pat_matrix(2,1,0,0) [0, 0, 0] [0, 2, 0] [0, 0, 2]

In case we want to find the inertia along a vector of (1,1,1): >>> pat_matrix(2,1,1,1) [ 4, -2, -2] [-2, 4, -2] [-2, -2, 4]

#### Previous topic

Hydrogen Wavefunctions

Pauli Algebra