Linear combination of two numbers

In summary, to find the linear combination of two numbers, ax+by=t, where t=m*GCD(a,b) and m,a,b \in Z, apply the euclidean algorithm to find the GCD and then go back to the algorithm to find the expression 2*24+(-3)*15=3. This will give you the values for x and y.
  • #1
pyfgcr
22
0
I wonder how to find linear combination of 2 numbers, that is: ax+by=t, with t=m*GCD(a,b), and m,a,b [itex]\in[/itex] Z. Find x,y.
 
Physics news on Phys.org
  • #2
pyfgcr said:
I wonder how to find linear combination of 2 numbers, that is: ax+by=t, with t=m*GCD(a,b), and m,a,b [itex]\in[/itex] Z. Find x,y.


1) Apply the euclidean algorithm to find the gcd

2) After you finish 1, go BACK and get your expression

Example:

$$gcd(24,15)=3\Longrightarrow \begin{align*}24=&1\cdot 15+9\\15=&1\cdot 9+6\\9=&1\cdot 6+3\\6=&2\cdot 3\end{align*}$$

We know go back on the above algorithm (from the last line with a non-zero residue):

$$3=9-6=9-(15-9)=2\cdot 9-15=2(24-15)-15=2\cdot 24+(-3)\cdot 15$$

and thus [itex]\,2\cdot 24+(-3)\cdot 15=3\,[/itex]

DonAntonio
 
  • #3
Ok, now I understand. Thanks a lot.
 

FAQ: Linear combination of two numbers

1. What is a linear combination of two numbers?

A linear combination of two numbers is the result of multiplying each number by a constant and adding them together. It is represented by the formula ax + by, where a and b are constants and x and y are the two numbers.

2. How do you solve a linear combination?

To solve a linear combination, you need to first find the values of the constants a and b. This can be done by setting up a system of equations and solving for the variables. Once you have the values of a and b, you can plug them into the formula ax + by to find the result of the linear combination.

3. What is the purpose of finding linear combinations?

Linear combinations are useful in many areas of science and mathematics, such as solving systems of equations, graphing lines, and understanding vector spaces. They can also be used to represent and solve real-world problems involving multiple variables.

4. Can a linear combination have more than two numbers?

Yes, a linear combination can have any number of numbers, as long as each number is multiplied by a constant and added together. The formula for a linear combination can be extended to include more than two numbers, such as ax + by + cz.

5. Is every number a linear combination of two other numbers?

No, not every number is a linear combination of two other numbers. For example, prime numbers cannot be expressed as a linear combination of two other numbers. However, every real number can be expressed as a linear combination of two other real numbers.

Similar threads

Back
Top