I'm looking for an algorithm to create a very simple (2 equations, 2 unknowns) linear system of equations that consists purely of integers. Specifically, a way to create a system of equations of integers and knowing that it can only be solved by integer answers, without actually solving it.(adsbygoogle = window.adsbygoogle || []).push({});

a_{11}x_{1}+a_{12}x_{2}=b_{1}

a_{21}x_{1}+a_{22}x_{2}=b_{2}

where a_{11}, a_{12}, a_{21}, a_{22}, x_{1}, x_{2}, b_{1}, b_{2}are all integers.

The only thing I can think of is using a determinant which gives

x_{1}= (a_{22}b_{1}-a_{12}b_{2}) / (a_{11}a_{22}-a_{12}a_{21})

x_{2}= (a_{11}b_{2}-a_{21}b_{1}) / (a_{11}a_{22}-a_{12}a_{21})

and that the numerator must be a multiple of the denominator.

What do I do now? Am I even on the right path?

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Creating a system of equations consisting only of integers?

Loading...

Similar Threads - Creating system equations | Date |
---|---|

I Algorithm to create a composite score | Sep 12, 2017 |

I Using trigonometry to create a radar for a game. | Jun 4, 2017 |

B Creating a 4 dimensional cube | Feb 11, 2017 |

Help creating a ranking system | Feb 17, 2015 |

Creating a system of equations | Apr 12, 2004 |

**Physics Forums - The Fusion of Science and Community**