Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Is there an easier way to enter KroneckerDelta[n,m] in Mathematica?

When I use the notation $ \delta_{n,m} $, it won't work.

share|improve this question
1  
You can still define delta[m_,n_]:=KroneckerDelta[m,n] if you like :) –  Öskå Apr 23 at 13:52
1  
In version 9, with autocompletion enabled, only 3 letters are needed. –  Silvia Apr 23 at 14:13
1  
You can enter the $\delta_{n,m}$ in a TraditionalForm equation cell, and then copy the equation into an input cell. That cell can then be evaluated if you allow Mathematica to interpret TraditionalForm input in the resulting dialog box. If you want more streamlined input, this is essentially the same as: Can I enter the traditional form for Binomial as input in an expression? –  Jens Apr 23 at 14:28
1  
Would it be worthwhile to reformulate this question to something of the type, "What methods are available to simplify entering long function names in Mathematica"? Having a single location for answers such as those posted in the comments might be beneficial to this community. –  bobthechemist Apr 23 at 16:41

2 Answers 2

up vote 5 down vote accepted

Just

Subscript[\[Delta], m_, n_] := KroneckerDelta[n, m]

or am I missing something?

share|improve this answer
    
You might want to use ^:= so that the rule gets attached to \[Delta] instead of Subscript –  celtschk Apr 25 at 16:38

You can use the Notation package.

<< Notation`

Use the Notation palette that automatically pops up to define the required notation.

Notation[Subscript[\[Delta], m_, n_] \[DoubleLongLeftRightArrow] KroneckerDelta[m_, n_]]

NOTE: This is only a "summary" of the required definition. You have to enter the full definition using the (first button on the) Notation palette, and then fill in the placeholders. You can enter the lefthand placeholder as $\delta_{m\_,n\_}$.

Now check that your input generates the intended FullForm expression. You can enter Subscript[\[Delta], m, n] as $\delta_{m,n}$.

Subscript[\[Delta], m, n] // FullForm

(* KroneckerDelta[m, n] *)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.