# Generalizing scalars, and exponentiation - Category Theory

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here. This is more of an algebra question, but there isn't an algebra stream, and when generalizing concepts from algebra I often find I end up in CT anyway. Exponentiation can be generalized (https://en.wikipedia.org/wiki/Exponentiation#In_abstract_algebra) and when thinking about this generalization it can lead to some weird places. Multiplication can be thought of a form of exponentiation over the additive group of integers, and scalars for matrices also could be considered exponentiation. It seems like this concept encroaches on the territory of similar concepts like modules, and I'm curious I there is some deeper relation between the two concepts. Additionally I'm curious if anybody knows about generalizations of exponentiations beyond the positive integers. In highschool math we are all exposed to the idea that the concept of exponentiation can generalize to sets other than the positive integers if we forget the notion that exponentiation just refers to repeated multiplication. Obviously for many different algebraic structures that worked with our original notion of exponentiation these generalization may not apply. For instance since monoids lack a negative inverse, so negative exponents don't really generalize nicely. And I can think of a generalized form of rational exponents where if x * x * x = y then y^1/3 = x, but obviously there are many algebraic structures for which this doesn't work. I'm curious if there is some more general notion that captures the idea of exponentiation with different sets, and operations. Lastly I'm curious if anyone has written some Haskell code related to this concept. Algebraic exponentiation has come up multiple times in my programming for implementing things like Schnorr signatures, and I haven't been able to find any code implementing this concept.

Exponentiation is a mathematical operation, written as bn, involving two numbers, the base b and the exponent or power n. When n is a positive integer, exponentiation corresponds to repeated multiplication of the base: that is, bn is the product of multiplying n bases: