Go Multiplication

0 views
Skip to first unread message

Cora Auch

unread,
Aug 5, 2024, 12:45:08 AM8/5/24
to nagedori
Theproduct of two measurements (or physical quantities) is a new type of measurement, usually with a derived unit. For example, multiplying the lengths (in meters or feet) of the two sides of a rectangle gives its area (in square meters or square feet). Such a product is the subject of dimensional analysis.

The inverse operation of multiplication is division. For example, since 4 multiplied by 3 equals 12, 12 divided by 3 equals 4. Indeed, multiplication by 3, followed by division by 3, yields the original number. The division of a number other than 0 by itself equals 1.


Several mathematical concepts expand upon the fundamental idea of multiplication. The product of a sequence, vector multiplication, complex numbers, and matrices are all examples where this can be seen. These more advanced constructs tend to affect the basic properties in their own ways, such as becoming noncommutative in matrices and some forms of vector multiplication or changing the sign of complex numbers.


The numbers to be multiplied are generally called the "factors" (as in factorization). The number to be multiplied is the "multiplicand", and the number by which it is multiplied is the "multiplier". Usually, the multiplier is placed first, and the multiplicand is placed second;[1] however, sometimes the first factor is the multiplicand and the second the multiplier.[10]Also, as the result of multiplication does not depend on the order of the factors, the distinction between "multiplicand" and "multiplier" is useful only at a very elementary level and in some multiplication algorithms, such as the long multiplication. Therefore, in some sources, the term "multiplicand" is regarded as a synonym for "factor".[11]In algebra, a number that is the multiplier of a variable or expression (e.g., the 3 in 3 x y 2 \displaystyle 3xy^2 ) is called a coefficient.


The product of two numbers or the multiplication between two numbers can be defined for common special cases: natural numbers, integers, rational numbers, real numbers, complex numbers, and quaternions.


An integer can be either zero, a nonzero natural number, or minus a nonzero natural number. The product of zero and another integer is always zero. The product of two nonzero integers is determined by the product of their positive amounts, combined with the sign derived from the following rule:


As changing the signs transforms least upper bounds into greatest lower bounds, the simplest way to deal with a multiplication involving one or two negative numbers, is to use the rule of signs described above in Product of two integers. The construction of the real numbers through Cauchy sequences is often preferred in order to avoid consideration of the four possible sign configurations.


Many common methods for multiplying numbers using pencil and paper require a multiplication table of memorized or consulted products of small numbers (typically any two numbers from 0 to 9). However, one method, the peasant multiplication algorithm, does not. The example below illustrates "long multiplication" (the "standard algorithm", "grade-school multiplication"):


Multiplying numbers to more than a couple of decimal places by hand is tedious and error-prone. Common logarithms were invented to simplify such calculations, since adding logarithms is equivalent to multiplying. The slide rule allowed numbers to be quickly multiplied to about three places of accuracy. Beginning in the early 20th century, mechanical calculators, such as the Marchant, automated multiplication of up to 10-digit numbers. Modern electronic computers and calculators have greatly reduced the need for multiplication by hand.


The Ishango bone, dated to about 18,000 to 20,000 BC, may hint at a knowledge of multiplication in the Upper Paleolithic era in Central Africa, but this is speculative.[13][verification needed]


In the mathematical text Zhoubi Suanjing, dated prior to 300 BC, and the Nine Chapters on the Mathematical Art, multiplication calculations were written out in words, although the early Chinese mathematicians employed Rod calculus involving place value addition, subtraction, multiplication, and division. The Chinese were already using a decimal multiplication table by the end of the Warring States period.[15]


Grid method multiplication, or the box method, is used in primary schools in England and Wales and in some areas[which?] of the United States to help teach an understanding of how multiple digit multiplication works. An example of multiplying 34 by 13 would be to lay the numbers out in a grid as follows:


One can only meaningfully add or subtract quantities of the same type, but quantities of different types can be multiplied or divided without problems. For example, four bags with three marbles each can be thought of as:[1]


When two measurements are multiplied together, the product is of a type depending on the types of measurements. The general theory is given by dimensional analysis. This analysis is routinely applied in physics, but it also has applications in finance and other applied fields.


In such a notation, the variable i represents a varying integer, called the multiplication index, that runs from the lower value 1 indicated in the subscript to the upper value 4 given by the superscript. The product is obtained by multiplying together all factors obtained by substituting the multiplication index for an integer between the lower and the upper values (the bounds included) in the expression that follows the product operator.


When multiplication is repeated, the resulting operation is known as exponentiation. For instance, the product of three factors of two (222) is "two raised to the third power", and is denoted by 23, a two with a superscript three. In this example, the number two is the base, and three is the exponent.[24] In general, the exponent (or superscript) indicates how many times the base appears in the expression, so that the expression


In the book Arithmetices principia, nova methodo exposita, Giuseppe Peano proposed axioms for arithmetic based on his axioms for natural numbers. Peano arithmetic has two axioms for multiplication:


The product of non-negative integers can be defined with set theory using cardinal numbers or the Peano axioms. See below how to extend this to multiplying arbitrary integers, and then arbitrary rational numbers. The product of real numbers is defined in terms of products of rational numbers; see construction of the real numbers.[29]


There are many sets that, under the operation of multiplication, satisfy the axioms that define group structure. These axioms are closure, associativity, and the inclusion of an identity element and inverses.


A simple example is the set of non-zero rational numbers. Here identity 1 is had, as opposed to groups under addition where the identity is typically 0. Note that with the rationals, zero must be excluded because, under multiplication, it does not have an inverse: there is no rational number that can be multiplied by zero to result in 1. In this example, an abelian group is had, but that is not always the case.


To see this, consider the set of invertible square matrices of a given dimension over a given field. Here, it is straightforward to verify closure, associativity, and inclusion of identity (the identity matrix) and inverses. However, matrix multiplication is not commutative, which shows that this group is non-abelian.


Here is a misbehaviour (already present in real Mathcad, too) that I would classify as a bug, since IMHO an implicit multiplication should be treated exactly the same as an explicitly stated one. An implicit multiplication should be just that and nothing more, not additionally an implicit pair of parenthesis, too.


And, yes, I am aware that some authors use different parsing rules and give priority to implicit multiplications over "normal" multiplications and divisions. But I am not aware of a reliable source that would give implicit multiplication a special place in the order of operators. Although no authoritative literature, Wikipedia also does not grant implicit multiplications a special position. _of_operations


I also am curious if someone can point me to a trustworthy source which defines that different parsing rule where implicit multiplications have precedence over "normal" ones. I have always seen it as a simple abbreviation laid down in a standard.


But even if you don't do so, the normal rules of math concerning precedence of operators must apply. Division and multiplication are on the same level and so must be applied following the left to right order. Prime and Mathcad do this correctly when you use an explicit multiplication symbol.


So the problem is not any missing pair of parenthesis when using the inline division, but Primes/Mathcads (IMHO inconsistent) handling of the implicit multiplication. So I was looking for some reliable source covering a possible exceptional position of the implicit multiplication to be applied before any other divisions and multiplication - but to no avail. (So I consider the different handling of explicit and implicit multiplication to be a bug.)

The standard is not of much help here as it only succinctly says that you may omit the multiplication symbol "if no misunderstanding is possible". Given that misunderstanding is always possible. this is an unhelpful formulation


The numpy docs recommend using array instead of matrix for working with matrices. However, unlike octave (which I was using till recently), * doesn't perform matrix multiplication, you need to use the function matrixmultipy(). I feel this makes the code very unreadable.


The main reason to avoid using the matrix class is that a) it's inherently 2-dimensional, and b) there's additional overhead compared to a "normal" numpy array. If all you're doing is linear algebra, then by all means, feel free to use the matrix class... Personally I find it more trouble than it's worth, though.

3a8082e126
Reply all
Reply to author
Forward
0 new messages