CAS View User Interface
By default, the CAS View is opened next to the Graphics View. Depending on which one of these two Views is active, either the CAS View Toolbar or the Graphics View Toolbar is displayed at the top of the GeoGebra window, with the Undo / Redo buttons in the top right corner.
Creating Mathematical Objects
The CAS View allows you to use GeoGebra's CAS (Computer Algebra System) for symbolic computations. It consists of cells with an Input Field at the top and output display at the bottom. You can use these Input Fields in the same way as the normal Input Bar, with the following differences:
- You can use variables that were not assigned any value. Example: Enter
(a+b)^2into an Input Field and hit the Enter key. You will get the output a²+2ab+b².
=is used for equations and
:=for assignments. This means that the input
a=2will not assign value 2 to a. See the section about assignments for details.
- Multiplication needs to be marked explicitly. While in the Input Bar you can use both
a*(b+c)for multiplication, in the CAS View only
Keyboard Shortcuts for Direct Input
In the CAS View of GeoGebra´s Desktop Version the following keyboard shortcuts help you to evaluate or check your input.
- Enter: Evaluates you input
- Ctrl + Enter: Evaluates your input numerically, e.g.
- Alt + Enter: Checks your input but does not evaluate it, e.g.
b + bstays as b + b.
- Assignments are always evaluated, e.g.
a := 5
- You may suppress any output with a semicolon at the end of your input, e.g.
a := 5;
Variable Assignments and Connection with other Views
You may use the
:= notation for assignments, e.g.
b := 5,
a(n) := 2n + 3.
- Free up a name: Use
Delete[b]in order to free up a variable name again.
- Redefine a variable or function: You may redefine a variable or function, but you must do so in the same cell, otherwise it will be treated as a new variable and automatically renamed.
Variables and functions are always shared between the CAS View and the other Views if possible. For example:
- If you define
b:=5in the CAS View, then you can use b in all the other Views of GeoGebra.
- If you define a function
f(x)=x^2in another View, you can also use this function in the CAS View.
:=, e.g. if you type
b:=5the output will be 5. Please also note, that for clarification actually b := 5 will be displayed.
- You may write equations using the simple Equals sign, e.g.
3x + 5 = 7.
- Arithmetic operations: You can perform arithmetic operations on equations, which is useful for manual equation solving. Example:
(3x + 5 = 7) - 5subtracts 5 from both sides of the equation.
- Extracting one Side: You may extract either the left or right side of an equation by using the commands
LeftSide[3x + 5 = 7]returns 3 x + 5 and
RightSide[3x + 5 = 7]returns 7
You can refer to other rows in the CAS View in two ways:
- Static row references copy the output and won't be updated if the referenced row is subsequently changed
#: Copies the previous output.
#5: Copies the output of row 5.
- Dynamic row references insert a reference to another row instead of the actual output and therefore will be updated if the referenced row is subsequently changed
$: Inserts a reference to the previous output.
$5: Inserts a reference to the output of row 5
GeoGebra also offers a wide range of CAS Commands that can be used to create objects in the CAS View. Just start typing the name of a Command into the Input Field and GeoGebra will offer you a list of Commands that match your input.
CAS View Toolbar
The CAS View Toolbar provides a range of CAS Tools that allow you to evaluate input and perform calculations. Just enter your input and select the corresponding CAS Tool afterwards in order to apply it to your input.
Row Header Context Menu
In the GeoGebra Desktop Version you can right click (MacOS: Ctrl-click) on a row header in order to show a Context Menu with the following options:
- Insert Above: Inserts an empty row above the current one.
- Insert Below: Inserts an empty row below the current one.
- Delete Row: Deletes the contents of the current row.
- Text: Toggles between the current result and a text showing the current result contained in the row, which allows the user to insert comments.
- Copy as LaTeX (GeoGebra Desktop): Copies the contents of the current row to your computer’s clipboard, allowing you to paste the contents e.g. in a Text object.
- Note: To copy the contents of more than one CAS row as LaTeX, select the rows you want with Ctrl-click (MacOS: Cmd-click), then right-click (MacOS: Ctrl-click) on the row header and select Copy as LaTeX.
Cell Context Menu
In the GeoGebra Desktop Version you can right click (MacOS: Ctrl-click) on a CAS output cell in order to show a Context Menu with the following options:
- Copy: Copies the cell contents to the your computer’s clipboard. Then, right click on a new cell in order to show the Paste option.
- Copy as LaTeX: Copies the cell contents in LaTeX format to the your computer’s clipboard, so it can be pasted into a Text object or a LaTeX editor.
- Copy as LibreOffice Formula: Copies the cell contents in LibreOffice formula format to your computer’s clipboard, so it can be pasted in a word processing document.
- Copy as Image: Copies the cell contents in PNG format to your computer’s clipboard, so it can be pasted into an Image object or in a word processing document.
Display of Mathematical Objects
The CAS View Style Bar provides buttons to
- change the text style ( bold and italics) and color
- display a virtual keyboard (GeoGebra Desktop)
- display additional Views in the GeoGebra window (GeoGebra Web and Tablet Apps)
Showing CAS Objects in the Graphics View
In the CAS View, the icon to the left of every row shows the current visibility state (shown or hidden) of the object defined in it (when possible). You may directly click on the little Show / Hide Object icon in order to change the visibility status of the object in the Graphics View.