SarthakKeshari / calc_for_everything

This repository aims to provide Calculators for educational, professional, scientific, health and well-being and other purposes.
https://calc-for-everything-psi.vercel.app
MIT License
114 stars 104 forks source link

Commutative Property #567

Closed Vedansh-Keshari closed 10 months ago

Vedansh-Keshari commented 11 months ago

Enter calculator name - Commutative Property

Describe calculator functionality - Given a Set A, and for all possible elements whether the Set A satisfies the Commutative property or not, under the operators '+'(addition) and 'x'(multiplication).

Under which category you wish to place it -

SakshiJSanghavi commented 10 months ago

@Vedansh-Keshari can you please assign this to me?

SarthakKeshari commented 10 months ago

Hey @SakshiJSanghavi, Assigned.

You may contribute your code under the folder path -

calc_for_everything\calculators\src\mathematical\commutativePropertyCalc

Issue completion deadline - 04th Dec 02:00:00 pm IST

NOTE - In case the issue completion deadline is not met, the issue will be assigned to a new contributor

SakshiJSanghavi commented 10 months ago

@SarthakKeshari I don't see a commutativePropertyCalc file in the provided path.

Also, do you mind give a bit more details on what the functionality of calc should look like?

SarthakKeshari commented 10 months ago

@SarthakKeshari I don't see a commutativePropertyCalc file in the provided path.

Also, do you mind give a bit more details on what the functionality of calc should look like?

@SakshiJSanghavi, File has been added. Secondly, @Vedansh-Keshari kindly elaborate on the functionality by providing an example for the same.

Vedansh-Keshari commented 10 months ago

@SakshiJSanghavi , let A be a square matrix of size n x n , the elements say [ a b | c d ] , and B be another square matrix of size n x n, the elements say [ e f | g h ]. If we apply the Commutative property under 'x' (multiplication), first A x B , the result comes out to be [ ae+bg af+bh | ce+dg cf+dh ] but we see that the value of BxA is [ ea+cf eb+fd | ga+hc gb+hd ] , which is a completely different value. Therefore, we can display the output that "commutative property under the multiplication operation does not hold true" .
I hope your doubt is addressed.