Despite the lack of true vector support, Magic Number’s geometric functions can support multiple arguments which work like multi-dimensional vectors.
Convention
You can use comma or semicolon for function arguments. For examples:
Comma | function (3 , 9) |
Semicolon | function (3 ; 9) |
This is the longest side of a right-angled triangle.
From Pythagorean Theorem, this length is:
Typing the formula is tedious. It’s easier to use the hypotenuse operator.
( shortcut: H )
Enter 3
4Sometimes we know the hypotenuse but we need to find the other side:
The length of adjacent is:
The adjacent function makes this easy.
It is the secondary function of , accessible via shift (⇧).
=
= ⇧HEnter 5 3
Adjacent is not fussy about the order, you can also enter 3 5.
Before we show you the way, let’s look at the math.
The distance d is the hypotenuse. Using Pythagorean theorem:
We can use the hypotenuse operator (⊿ ), this simplifies to
Of course we still need to calculate a and b where
a = x₂ – x₁ and b = y₂ – y₁
Well not anymore. The hypotenuse operator can accept your coordinates and do the rest. That is (x₁, y₁) ⊿ (x₂, y₂)
For example
Just enter (3, 2) ⊿ (7, 5)
Alternatively you can enter (3; 2) ⊿ (7; 5)
Given 2 points (x₁, y₁) and (x₂, y₂), what is the equation of the line in the form of y = mx + b ?
This involves finding the values for m, the slope, and b, the y-intercept.
The adjacent function has a second role.
It can also act as a slope/intercept function. (Shortcut: ⇧H)
It helps to see its icon this way:
Let’s do some math.
What is the equation of the line that passes through (2, 2) and (6, 5)?
Enter (2, 2)(6, 5) and you get 2 results.
This means our equation is y = 0.75 x + 0.5
Also known as the dot product. Hence you use the dot ( • ) operator.
Shortcut: ⌥ .
To calculate enter (1, 2) • (3, 4)
Here is a 3D example:
The polar operator is multi-talented.
( shortcut: < )
Generally, it is used to specify complex number in polar format, in the form of
radius ∠ angle.*
If you have multiple arguments on either side, they will be treated as vectors
and Magic Number will calculate the angle between them.
Let’s find the angle between and
Enter (1, 2) ∠ (3, 4)
* When the radius and angle are complex, they will be also treated as vectors.
Also known as the absolute value.
You find it under Menu ▸ Calculation ▸ Extra Functions ▸ Complex Numbers.
Here is a 4D example:
Also known as the cross product.
Unlike scalar product, the vector product is limited to 3-dimensional vectors.
For this, you use the normal multiplication sign ×
You get 3 numbers for your result; these are the coordinates of the 3D vector.