Relations exist in different types, namely:

- Relation between a cell and its row/column indices
- Relation between a cell and other cells
- Relations for the table as a whole

You can specify all these types of relations with the Math Table interaction type.

Every cell, whether it is of type Math, Text, or Input, can use the special variables *row* and *col*. Row 1 is the first non-header row and column 1 is the first non-header column. This implies that the top header in the image above has a row index of 0. If there are multiple headers, the row index will be negative.

You can refer to the content of a Math cell or an Input cell through the *cell* function, which takes the row index and column index as arguments respectively.

The example above shows a table corresponding to the Fibonacci sequence.

**Relations and free input**

A powerful feature of these relations is that the values of the cells do not to be known in advance. You can create a Math Table where a student is free to choose some values. Consider the example below, where the student has to create a table for a given function. The student is free to choose the values for *x*, while the relations enforce that these *x*-values are increasing and that the values for *y* are correct.

This example illustrates a situation where you want to specify a condition on the table. The student is required to try different divisors of -30, until a pair is found that sums to -13.

The Input cells in columns 2 and 3 are of type Math Entry and allow any integer divisor of -30. The Input cells in the last column are of type Algebra with the task to sum the two divisors.

The student has successfully finished the table when the correct divisors are found, which are -15 and 2. It doesn’t matter in which row these divisors are written or in which order the divisors are given, as long as they exist. This requires a condition like “These exists a cell in the last column with value -13”.

Such a condition can be created under the Table tab:

- Check the ‘Existence’ check box to indicate that the condition is valid if a cell can be found that satisfies it. If this checkbox is not checked, then all cells need to satisfy the condition.
- Click the button ‘change…’ to select the range of cells that apply to this condition. In our case, these are the cells in the last column
- Enter the condition in the formula box. The variables
*r1*and*c1*are the row and column index of the cell that meets the condition (if any). - Specify that the problem is finished if a cell is found that matches this condition. Specify feedback in case it is not found.

Note that the student input is evaluated as correct only if all the conditions in the cells and the table condition are satisfied. So just entering the number -13 in the last column is not a valid answer.

To create a number line interaction, select Number Line in the list of interactions and click **Select**.

The Number Line interaction consists of three main fields:

- Solution Editor
- Details editor
- Settings editor

Note

In comparison with the Geometry interaction, this interaction has no Evaluation Criteria. These are indirectly created by the elements defined in the Solution mode in the Details editor, combined with the Tolerance settings.

**Solution Editor**

The Solution Editor contains all available options for creating, moving and deleting elements from the Number Line interaction panel. The editor is used by the author to define elements visible to the student and elements for evaluation.

**Details editor**

Using the Mode toggle button, you can define whether you want to add Template elements (visible to the student) or Solution elements (used for evaluation).

The elements created in the Solution Editor, are listed in the Details editor. In case there are elements available in both modes, subgroups are created in the list per mode.

For point elements in the Details editor, additional settings are available when clicking on the element. You can refer to script variables if you want to create a randomized version of the exercise, or you can manually update the position values of the created element.

**Settings editor**

In the settings editor you can setup the layout of the student interaction for the number line and define the evaluation mechanism.

The following settings are currently available:

In the General settings, you can set the tolerance and define whether you want to hide the Toolbar. This last option is particularly useful in case you want to use the number line as a resource/image rather than as an interactive component.

The tolerance defines the error margin a student has for drawing the elements on the number line. The values you can enter are either decimal values (decimal point separated) or integer values.

The values correspond with the scale of the number line. That is, if your number line ranges from 0 to 10, and you set the tolerance to 1, a student is allowed to enter a point between 5 and 7 for the point at coordinate 6.

The Boundaries settings are used to define the lowest and highest value of the number line.

With the following settings:

The number line would look like this (starting at 0, ending at 10):

For more detailed settings on the ticks, refer to the Ticks settings below.

The Guide Lines setting is available to define the amount of guidelines on which number line elements can be created. You can create multiple guidelines to prevent overlap of intervals. Note that only the horizontal position of an element is taken into account for evaluation. Increasing the number of guide lines is merely a visual enhancement to create a more clear number line.

With an amount of 3 number lines, you can create a setting such as:

The Regular Ticks settings control the regular step markings of the number line, commonly named ticks. These are split between major ticks, longer markings that can display their axis value, and minor ticks, shorter markings to indicate smaller increments.

The step size between major ticks is controlled using the Major Step field. The number of minor ticks per major step are indicated with the Minor Divisions input field.

Labels of major ticks can be disabled to only show the step markings. Moreover, the regular ticks can be disabled altogether, resulting in a blank horizontal axis for displaying Custom Ticks (see below) only.

For example:

Will result in a number line with 1 subdivision per major step, and the major steps labelled per integer:

Custom Ticks are disabled by default, but can be enabled to define your own marked positions. The Positions list can be extended number-by-number to provide an array of irregular ticks to occupy the number line axis. The values entered should be integer or decimal values, written with a decimal point if applicable.

Note that custom ticks can be used in tandem with regular ticks to highlight specific values.

For example:

Will result in two custom ticks below the number line:

The following example shows a stage that matches if the student input is an integer and even number.

You can define multiple conditions. The evaluation criterium matches when all conditions are valid.

]]>Evaluation mode | Description |
---|---|

Mathematically equal | Two expressions are mathematically equal if their difference is equal to zero.Example\left|x\right| \sqrt{1+x} is mathematically equal to \sqrt{x^2+x^3} |

Mathematically equal, solve for variable | Applies to relations. Two relations are equal if their solutions for the given variable are mathematically equal.Examplex+y=1 is equivalent to y=1-x |

Same expression, commutative | The expressions must have the same form, except for the order of commutative operations, such as +, -, and =.Example1+x\cdot y^2+x^2 and x^2+y^2\cdot x+1 are equal up to commutativity. |

Same expression, literal | The expressions must be exactly the same. This is in fact a textual comparison, where only extra spaces are neglected. Note: The expression does not have to be valid mathematics. ExampleThe expected answer could be something like “y=“, which is not a valid mathematical expression. |

The first part of the form specifies the criteria to match this stage. The second part defines the result in case the criterium does or does not match.

There are two types of evaluation criteria: **equality **or **condition**.

You can specify that the input must be compared to one or more predefined answers. Use the evaluation mode to specify what kind of equivalence should be applied.

Evaluation mode | Description |
---|---|

Mathematically equal | Two expressions are mathematically equal if their difference is equal to zero.Example\left|x\right| \sqrt{1+x} is mathematically equal to \sqrt{x^2+x^3} |

Mathematically equal, solve for variable | Applies to relations. Two relations are equal if their solutions for the given variable are mathematically equal.Examplex+y=1 is equivalent to y=1-x |

Same expression, commutative | The expressions must have the same form, except for the order of commutative operations, such as +, -, and =.Example1+x\cdot y^2+x^2 and x^2+y^2\cdot x+1 are equal up to commutativity. |

Same expression, literal | The expressions must be exactly the same. This is in fact a textual comparison, where only extra spaces are neglected. Note: The expression does not have to be valid mathematics. ExampleThe expected answer could be something like “y=“, which is not a valid mathematical expression. |

Was this helpful?

0 / 0

A more general criterium than equality checking is the criterium based on a condition. Such a condition could be: “the input must be a positive number”. This can be written mathematically as var>0, where var represents the student input.

The following example shows a stage that matches if the student input is an integer and even number.

You can define multiple conditions. The evaluation criterium matches when all conditions are valid.

Was this helpful?

0 / 0

Next, you define the result of the stage, based on the output of the criterium. The following options are available:

Final answer | The student input is accepted as the final answer for this question. |

Intermediate step | The student input is evaluated as correct, but not finished. |

Error | The student input is incorrect. You must specify a feedback message which will be shown to the student. |

No action | Proceed to the next stage. |

You specify how the student’s input is evaluated through a list of **evaluation stages**. AlgebraKiT will evaluate these stages in the order that they are specified and stop at the first stage that matches the student input.

Consider the following example, which defines three stages to evaluate the student’s input.

The first stage matches the expression y=x^2+x and its commutative variations, which are y=x+x^2, x^2+x=y and x+x^2=y. If the student inputs any of these expressions, then this input will be evaluated as a correct final answer.

If the student enters the expression y=x\cdot x+x\cdot 1, then the first stage is not satisfied and AlgebraKiT will proceed to the next stage. This stage matches because the input can be rewritten to y=x^2+x. The stage specifies that the input should be evaluated as an intermediate step. Therefore, the student will see that his input is correct but not yet finished.

If the student enters the incorrect expression y=x\cdot x + 1, then also the second stage does not match, but the third one does. This stage specifies that error feedback should be given. The feedback is specified by the author as we will see later.

If none of the stages match the student input, then AlgebraKiT will assume that the input is incorrect. There is an exception: If no evaluation stages are specified, then AlgebraKiT will accept every input as the final answer.

]]>A **variable** is a sequence of symbols. Allowed symbols are letters, digits, and the underscore. The first symbol must be a letter.

You can create a definition using the symbol **:=**.

my_variable:= 2x^2-3x+4

Note that the definition does not have to be a number, but can be any mathematical expression.

The following table lists the basic math operators

Symbol |
Operation |
---|---|

* | Multiplication. See remark 1) |

/ | Division |

+ | Addition |

– | Subtraction |

^ | Power |

=, >, <, >=, <=, <> | Relational symbols (not evaluated) |

==, >>, <<, >>=, <<=, <<>> | Relational symbols (evaluated, see remark 2) |

- The multiplication symbol is optional. So 3x is interpreted as 3*x. However, ab is interpreted as the variable ‘ab’ and not as a*b. You should add a times symbol or an extra space if you intend the multiplication.
- The relational symbols =, >, <, <=, and >= are used to construct mathematical relations without evaluating them. E.g. x^2=2x is an equation, whereas 2==3 is an expression that will be evaluated as False.

Constant |
Description |
---|---|

True, False | Boolean constants |

Pi | The number π |

EulerE | Euler’s constant e |

NaN | Not-a-number |

{} | The empty set |

The scripting language of AlgebraKiT defines the following constructions to build expressions:

Construction |
Description |
---|---|

( ) | Parenthesis |

[ ] | Function arguments |

{ } | List |

` ` | Toggle between text (HTML) and math |

[[ ]] | List index |

Some examples:

Expression |
Description |
---|---|

Sin[2 x] | The sine of 2x |

v:= {1, 2a, x^y} | Define variable v as a list of 3 items |

v[[2]] | Take the 2nd element of the list (which is 2a in this case). Note that the first element has index 1, not 0. |

Text[`this is a text`] | A command that contains text |

The complete list of commands can be found in the Syntax guide. The following table lists the commands that are used most often.

Command |
Description |
Example |
---|---|---|

Simplify | Apply mathematical rules to simplify the expression as much as possible. | Simplify[1*x*x] gives x^2 |

RandomInt | Generate a random integer number within a range. | RandomInt[2,10] gives an integer number in the range 2 to 10. |

RandSelect | Select a random element from the list | RandSelect[{1,x,2y}] gives one of the three items in the list. |

Strict | Evaluate a boolean expression. An undetermined expression will result in False | Strict[3>>2] gives True Strict[x>>y] gives False |

March 2021

To simplify authoring, we made some changes in the authoring screen.

**What was changed?**

We have hidden some of the less-used elements, such as settings, script and metadata. You can make these elements visible again whenever you need to add or change them. The functionality of the authoring environment remains unchanged. Also, all exercises you have created in the past will behave the way they did.

The first block on the page contains a lot of information that is one-off. Therefore, it is now collapsed by default.

- The name of the exercise (text input) and the audience (dropdown select) remain directly available for change. These are the first two items in the row visible.

- The exercise-ID is not directly visible anymore, but available via the clipboard copy button at the end of the row.

- The remaining options are available via the available tabs (when they were set in the exercise before).

- If a tab is not listed, you can add it by clicking the settings button in front of the row, and selecting the name of the tab you want to access.

- The general settings and metadata are now available via the settings tab, rather than directly visible upon opening the exercise.

The interaction settings are now available via the interaction dropdown menu rather than directly visible at each interaction. By clicking the arrow next to the interaction name, you can access the settings.

- Hints opens the context hints item as before, but is now called hints, rather than context hints.

The step settings are now not available for selection anymore, as they have been deprecated and replaced by new functionality. In case you want to use a different evaluation method or want to describe specific answers, the interaction type Math Entry is recommended.

The Actions dropdown button lists all the step settings which are available, such as accuracy, units, alternative answers, etc.

Note

In the overview above, we use an exercise with (an) Algebra interaction(s). The changes are on exercise and interaction level, but are not related to the type of interaction. Therefore, the differences discussed below are similar for the other interactions. For simplicity, we left these out.

In case there are any questions, you can always contact us via the regular contact methods.

The Math Table interaction editor contains a preview of the table, tools to manipulate the table, and tools to manipulate cells.

When the Table tab is selected, triangle icons appear above the columns and to the left of the rows. Use these to add or delete rows or columns, add headers, add borders, or change colors.

Note that headers are allowed at the top or left of the table only.

]]>Click on the **Cell** tab to specify the properties of individual cells. There are three types of cells:

**Math**cells contain math expressions. You enter these directly in the cell using the formula editor.**Text**cells are defined using a text editor. Note that it is possible to embed mathematical expressions within the text.- An
**Input**cell contains an interaction that requires student input.

The expression in a Math cell has to be valid mathematics so that AlgebraKiT is able to interpret it. This allows you to define relations that refer to math cells, as you will see when we discuss table relations.

If the **simplify expression** checkbox is enabled, AlgebraKiT will evaluate and simplify the expression before it is displayed to the student. This feature is convenient if the math expression refers to randomized script variables.

A Text cell contains general content, such as text, images, and mathematical expressions. These cells are for display only, so it is not possible to use them in relations. The upside of this is that you can embed any mathematical expression, even invalid mathematics like y=....

Such an expression would not be allowed in the Math cell.

The **Input** cell hosts an interaction of the type Algebra or Math Entry. The student will see a math input box where a mathematical expression can be entered. Refer to Algebra Interaction or Math Entry Interaction for more information about these interaction types.

The Settings option allows you to adjust some properties of cells. We mention here the option to add text before or after the main cell content.

]]>