Jump to content

x*x+y*(-y)

Gaming PC:

CPU: Ryzen 5800X3D | Motherboard: Gigabyte B550 Elite V2 | RAM: Crucial 2x16gb, 3200  JEDEC. | PSU: EVGA SuperNova 750 G3 | Monitor: LG 27GL850-B , Samsung C27HG70 | 
GPU: Asus Prime RTX 5070ti OC| Sound: Odac + Fiio E09K | Case: Fractal Design R6 TG Blackout |Storage: Kingston Renegade 2TB and Corsair MP510 960gb | Cooling: CPU: Alphacool ST30 420mm rad, Alphacool CPU and GPU Core LT and Core blocks, D5 pump and res combo 

 

Linux PC:

CPU: Ryzen 7700| Motherboard: Asus A620M-CSM | RAM: Crucial Pro 2x48gb, 5600  JEDEC. | PSU: Corsair CX750 | Monitor: LG 27GL850-B , Samsung C27HG70 | 
GPU: MSI Gaming X RTX 3090 | Case: Lian Li Dan Cases A3-mATX black |Storage: SN7100 2TB + Samsung 860 EVO 512gb | Cooling: CPU: Thermalright Peerless Assassin Mini Fan(s): Noctua 1x NF-A14x25 Chromax

 

Link to comment
https://linustechtips.com/topic/1291212-xyx-y/#findComment-14372839
Share on other sites

Link to post
Share on other sites

(a+b) * (c+d)

expands to 

a*c + a*d + b*c + b*d

 

now put in the x and y (don't forget the minus sign in front of the second y) and you get

 

x*x + x*-y + y*x + y*-y

 

which is the same as

x*x - x*y + x*y - y*y

 

you can see the middle two terms cancel out and you're left with just x*x - y*y

NEW PC build: Blank Heaven   minimalist white and black PC     Old S340 build log "White Heaven"        The "LIGHTCANON" flashlight build log        Project AntiRoll (prototype)        Custom speaker project

Spoiler

Ryzen 3950X | AMD Vega Frontier Edition | ASUS X570 Pro WS | Corsair Vengeance LPX 64GB | NZXT H500 | Seasonic Prime Fanless TX-700 | Custom loop | Coolermaster SK630 White | Logitech MX Master 2S | Samsung 980 Pro 1TB + 970 Pro 512GB | Samsung 58" 4k TV | Scarlett 2i4 | 2x AT2020

 

Link to comment
https://linustechtips.com/topic/1291212-xyx-y/#findComment-14372874
Share on other sites

Link to post
Share on other sites

Enderman answered it well.

But going a step further, in addition to what they've said

This his how I would explain it to someone who just doesn't understand the "expand" thing of :

(a+b) * (c+d) = a*c + a*d + b*c + b*d

 

 

(x+y) * (x-y) is the equation while (a+b) * (c+d) is the basis of it

 

You need to multiply each numbers of each parenthesis, with the numbers of the other parenthesis.

And do so in order.

 

Lets start with a*c

You take the x in the first parenthesis and you multiply it with the x in the other parenthesis.

image.png.e01d04317c0fe6f5161c8bb97c6c6c67.png

x*x

This equals x². Why x² ? Because the exponent is just a number that tells you how many times you should multiply the number it is attached to, by itself. x² = x*x

 

Now you follow up with a*d, still with the x of the first parenthesis, but this time, with the y of the second parenthesis.

image.png.ad987b758091dbfdaa9bb5ee46f44c92.png

x*-y

This becomes -xy

Why is it a minus? Because a positive times and negative, always result in a negative. And y in the second parenthesis is negative.

 

So now you’ve found the multiplication values of the x, or a*c + a*d


x² – xy

Alright, now lets do the same with the y, starting with b*c

 

Take the y of the first parenthesis, it’s a positive because it has a + in front a it. Multiply it with the x of the second parenthesis.

image.png.a0d221dd7198d5b79a88eba85d44005b.png

+ xy

 

Now our answer should look like this thus far :

x² – xy + xy

(this is a*c + a*d + b*c)

 

Why did I write it xy instead of yx? Simply because it’s easier this way to not get confused, but it would’ve been valid regardless.

 

And now, all that's left is b*d. We multiply the y of the first parenthesis with the y of the second parenthesis. A plus multiplied with a minus equals a minus.

image.png.aad2f7a1fd8f3f3c61d34d33852dac9e.png

 

+y * -y = -y²

 

Almost done!
Our equation is complete, it now look like this

a*c + a*d + b*c + b*d = x² – xy + xy -y²

 

Simply do the addition between -xy and +xy. They cancel each other, so think of it as -1 + 1 = 0

The result is

x² + 0 - y²

 

Get rid of the 0 because it's meaningless and you get x² - y²

CPU: AMD Ryzen 3700x / GPU: Asus Radeon RX 6750XT OC 12GB RAM: Corsair Vengeance LPX 2x16GB DDR4-3200
MOBO: MSI B450m Gaming Plus NVME: Corsair MP510 240GB / Case: TT Core v21 PSU: Seasonic 750W / OS: Bazzite

Link to comment
https://linustechtips.com/topic/1291212-xyx-y/#findComment-14376639
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×