I propose that we create a generalized question about solving linear congruences, and close all future questions on this topic as a duplicate of it. This strategy has been employed several times for question types that are essentially all minor variants of each other.

I would further suggest that the question and its answer be made community wiki after a time, so that lots of users can help to polish them if necessary, and also so that the people who put the main work into this can be suitably rewarded while ensuring their never-ending reign over this particular topic doesn't result in unfair accumulation of points.

Any volunteers? Any suggestions for what such a canonical Q&A pair should include?

  • 6
    $\begingroup$ A few years ago, I wrote up an article deriving the general solution (using the linear-algebraic approach). I still have the TeX source, so I think it shouldn't be too much work to port it to MSE. $\endgroup$
    – Lord_Farin
    May 31, 2013 at 8:13
  • $\begingroup$ A day after posting this proposal, you posted an answer to a question about solving a linear equation over $\,\Bbb Q.\,$ Thus I'm puzzled why you seem to think that users who explain the intracacies of solving linear equations over the field $\,\Bbb Z/p\,$ obtain an "unfair accumulation of points", while, it seems that you do not think the same about the simpler analog of solving linear equations over the field $\Bbb Q.\,$ Doesn't this contradict your proposal? $\endgroup$
    – Key Ideas
    Jun 1, 2013 at 15:04
  • 5
    $\begingroup$ @KeyIdeas: You misread my post. I am saying that, if we decide to have a canonical post on this subject, it will be viewed far more frequently than any "ordinary" one (because of the constant stream of questions being closed as duplicates of it), and would metaphorically give its owner a "monopoly" on the subject. Therefore, after this canonical post has given its owner a reasonable amount of reputation points, I think it should be made CW. This has absolutely nothing to do with any answers that have already been posted to the specialized questions on this topic. $\endgroup$ Jun 1, 2013 at 18:16
  • $\begingroup$ Ah,I see. I had read it as referring to points accumulated by those cherry-picking endless variations of such problems - which, no doubt, is a widespread problem. However, many users do give insightful answers to problems that have algorithmic solutions, so it is not clear that eliminating all types of cherries is the best solution. There are many interesting nonalgorithmic ways to solve linear congruencces, and such "ad-hoc" techniques often prove useful for other purposes (e.g. evaluating Legendre or Jacobi symbols, computing in structures acted on by unimodular groups, etc). $\endgroup$
    – Key Ideas
    Jun 1, 2013 at 19:37
  • 2
    $\begingroup$ I would like to mention that most of the answers in the FAQ are to one specific question, not a general solution to all questions of a type. So, there are maybe 2-5 cases of what you mention. I'd like to see a better argument for it. An argument against any "canonical" solution is I could look that up in most any textbook if that's all I wanted. People come with specific questions and helping them with an answer that corresponds to their question is good. Eventually, this site could be reduced to hundreds of canonical solutions and very few new questions if we wanted, and it would die. $\endgroup$
    – GeoffDS
    Jun 6, 2013 at 1:46
  • $\begingroup$ I apologise to those who upvoted my comment. I have somehow succeeded in reading every instance of "congruence" as "recurrence". Sorry guys :(. Although perhaps it could make sense to have an abstract solution for those, too. But that would be a different thread. $\endgroup$
    – Lord_Farin
    Jun 6, 2013 at 18:17
  • 2
    $\begingroup$ I think that the canonical answer is likely to be of limited value, and that closing all future questions on the topic is an appallingly bad idea. I think it a very safe bet that a large fraction of those asking such questions have already failed to make sense of what is essentially just such a canonical answer, namely, the material in their textbooks and lecture notes, and need help directed at their specific problems. $\endgroup$ Jun 7, 2013 at 22:44
  • $\begingroup$ I think that often the value of an answer is that it is personalized to the particular situation. A generic answer, no matter how well written, cannot do this. $\endgroup$
    – copper.hat
    Jun 13, 2013 at 20:01

1 Answer 1


I would suggest that a canonical Q/A or three could cover

(a) The basic meaning of the modulus $a=b+km$ equivalent to $a\equiv b \mod m$ for integral $k$. This basic observation is enough to deal with some questions.

(b) Solving a linear congruence to prime modulus, with examples

(c) Solving a linear congruence to composite modulus, with examples

(d) Solving simultaneous linear congruences in a number of variables to the same modulus, and relationship with matrix solutions and elimination solutions to such systems, which may be familiar in the case of $\mathbb Q$ or $\mathbb R$

(e) Solving simultaneous linear equations in one variable where each congruence is to a different modulus (the Chinese Remainder Theorem) - including examples from puzzles (eg when do all the cyclists meet again. all the clocks strike at the same time - when they are going at different rates) since some questions will arise from such puzzle contexts.

It is hard to pitch the level though, because some of the questions asked are very basic, and therefore beginners level will be necessary for some aspects. So I would suggest answers be invited at two or three different levels, highlighted in the answer as basic, intermediate or more advanced.

One issue at the more advanced level is that questions at that level sometimes focus on a particular detail which is not understood - and a generic answer might not quite serve the purpose. So there would be a case for leaving such questions open until that detail is teased out and incorporated into a canonical answer, or a comment on it.

One editable answer should consist of references and links for further reading. The relevant chapters in Hardy and Wright "Introduction to the Theory of Numbers" cover a wide range of material about congruences of different kinds. And that is just one example.

  • 4
    $\begingroup$ As I mentioned on the question, I fail to see how this is helpful. I'm not saying your answer is bad. It seems well thought out and all. It's just that this "canonical answer" is going to end up being like a 5 page paper, which isn't going to be helpful to a beginner struggling through this stuff. I more strongly state that I think the idea of canonical answers is in general a bad idea. People can read through textbooks if this type of answer is what they need for help. They come to this site when they have questions because they are stuck. $\endgroup$
    – GeoffDS
    Jun 7, 2013 at 1:33
  • $\begingroup$ @Graphth Not everyone has unrestrained access to textbooks. I consider it very much among the goals of MSE ("to build a library of detailed answers to every question about math") to have such canonical solutions. $\endgroup$
    – Lord_Farin
    Jun 15, 2013 at 7:39
  • $\begingroup$ @Lord_Farin Notice that one of the main points of the OP is to close all future questions on the subject. I don't care about a canonical answer or not, but if the result is no one can ask questions any more, it's a terrible idea. $\endgroup$
    – GeoffDS
    Jun 16, 2013 at 2:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .