# * -- a binary operator, usually used for multiplication

• Usage:
x * y

## Description

The return type depends on the types of x and y. If they have the same type, then usually the return type is the common type of x and y.

Multiplication involving ring elements (including integers, rational numbers, real and complex numbers), ideals, vectors, matrices, modules is generally the usual multiplication, or composition of functions.

The intersection of sets is given by multiplication. See Set * Set.

 ```i1 : set{hi,you,there} * set{hi,us,here,you} o1 = set {hi, you} o1 : Set```

Multiplication involving a list attempts to multiply each element of the list.

 `i2 : R = QQ[a..d];` ```i3 : a * {b,c,d} o3 = {a*b, a*c, a*d} o3 : List```

Multiplication of matrices (Matrix * Matrix) or ring maps is the same as composition.

 ```i4 : f = map(R,R,{b,c,a,d}) o4 = map(R,R,{b, c, a, d}) o4 : RingMap R <--- R``` ```i5 : g = map(R,R,{(a+b)^2,b^2,c^2,d^2}) 2 2 2 2 2 o5 = map(R,R,{a + 2a*b + b , b , c , d }) o5 : RingMap R <--- R``` ```i6 : f*g 2 2 2 2 2 o6 = map(R,R,{b + 2b*c + c , c , a , d }) o6 : RingMap R <--- R``` ```i7 : (f*g)(a) == f(g(a)) o7 = true```

Submodules of modules may be produced using multiplication and addition.

 ```i8 : M = R^2; I = ideal(a+b,c); o9 : Ideal of R``` ```i10 : N = I*M + a*R^2 o10 = image | a+b 0 c 0 a 0 | | 0 a+b 0 c 0 a | 2 o10 : R-module, submodule of R``` ```i11 : isHomogeneous N o11 = true```

## Ways to use * :

• AffineVariety * AffineVariety
• CC * CC
• CC * QQ
• CC * RR
• CC * ZZ
• ChainComplexMap * ChainComplexMap
• Constant * Constant
• Constant * InexactNumber
• Constant * Number
• Ideal * CoherentSheaf
• Ideal * Module
• Ideal * Ring
• Ideal * Vector
• InexactNumber * Constant
• Matrix * Number
• Matrix * RingElement
• Matrix * Vector
• Matrix * ZZ
• MonomialIdeal * Module
• MonomialIdeal * MonomialIdeal
• MonomialIdeal * Ring
• MutableMatrix * MutableMatrix
• Number * Constant
• Number * Matrix
• QQ * CC
• QQ * QQ
• QQ * RR
• QQ * ZZ
• Ring * Ideal
• Ring * MonomialIdeal
• Ring * RingElement
• Ring * Vector
• RingElement * ChainComplexMap
• RingElement * Ideal
• RingElement * Matrix
• RingElement * Module
• RingElement * MonomialIdeal
• RingElement * MutableMatrix
• RingElement * RingElement
• RingElement * Vector
• RingMap * RingMap
• RR * CC
• RR * QQ
• RR * RR
• RR * ZZ
• Thing * List
• ZZ * CC
• ZZ * ProjectiveHilbertPolynomial
• ZZ * QQ
• ZZ * RR
• ZZ * ZZ
• QQ * BettiTally, see BettiTally -- the class of all Betti tallies
• ZZ * BettiTally, see BettiTally -- the class of all Betti tallies
• CC * InfiniteNumber (missing documentation)
• Constant * RingElement, see Constant
• RingElement * Constant, see Constant
• Constant * InfiniteNumber (missing documentation)
• Expression * Expression, see Expression -- the class of all expressions
• Expression * Holder, see Expression -- the class of all expressions
• Expression * Thing, see Expression -- the class of all expressions
• Holder * Expression, see Expression -- the class of all expressions
• Holder * Holder, see Expression -- the class of all expressions
• Thing * Expression, see Expression -- the class of all expressions
• Ideal * ChainComplex (missing documentation)
• Ideal * Ideal -- product of ideals
• Ideal * MonomialIdeal, see Ideal * Ideal -- product of ideals
• MonomialIdeal * Ideal, see Ideal * Ideal -- product of ideals
• Ideal * RingElement (missing documentation)
• Ideal * ZZ (missing documentation)
• InexactNumber * RingElement (missing documentation)
• InfiniteNumber * CC (missing documentation)
• InfiniteNumber * Constant (missing documentation)
• InfiniteNumber * Matrix (missing documentation)
• Matrix * InfiniteNumber (missing documentation)
• Matrix * Matrix -- matrix multiplication
• Module * RingElement (missing documentation)
• Module * ZZ (missing documentation)
• MutableMatrix * RingElement (missing documentation)
• MutableMatrix * RR (missing documentation)
• MutableMatrix * ZZ (missing documentation)
• Number * IndexedVariable (missing documentation)
• RingElement * InexactNumber (missing documentation)
• RR * MutableMatrix (missing documentation)
• Set * Set -- intersection of sets
• Symbol * Symbol (missing documentation)
• ZZ * MutableMatrix (missing documentation)
• ZZ * Symbol (missing documentation)
• ZZ * Tally (missing documentation)
• ZZ * VirtualTally (missing documentation)

## For the programmer

The object * is .

This operator may be used as a binary operator in an expression like x*y. The user may install binary methods for handling such expressions with code such as

`         X * Y := (x,y) -> ...`

where X is the class of x and Y is the class of y.

This operator may be used as a prefix unary operator in an expression like *y. The user may install a method for handling such expressions with code such as

`           * Y := (y) -> ...`

where Y is the class of y.