Skip to content

Urdhva Tiryagbhyam — Advanced Vertically and Crosswise Multiplication

DodaTech Updated 2026-06-21 10 min read

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.

ā„¹ļø Info

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

  1. Forgetting to pad shorter numbers. When multiplying 2041 Ɨ 132, treat it as 2041 Ɨ 0132. Without the leading zero, the crosswise pattern breaks.

  2. 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.

  3. 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.

  4. 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.

  5. Confusing the algebraic version. For (2x + 3)(4x + 7), treat 2x and 4x as single units — don't separate the coefficient from the variable.

  6. Skipping the final carry chain. After the last step, there may be a multi-digit carry. Continue propagating it until no carry remains.

  7. 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

  1. 56 Ɨ 43 = ? (using Urdhva Tiryagbhyam)
  2. 234 Ɨ 567 = ?
  3. 1002 Ɨ 989 = ?
  4. (x + 7)(x + 9) = ? (polynomial version)
  5. 31415 Ɨ 27182 = ? (challenge)

Answers:

  1. 56 Ɨ 43 = 2408
  2. 234 Ɨ 567 = 132678
  3. 1002 Ɨ 989 = 990978
  4. (x + 7)(x + 9) = x² + 16x + 63
  5. 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

What does Urdhva Tiryagbhyam mean?

"Vertically and crosswise." The sutra describes the pattern of multiplying digits vertically (same position) and crosswise (different positions) in a systematic lattice that works for any number of digits.

How does Urdhva compare to standard long multiplication?

Urdhva is structured identically to standard multiplication but organized by diagonals instead of rows. The computational complexity is the same O(n²), but Urdhva is easier to do mentally because you compute one digit at a time rather than managing multiple rows.

Can I use Urdhva for decimal multiplication?

Convert to integers, multiply using Urdhva, then reinsert the decimal point. For 12.3 Ɨ 4.56, compute 123 Ɨ 456 = 56088, then place decimal: 12.3 has 1 place, 4.56 has 2 places → 56.088.

Is Urdhva related to the lattice method taught in schools?

Yes — the "lattice multiplication" or "gelosia" method taught in some curricula is essentially Urdhva Tiryagbhyam visualized with a grid. The difference is that Urdhva is computed mentally without drawing the grid.

How do I handle carries in large multiplications?

Work from right to left. At each diagonal step, add the carry from the previous step, extract the units digit, and keep the remainder as the new carry. Multi-digit carries are normal — for 9-digit multiplications, carries can reach hundreds.

How does DodaZIP use Urdhva-like logic?

Checksum calculations in DodaZIP use crosswise summation patterns similar to Urdhva to verify file integrity during compression, ensuring no data corruption occurs during archive operations.

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