Lagrange's Identity

Author

Eric W. Weisstein
October 10, 2005

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Algebra/LagrangesIdentity.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/LagrangesIdentity.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Code

LagrangesIdentity[n_]:=Module[{aa=Array[a,n],bb=Array[b,n]},
Plus@@(aa^2)Plus@@(bb^2)==
Plus@@((a[#1]b[#2]-a[#2]b[#1])^2&@@@Subsets[Range[n],{2}])+(aa.bb)^2
]

Check

Expand//@Table[LagrangesIdentity[n],{n,10}]

Table[LagrangesIdentity[n]/.a_[k_]:>Subscript[a,k],{n,3}]//ColumnForm

Determinant Identity

With[{n=2},{Cross[Sequence@@Array[a,{n-1,n}]].Cross[Sequence@@Array[b,{n-1,n}]],
Det[Outer[Dot,Array[a,{n-1,n}],Array[b,{n-1,n}],1]]}]

Table[
Subtract@@{Cross[Sequence@@Array[a,{n-1,n}]].Cross[Sequence@@Array[b,{n-1,n}]],
Det[Outer[Dot,Array[a,{n-1,n}],Array[b,{n-1,n}],1]]
}//Expand,{n,2,6}]