Math Studio Calculate complex mathematical expressions (matrix based) and plot them
Support Development
PayPal ● 
Bitcoin Address: 1sM2BrTH8BRgt3quiASK8TmYSafutNvDo
Dogecoin Address: DFdSGpGMZ2EZVkjyqNrYCEysK92DFPonx4
"Math Studio" extension is powered with the mathjs library which allows parsing and calculating complex mathematical expressions. This extension is also integrated with the chartjs library which is a powerful plotting tool. You can simply write your mathematical expressions in a multiline editor and press the Enter key to see the computational results. Since this extension uses sandboxing technology, you can use the variables that are already defined in the current window's context and use them to perform your new calculations. To write several expressions in a single computational block use Shift + Enter key. This extension also supports plain JavaScript functions with the js("your JS code here") helper function. You can also pass your defined matrices and arrays to this JS function to perform some of the work in the friendly JavaScript environment.


  1. What is the "Math Studio" extension and how does it work?

    This extension is meant to replace your need to a native mathematical software if you don't need intensive calculation power (not that it is not capable of!). The extension is integrated with two powerful libraries that can fulfill the normal mathematical needs. You can also add custom JavaScript functions to the computational sandbox to enrich your environment to your needs. Read the relevant FAQ for more info. To compute a simple expression, write the expression in a new computational box and press the Enter key. If you need to write in multiple lines, use the Shift + Enter shortcut to switch to a new line without performing the computation. To move to the previous box, use the UP key and to go to the next one use the DOWN key. You can edit a box and re-compute it with the Enter key. Note that the extension creates a sandbox for each window, so to write complex expressions, you can define different things in different boxes like variables in the first box and so on.

  2. recommended "Sound Level Meter" extension for Chrome, Firefox, and Edge browsers

    A browser extension to measure environmental noise level in decibels (dB) useful to identify adverse background noises or to see how quiet the place is. Read more here.

  3. What are the supported math functions?

    The extension supports all the functions that are available in the mathjs environment. To get help with each function, type help("function_name") and press the Enter key.

    Construction functions:

    • bignumber(x)
    • boolean(x)
    • chain(value)
    • complex(re, im)
    • createUnit(units)
    • fraction(numerator, denominator)
    • index(range1, range2, …)
    • matrix(x)
    • number(value)
    • sparse(x)
    • splitUnit(unit, parts)
    • string(value)

    Expression functions:

    • compile(expr)
    • eval(expr [, scope])
    • help(search)
    • parse(expr [, scope])
    • parser()

    Arithmetic functions:

    • abs(x)
    • add(x, y)
    • cbrt(x [, allRoots])
    • ceil(x)
    • cube(x)
    • divide(x, y)
    • dotDivide(x, y)
    • dotMultiply(x, y)
    • dotPow(x, y)
    • exp(x)
    • expm1(x)
    • fix(x)
    • floor(x)
    • gcd(a, b)
    • hypot(a, b, …)
    • lcm(a, b)
    • log(x [, base])
    • log10(x)
    • log1p(x)
    • log2(x)
    • mod(x, y)
    • multiply(x, y)
    • norm(x [, p])
    • nthRoot(a)
    • nthRoots(x)
    • pow(x, y)
    • round(x [, n])
    • sign(x)
    • sqrt(x)
    • square(x)
    • subtract(x, y)
    • unaryMinus(x)
    • unaryPlus(x)
    • xgcd(a, b)

    Bitwise functions:

    • bitAnd(x, y)
    • bitNot(x)
    • bitOr(x, y)
    • bitXor(x, y)
    • leftShift(x, y)
    • rightArithShift(x, y)
    • rightLogShift(x, y)

    Combinatorics functions:

    • bellNumbers(n)
    • catalan(n)
    • composition(n, k)
    • stirlingS2(n, k)

    Complex functions:

    • arg(x)
    • conj(x)
    • im(x)
    • re(x)

    Geometry functions:

    • distance([x1, y1], [x2, y2])
    • intersect(endPoint1Line1, endPoint2Line1, endPoint1Line2, endPoint2Line2)

    Logical functions:

    • and(x, y)
    • not(x)
    • or(x, y)
    • xor(x, y)

    Matrix functions:

    • concat(a, b, c, … [, dim])
    • cross(x, y)
    • ctranspose(x)
    • det(x)
    • diag(X)
    • dot(x, y)
    • expm(x)
    • filter(x, test)
    • flatten(x)
    • forEach(x, callback)
    • getMatrixDataType(x)numbers.
    • identity(n)
    • inv(x)
    • kron(x, y)
    • map(x, callback)
    • ones(m, n, p, …)
    • partitionSelect(x, k)
    • range(start, end [, step])
    • reshape(x, sizes)
    • resize(x, size [, defaultValue])
    • size(x)
    • sort(x)
    • squeeze(x)
    • subset(x, index [, replacement])
    • trace(x)
    • transpose(x)
    • zeros(m, n, p, …)

    Probability functions:

    • combinations(n, k)
    • factorial(n)
    • gamma(n)
    • kldivergence(x, y)
    • multinomial(a)
    • permutations(n [, k])
    • pickRandom(array)
    • random([min, max])
    • randomInt([min, max])

    Relational functions:

    • compare(x, y)
    • compareNatural(x, y)
    • compareText(x, y)
    • deepEqual(x, y)
    • equal(x, y)
    • equalText(x, y)
    • larger(x, y)
    • largerEq(x, y)
    • smaller(x, y)
    • smallerEq(x, y)
    • unequal(x, y)

    Set functions:

    • setCartesian(set1, set2)
    • setDifference(set1, set2)
    • setDistinct(set)
    • setIntersect(set1, set2)
    • setIsSubset(set1, set2)
    • setMultiplicity(element, set)
    • setPowerset(set)
    • setSize(set)
    • setSymDifference(set1, set2)
    • setUnion(set1, set2)

    Special functions:

    • erf(x)

    Statistics functions:

    • mad(a, b, c, …)
    • max(a, b, c, …)
    • mean(a, b, c, …)
    • median(a, b, c, …)
    • min(a, b, c, …)
    • mode(a, b, c, …)
    • prod(a, b, c, …)
    • quantileSeq(A, prob[, sorted])
    • std(a, b, c, …)
    • sum(a, b, c, …)
    • var(a, b, c, …)

    String functions:

    • math.format(value [, precision])
    • math.print(template, values [, precision])

    Trigonometry functions:

    • acos(x)
    • acosh(x)
    • acot(x)
    • acoth(x)
    • acsc(x)
    • acsch(x)
    • asec(x)
    • asech(x)
    • asin(x)
    • asinh(x)
    • atan(x)
    • atan2(y, x)
    • atanh(x)
    • cos(x)
    • cosh(x)
    • cot(x)
    • coth(x)
    • csc(x)
    • csch(x)
    • sec(x)
    • sech(x)
    • sin(x)
    • sinh(x)
    • tan(x)
    • tanh(x)

    Unit functions:

    • to(x, unit)

    Utils functions:

    • clone(x)
    • isInteger(x)
    • isNaN(x)
    • isNegative(x)
    • isNumeric(x)
    • isPositive(x)
    • isPrime(x)
    • isZero(x)
    • typeof(x)

  4. How can I plot an array or several arrays with this extension?

    This extension has a plotting utility exposed to the mathjs environment which helps with your plotting needs. The format of the function is plot(datasets, labels, type, options). The datasets array is the actual data that needs to be plotted. The other arguments are optional. Note that this function by default uses “line” type plotting. Other supported types are “pie”, “doughnut” and “bar” (see the example section). You can group multiple plots by appending your plotting data to the datasets array. Also, you can change the color of each plot with “backgroudColor” and “borderColor” keys. See the following examples:

    simple line plot

    plot(1:10, 'line')

    simple line plot that is combined with a math function

    plot(sin(1:10), 'line')

    simple bar chart

    plot([10, -30, 40], 'bar')

    simple pie chart

    plot([10, 30, 40], 'pie')

    #simple doughnut chart

    plot([10, 30, 40], 'doughnut')

    you can use {x, y} objects to provide the x axis and y axis data

    plot([{data: 1:10}], 'line')

    how to add label to each plot and change the background color. Also we have two plots in a single group

      data: [{x: 1, y: 1}, {x: 2, y: 2}],
      backgroundColor: 'blue',
      label: 'one'
    }, {
      data: [{x: 1, y: 1}, {x: 2, y: 3}],
      backgroundColor: 'red',
      label: 'blue'
    }], 'line')

    grouping a bar plot

      data: [1,2,3,4]
    }, {
      data: [1,2,3,-4]
    }], 'bar')

    a “doughnut” plot with labels and background color

    plot('doughnut', [{
      data: [10, 30, 40],
      backgroundColor: ['red', 'blue', 'green']
    }], ['plot a', 'plot b', 'plot c'])

    use a JavaScript function inside our plot

    plot(js("x => => Math.random())", 1:10))

  5. What's new in this version?

    Please check the Logs section.

  6. Is it possible to add a custom function to the mathjs environment for later use?

    This extension supports executing user-defined JS code with js() format. If your JS function is big or you might need it later, write your JS code in a *.js file and drop the file into the window whenever it is needed! This way it will get executed and all the methods will be accessible in the current window. For instance to add a custom function to the mathjs environment write the following code in a *.js file and drop the file into the window. Now call the function like all other math functions

    // import to mathjs context
      myFunction: m => alert(m),
      mySecondFunction: x => x + 1

    Note: to use the js() function, always surround the JS code with double quotes. This is the standard string format in the mathjs.

  7. How can I get more info about usage of the function?

    Use help("the function name") in a new computational box and hit the Enter key.

Matched Content



Please keep reviews clean, avoid the use of improper language and do not post any personal information.
  • <a> Defines an anchor.

    Example: <a href="">a sample link</a>

  • <pre><code> Syntax Highlighting (Supported languages: Bash, JSON, HTML, JavaScript, and CSS).

    Example: <pre><code class="javascript">var foo = 'bar';</code></pre>

  • <strong> Defines bold text
  • <blockquote> Defines a long quotation
  • <caption> Defines a table caption
  • <cite> Defines a citation
  • <em> Defines italic text
  • <p> Defines a paragraph
  • <span> Defines a section in a document
  • <s> Defines strikethrough text
  • <strike> Defines strikethrough text
  • <u> Defines underlined text
  • <br> Defines a single line break; can be used alone and don't need an ending tag

What's new in this version

Change Logs:
    Last 10 commits on GitHub
    Hover over a node to see more details

    Need help?

    If you have questions about the extension, or ideas on how to improve it, please post them on the  support site. Don't forget to search through the bug reports first as most likely your question/bug report has already been reported or there is a workaround posted for it.

    Open IssuesIssuesForks

    Permissions are explained

    storageto save internal preferences
    contextMenusto add context menu items to the browser action button to switch mode from the page to the popup mode and vice-versa

    Recent Blog Posts on