The Casimir operator is an element of the universal enveloping algebra that acts by a scalar on each irreducible Lie algebra module. One has c(μ) = (μ,μ) + 2(μ,ρ), where ρ is half the sum of the positive weights and (,) is the Killing form scaled so that (θ,θ)=2, where θ is the highest root. See Di Francesco, Mathieu, and Senechal, Conformal Field Theory, Springer Graduate Texts in Theoretical Physics, (13.127) p. 512, and (13.46) p. 499.
In the example below, we see that the Casimir operator acts as multiplication by 8/3 on the standard representation of sl_{3}.
i1 : g=simpleLieAlgebra("A",2) o1 = g o1 : LieAlgebra |
i2 : V=irreducibleLieAlgebraModule({1,0},g) o2 = V o2 : g module |
i3 : casimirScalar(V) 8 o3 = - 3 o3 : QQ |