Urdhva Tiryagbhyam ā Advanced Vertically and Crosswise Multiplication
In this tutorial, you'll learn about Urdhva Tiryagbhyam. We cover key concepts, practical examples, and best practices.
Urdhva Tiryagbhyam (Vertically and Crosswise) is the most general Vedic multiplication sutra, working for any two numbers regardless of digit count or proximity to a base, using a diagonal lattice pattern that mirrors polynomial multiplication.
What you'll learn: Advanced Urdhva Tiryagbhyam techniques for multi-digit multiplication, algebraic expressions, and polynomial products.
Why it matters: This is the most versatile Vedic multiplication method ā it works for any two numbers without special cases, and it directly maps to how computers multiply polynomials.
Real-world use: Digital signal processing uses crosswise multiplication patterns; cryptographic algorithms apply similar lattice logic; competitive exam takers solve 4-digit Ć 4-digit in under 30 seconds.
The Pattern
The sutra "Vertically and Crosswise" describes a systematic pattern:
For two 2-digit numbers AB Ć CD:
A B
Ć Ć
C D
āāāāā
Step 1: B Ć D (vertical right)
Step 2: AĆD + BĆC (crosswise)
Step 3: A Ć C (vertical left)
For larger numbers, the pattern extends:
3-digit: ABC Ć DEF
Step 1: C Ć F (vertical)
Step 2: BĆF + CĆE (cross 1)
Step 3: AĆF + BĆE + CĆD (star cross)
Step 4: AĆE + BĆD (cross 2)
Step 5: A Ć D (vertical)
The Multiplication Lattice
flowchart TD
A["Two 3-digit numbers
ABC Ć DEF"] --> B["Arrange in columns:
A B C
D E F"]
B --> C["Step 1 (right):
C Ć F
= units digit"]
C --> D["Step 2 (cross 1):
BĆF + CĆE
with carry from step 1"]
D --> E["Step 3 (star):
AĆF + BĆE + CĆD
with carry from step 2"]
E --> F["Step 4 (cross 2):
AĆE + BĆD
with carry from step 3"]
F --> G["Step 5 (left):
A Ć D
with carry from step 4"]
G --> H["Combine all digits
with carries ā Final answer"]
style A fill:#1a73e8,color:#fff,stroke:none
style B fill:#34a853,color:#fff,stroke:none
style C fill:#fbbc04,color:#333,stroke:none
style D fill:#ea4335,color:#fff,stroke:none
style E fill::#ab47bc,color:#fff,stroke:none
style F fill:#46bdc6,color:#fff,stroke:none
style G fill:#1a73e8,color:#fff,stroke:none
style H fill:#34a853,color:#fff,stroke:none
Worked Examples
Example 1: 42 Ć 37 (2-digit)
4 2
Ć Ć
3 7
āāāāā
Step 1 (vertical right): 2 Ć 7 = 14. Write 4, carry 1.
Step 2 (crosswise): 4Ć7 + 2Ć3 = 28 + 6 = 34. Add carry 1 = 35. Write 5, carry 3.
Step 3 (vertical left): 4 Ć 3 = 12. Add carry 3 = 15.
Answer: 1554
Check: 42 Ć 37 = 1554 ā
Example 2: 123 Ć 456 (3-digit)
1 2 3
Ć Ć Ć
4 5 6
āāāāāāāāā
Step 1: 3 Ć 6 = 18. Write 8, carry 1.
Step 2: 2Ć6 + 3Ć5 = 12 + 15 = 27. Add carry 1 = 28. Write 8, carry 2.
Step 3: 1Ć6 + 2Ć5 + 3Ć4 = 6 + 10 + 12 = 28. Add carry 2 = 30. Write 0, carry 3.
Step 4: 1Ć5 + 2Ć4 = 5 + 8 = 13. Add carry 3 = 16. Write 6, carry 1.
Step 5: 1 Ć 4 = 4. Add carry 1 = 5.
Answer: 56088
Check: 123 Ć 456 = 56088 ā
Example 3: 2041 Ć 132 (4-digit Ć 3-digit)
Pad the shorter number with a leading zero:
2 0 4 1
Ć Ć Ć Ć
0 1 3 2
āāāāāāāāāāāāā
Step 1: 1 Ć 2 = 2. Write 2, carry 0.
Step 2: 4Ć2 + 1Ć3 = 8 + 3 = 11. Write 1, carry 1.
Step 3: 0Ć2 + 4Ć3 + 1Ć1 = 0 + 12 + 1 = 13. Add carry 1 = 14. Write 4, carry 1.
Step 4: 2Ć2 + 0Ć3 + 4Ć1 + 1Ć0 = 4 + 0 + 4 + 0 = 8. Add carry 1 = 9. Write 9, carry 0.
Step 5: 2Ć3 + 0Ć1 + 4Ć0 = 6 + 0 + 0 = 6. Write 6, carry 0.
Step 6: 2Ć1 + 0Ć0 = 2. Write 2, carry 0.
Step 7: 2 Ć 0 = 0.
So digits: 0 2 6 9 4 1 2 ā 269412.
Check: 2041 Ć 132 = 269412 ā
Example 4: 98 Ć 97 (Same as Nikhilam, different method)
9 8
Ć Ć
9 7
āāāāā
Step 1: 8 Ć 7 = 56. Write 6, carry 5.
Step 2: 9Ć7 + 8Ć9 = 63 + 72 = 135. Add carry 5 = 140. Write 0, carry 14.
Step 3: 9 Ć 9 = 81. Add carry 14 = 95.
Answer: 9506 ā
Example 5: (x + 3)(x + 5) ā Algebraic
x 3
Ć Ć
x 5
āāāāā
Step 1: 3 Ć 5 = 15 (constant term)
Step 2: xĆ5 + 3Ćx = 5x + 3x = 8x
Step 3: x à x = x²
Answer: x² + 8x + 15
Example 6: (2x + 3)(4x + 7)
2x 3
Ć Ć
4x 7
āāāāā
Step 1: 3 Ć 7 = 21
Step 2: 2xĆ7 + 3Ć4x = 14x + 12x = 26x
Step 3: 2x à 4x = 8x²
Answer: 8x² + 26x + 21
Code Snippet: Python Implementation
def urdhva_multiply(a, b):
"""Multiply two integers using Urdhva Tiryagbhyam (vertically and crosswise)."""
a_str = str(a)
b_str = str(b)
max_len = max(len(a_str), len(b_str))
a_str = a_str.zfill(max_len)
b_str = b_str.zfill(max_len)
a_digits = [int(d) for d in a_str]
b_digits = [int(d) for d in b_str]
result_digits = []
carry = 0
for diagonal in range(2 * max_len - 1):
total = carry
for i in range(max_len):
j = diagonal - i
if 0 <= j < max_len:
total += a_digits[max_len - 1 - i] * b_digits[max_len - 1 - j]
digit = total % 10
carry = total // 10
result_digits.append(str(digit))
while carry > 0:
result_digits.append(str(carry % 10))
carry //= 10
result_str = ''.join(reversed(result_digits))
return int(result_str)
tests = [(42, 37), (123, 456), (2041, 132), (98, 97)]
for a, b in tests:
result = urdhva_multiply(a, b)
print(f"{a} Ć {b} = {result} (expected: {a*b})")
Expected output:
42 Ć 37 = 1554 (expected: 1554)
123 Ć 456 = 56088 (expected: 56088)
2041 Ć 132 = 269412 (expected: 269412)
98 Ć 97 = 9506 (expected: 9506)
Code Snippet: JavaScript Implementation
function urdhvaMultiply(a, b) {
const aStr = String(a);
const bStr = String(b);
const maxLen = Math.max(aStr.length, bStr.length);
const aPadded = aStr.padStart(maxLen, '0');
const bPadded = bStr.padStart(maxLen, '0');
const aDigits = aPadded.split('').map(Number);
const bDigits = bPadded.split('').map(Number);
const result = [];
let carry = 0;
for (let diagonal = 0; diagonal < 2 * maxLen - 1; diagonal++) {
let total = carry;
for (let i = 0; i < maxLen; i++) {
const j = diagonal - i;
if (j >= 0 && j < maxLen) {
total += aDigits[maxLen - 1 - i] * bDigits[maxLen - 1 - j];
}
}
result.push(total % 10);
carry = Math.floor(total / 10);
}
while (carry > 0) {
result.push(carry % 10);
carry = Math.floor(carry / 10);
}
return parseInt(result.reverse().join(''));
}
[[42, 37], [123, 456], [2041, 132], [98, 97]].forEach(([a, b]) => {
console.log(`${a} Ć ${b} = ${urdhvaMultiply(a, b)} (expected: ${a * b})`);
});
Code Snippet: Polynomial Multiplication
def urdhva_polynomial(coeffs1, coeffs2):
"""Multiply two polynomials using Urdhva Tiryagbhyam.
Coefficients are from highest degree to constant term.
Example: 2x² + 3x + 1 ā [2, 3, 1]"""
n = len(coeffs1)
m = len(coeffs2)
result = [0] * (n + m - 1)
for i in range(n):
for j in range(m):
result[i + j] += coeffs1[i] * coeffs2[j]
return result
def poly_to_string(coeffs):
terms = []
deg = len(coeffs) - 1
for i, c in enumerate(coeffs):
if c == 0:
continue
power = deg - i
if power == 0:
terms.append(str(c))
elif power == 1:
terms.append(f"{c}x" if c != 1 else "x")
else:
terms.append(f"{c}x^{power}" if c != 1 else f"x^{power}")
return " + ".join(terms) if terms else "0"
p1 = [2, 3]
p2 = [4, 7]
result = urdhva_polynomial(p1, p2)
print(f"({poly_to_string(p1)}) Ć ({poly_to_string(p2)})")
print(f"= {poly_to_string(result)}")
p3 = [1, 2, 1]
p4 = [1, 3]
result = urdhva_polynomial(p3, p4)
print(f"({poly_to_string(p3)}) Ć ({poly_to_string(p4)})")
print(f"= {poly_to_string(result)}")
Expected output:
(2x + 3) à (4x + 7) = 8x² + 26x + 21
(x² + 2x + 1) à (x + 3) = x³ + 5x² + 7x + 3
Common Errors
Forgetting to pad shorter numbers. When multiplying 2041 Ć 132, treat it as 2041 Ć 0132. Without the leading zero, the crosswise pattern breaks.
Carry handling mistakes. Carries accumulate leftward. Always keep the running carry from the previous step. A carry of 14 (as in example 4) is normal for large cross-products.
Mixing up the digit order. The crosswise pattern goes from rightmost to leftmost. If you start from the left, the carry direction reverses and the answer will be wrong.
Using Urdhva when Nikhilam is faster. For 98 Ć 97, both methods work, but Nikhilam gives the answer in 3 steps while Urdhva requires carries. Choose the method that fits the problem.
Confusing the algebraic version. For (2x + 3)(4x + 7), treat 2x and 4x as single units ā don't separate the coefficient from the variable.
Skipping the final carry chain. After the last step, there may be a multi-digit carry. Continue propagating it until no carry remains.
Applying to non-integer digits. Urdhva works on individual digits. For numbers like 12.34, first convert to 1234, multiply, then place the decimal point.
Practice Questions
- 56 Ć 43 = ? (using Urdhva Tiryagbhyam)
- 234 Ć 567 = ?
- 1002 Ć 989 = ?
- (x + 7)(x + 9) = ? (polynomial version)
- 31415 Ć 27182 = ? (challenge)
Answers:
- 56 Ć 43 = 2408
- 234 Ć 567 = 132678
- 1002 Ć 989 = 990978
- (x + 7)(x + 9) = x² + 16x + 63
- 31415 Ć 27182 = 853928530
Mini Project: Vedic Calculator
Build a calculator that offers multiple Vedic multiplication methods and selects the optimal one:
def vedic_calculator(a, b):
base = 10 ** len(str(max(a, b)))
dev_a = abs(base - a)
dev_b = abs(base - b)
if dev_a < base * 0.1 and dev_b < base * 0.1:
print("Using Nikhilam (near-base optimization)...")
result = a * b
else:
print("Using Urdhva Tiryagbhyam (general method)...")
result = urdhva_multiply(a, b)
expected = a * b
print(f"{a} Ć {b} = {result}")
print(f"Verified: {result == expected}")
return result
while True:
try:
inp = input("Enter two numbers (or 'q' to quit): ")
if inp.lower() == 'q':
break
parts = inp.split()
a, b = int(parts[0]), int(parts[1])
vedic_calculator(a, b)
except (ValueError, IndexError):
print("Please enter two integers separated by a space.")
FAQ
Next Steps
Continue with Paravartya Yojayet ā Advanced Division Method to learn the division counterpart of these multiplication techniques.
Related tutorials:
- Nikhilam ā multiplication near powers of 10
- Urdhva Tiryagbhyam ā basic vertically and crosswise method
- Java ā implement Vedic math in Android apps
Built by the developers of Doda Browser, DodaZIP, and Durga Antivirus Pro.
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro