This view is part of GeoGebra user interface.
The CAS view allows you to use GeoGebra's CAS (Computer Algebra System) for symbolic computations. The view consists of cells, each of them has 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 following differences:
- you can use variables that were not assigned any value, e.g.
(a+b)^2evaluates to a^2+2*a*b+b^2
=is used for equations and
:=for assignments. This means that
a=2will not assign value 2 to a. See the section about assignments for details.
- multiplication should be marked explicitly. While in the Input Bar you can use both
a*(b+c)for multiplication, in CAS only the latter is valid.
- Enter: evaluate input
- Ctrl + Enter: evaluate numerically the input, e.g.
- Alt + Enter: check input but do no evaluate input, e.g.
b + bstays as b + b. Note that assignments are always evaluated, e.g.
a := 5
- In an empty row type:
- Space bar for previous output
)for previous output in parentheses
=for previous input
- Suppress output with a semicolon at the end of your input, e.g.
a := 5;
Showing and hiding objects
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 white/marble icon in order to change the visibility status of the object in the Graphics View.
- Clicking a button in the toolbar applies the related command to the currently edited row
- You can select part of the input text to only apply the operation to this selected part
A right click on a row header shows 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 - allows the user to insert comments
- Copy as LaTeX: copies the contents of the current row to the Clipboard, allowing 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, then right-click on the row header and select Copy as LaTeX.
A right click on a CAS cell shows a context menu, with the following options:
- Copy: copies the cell contents to the Clipboard (a right click on a new cell shows a Paste option)
- Copy as LaTeX: copies the cell contents to the Clipboard, in LaTeX format. (so it can be pasted into a Text object or a LaTeX editor)
- Copy as LibreOffice formula: copies the cell contents to the Clipboard, in LibreOffice formula format (so it can be pasted in a word processing document)
- Copy as Image: copies the cell contents to the Clipboard, in PNG format (so it can be pasted into an Image object or in a word processing document)
Assignments & Connection with GeoGebra
- Assignments use the
b := 5,
a(n) := 2n + 3
- To free up a variable name again, use
- To redefine a variable or function , you must do so in the same cell, otherwise it will be treated as a new variable and renamed
- Variables and functions are always shared between the CAS view and GeoGebra if possible. If you define
b:=5in the CAS view, then you can use b in all of GeoGebra. If you have a function
f(x)=x^2in GeoGebra, 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 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
#copy the previous output
#5copy 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
$insert a reference to the previous output
$5insert a reference to the output of row 5
- Equations are written using the simple Equals sign, e.g.
3x + 5 = 7
- You can perform arithmetic operations on equations, e.g.
(3x + 5 = 7) - 5subtracts 5 from both sides of the equation. This is useful for manual equation solving.
LeftSide[3x + 5 = 7]returns 3 x + 5 and
RightSide[3x + 5 = 7]returns 7
CAS & Geometry
From 22.214.171.124, the CAS View supports exact versions of some of the geometry commands
Rounding 2 Decimal Places
|Angle[(1,0),(0,0),(1,2)]||Numeric : 1.11 |
Input : 63.43° or 1.11 rad according Angle Unit selected
|AngleBisector[(0,1),(0,0),(1,0)]|| Numeric : |
|Distance[(0,0), x + y = 1]
|Ellipse[(2,1),(5,2),(5,1)]|| Numeric : |
|Ellipse[(2,1),(5,2),(6,1)]|| Numeric : |
|Circle[(a,b),r]||(y - b)² + (x - a)² = r²|
|Distance[(a,b),p x + q y = r]|