1
$\begingroup$

Is it possible to factor

a ** b ** c - a ** b ** d

as

a ** b ** (c - d)

?

I am using NCAlgebra. Using NCExpand, we can check that

NCExpand[a ** b ** (c - d) == a ** b ** c - a ** b ** d]
(* True *)

Note that a*x - a*y // Factor or a*x - a*y // Simplify return a*(x-y), however.

$\endgroup$
3
$\begingroup$

One possibility is to use NCCollect (from the NCAlgebra package):

NCCollect[a ** b ** c - a ** b ** d, {a, b}]
(*  a ** b ** (c - d) *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.